Repository navigation
Do not wrap around when rounding row and byte settings to marks - #126536
Conversation
`MergeTreeDataSelectExecutor::roundRowsOrBytesToMarks` rounded up with `(setting + granularity - 1) / granularity`, which wrapped around to 0 for a setting close to the maximum. The maximum values of `merge_tree_max_rows_to_use_cache` and `merge_tree_max_bytes_to_use_cache`, which mean "always use the cache", disabled the uncompressed cache for every query, and the maximum `merge_tree_min_rows_for_seek` and `merge_tree_min_bytes_for_seek` became 0. Found while enabling the UBSan check for unsigned integer overflows in #120906. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Workflow [PR], commit [3593ab2] Summary: ✅
AI ReviewSummaryPR #126536 replaces overflowing ceiling division in Final VerdictStatus: ✅ Approve |
…max_value` The randomized `use_columns_cache` lets the second query read entirely from the columns cache, leaving the uncompressed cache counters at zero. Address review: #126536 (comment) CI: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=126536&sha=latest&name_0=PR Co-Authored-By: Claude Opus 5.5 <[email protected]>
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Compile time of recompiled translation units7 translation units recompiled, 23 s compile time in total, 7 of them have a recent master baseline. |
MergeTreeDataSelectExecutor::roundRowsOrBytesToMarksrounded up with(setting + granularity - 1) / granularity, which wrapped around to 0 for a setting close to the maximum:merge_tree_max_rows_to_use_cacheandmerge_tree_max_bytes_to_use_cache, which mean "always use the cache", disabled the uncompressed cache for every query;merge_tree_min_rows_for_seekandmerge_tree_min_bytes_for_seekbecame 0.It now rounds up without the addition.
Found while enabling the UBSan check for unsigned integer overflows.
Related: #120906
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fix the uncompressed cache being disabled when
merge_tree_max_rows_to_use_cacheandmerge_tree_max_bytes_to_use_cacheare set to their maximum value, and the same wraparound formerge_tree_min_rows_for_seekandmerge_tree_min_bytes_for_seek.🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/126536]
Version info
26.11.1.450-master(included in26.11and later)