25.8 Stable backport of #91574: Add cleanup thread to MergeTree to avoid cleanup starvation#1589
25.8 Stable backport of #91574: Add cleanup thread to MergeTree to avoid cleanup starvation#1589ilejn wants to merge 7 commits into
Conversation
6dfbdcc to
20c0341
Compare
fbb3c2e to
d4b049c
Compare
…-thread Signed-off-by: Ilya Golshtein <igolshtein@altinity.com>
Signed-off-by: Ilya Golshtein <igolshtein@altinity.com>
d4b049c to
f67d3b3
Compare
Signed-off-by: Ilya Golshtein <igolshtein@altinity.com>
Signed-off-by: Ilya Golshtein <igolshtein@altinity.com>
Signed-off-by: Ilya Golshtein <igolshtein@altinity.com>
f67d3b3 to
9f01fd8
Compare
Signed-off-by: Ilya Golshtein <igolshtein@altinity.com>
…ases/25.8.16/91574_new
Review notes
In upstream the equivalent change is done by ea67e82 from ClickHouse#87719 , but it is not directly applicable to 25.8
Fixes fluky check. Actually not related to the backport: if test files are altered artificially, e.g. via adding fake comments, we have same issue.
Some good test fixes
The trickiest change. Fixes failures in e.g. 03174_exact_rows_before_aggregation
Some required test fixes
Actual backport with some changes. |
This is just a try to backport this PR.
Changelog category (leave one):
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:
Regression jobs to run: