Repository navigation
Add merge_selector_min_age_to_disable_right_tail_heuristic to disable right tail heuristic for partitions no longer being written to - #122638
Conversation
…right-tail-min-age Resolve conflicts with master's reworked `MergeTreeSettings.cpp` layout: the settings history for `merge_selector_min_age_to_disable_right_tail_heuristic` moves from `SettingsChangesHistory.cpp` into the `DECLARE` itself (26.10), and `gtest_simple_merge_selector.cpp` takes master's helpers plus a per-part-age `makePartsRange` overload used by this PR's tests. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…ht-tail gtest helper Master enabled that heuristic by default, and it dereferences `partitions_stats`, which `selectRightTailRange` does not provide. Turn it off next to `enable_heuristic_to_align_parts` so the tests isolate the right-tail heuristic. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
Workflow [PR], commit [6f33058] Summary: ✅
AI ReviewSummaryThis PR adds an opt-in Final VerdictStatus: ✅ Approve LLVM Coverage ReportMeasured on commit 6f33058.
Changed lines: Changed C/C++ lines covered: 31/31 (100.00%) · Uncovered code |
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Compile time of recompiled translation units11 translation units recompiled, 24 s compile time in total, 11 of them have a recent master baseline. |
Supersedes #105454 by @tanner-bruce (Shopify), which could not be updated because maintainer edits are disabled on the fork. The original commits are kept to preserve authorship. On top of them, this PR merges current
master: the setting's history moves into itsDECLAREinMergeTreeSettings.cpp(26.10), and the gtests now use master's helpers.Adds an opt-in
MergeTreesetting,merge_selector_min_age_to_disable_right_tail_heuristic, for theSimpleandStochasticSimplemerge selectors. When it is non-zero, the selector skips the right-tail small-part removal heuristic for candidate ranges where every part is at least that many seconds old. The default is0, so merge behavior does not change unless the setting is enabled. This helps compact old immutable partitions, where the right-tail heuristic can leave small parts stranded at the end of a partition.This is different from
min_partition_age_to_force_merge_seconds, which is already on master: that setting forces merges in idle partitions but explicitly does not disable the right-tail heuristic.Related: #105454
Closes: #70912
Related: #79697
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Added the
merge_selector_min_age_to_disable_right_tail_heuristicMergeTreesetting. It lets theSimpleandStochasticSimplemerge selectors include small parts at the right end of a range in merge candidates once every part in the range is old enough.Documentation entry for user-facing changes
MergeTreesetting description inMergeTreeSettings.cpp.🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/122638]
Version info
26.10.1.1189-master(included in26.10and later)