Skip to content

DO NOT MERGE 25.8.16 Stable backport of #91574: Add cleanup thread to MergeTree to avoid cleanup starvation#1589

Open
ilejn wants to merge 1 commit intoreleases/25.8.16from
backports/releases/25.8.16/91574
Open

DO NOT MERGE 25.8.16 Stable backport of #91574: Add cleanup thread to MergeTree to avoid cleanup starvation#1589
ilejn wants to merge 1 commit intoreleases/25.8.16from
backports/releases/25.8.16/91574

Conversation

@ilejn
Copy link
Copy Markdown
Collaborator

@ilejn ilejn commented Mar 27, 2026

This is just a try to backport this PR.

Changelog category (leave one):

  • Improvement

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):

Add a dedicated cleanup thread for MergeTree to prevent cleanup delays under heavy merge load. This resolves ClickHouse#86181.

The MergeTree cleanup logic was tightly coupled with the merge scheduler, which caused cleanup tasks to be delayed or completely blocked when the table was under heavy merge load. ReplicatedMergeTree already had a separate cleanup thread, so this change aligns MergeTree with that design. @azat You might be interested in this one.

CI/CD Options

Exclude tests:

  • Fast test
  • Integration Tests
  • Stateless tests
  • Stateful tests
  • Performance tests
  • All with ASAN
  • All with TSAN
  • All with MSAN
  • All with UBSAN
  • All with Coverage
  • All with Aarch64
  • All Regression
  • Disable CI Cache

Regression jobs to run:

  • Fast suites (mostly <1h)
  • Aggregate Functions (2h)
  • Alter (1.5h)
  • Benchmark (30m)
  • ClickHouse Keeper (1h)
  • Iceberg (2h)
  • LDAP (1h)
  • Parquet (1.5h)
  • RBAC (1.5h)
  • SSL Server (1h)
  • S3 (2h)
  • S3 Export (2h)
  • Swarms (30m)
  • Tiered Storage (2h)

…-thread

Add cleanup thread to MergeTree to avoid cleanup starvation
@ilejn ilejn added backport Backport 25.8 25.8 Altinity Stable 25.8.16 25.8.16 Stable labels Mar 27, 2026
@github-actions
Copy link
Copy Markdown

Workflow [PR], commit [3f803df]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

25.8 25.8 Altinity Stable 25.8.16 25.8.16 Stable backport Backport

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants