Repository navigation
Fix flaky 02346_text_index_bug108519_qcc_skip_index under randomized statistics - #110260
Conversation
…statistics The tab_namecol and tab_disj sections use minmax skip indexes on a numeric column with an out-of-range predicate (n = 999). Under the CI-randomized materialize_statistics_on_insert = 1 with auto_statistics_types including minmax, a minmax statistic on n is built at insert and prunes the part before the skip-index query condition cache path runs. No QCC entry is written, so the reuse query cannot hit and namecol_reuse_a_reuses_entry flips 1 to 0. Pin auto_statistics_types = '' on both tables so the skip index is the only exclusion mechanism, which is what these sections assert. A table-level setting is immune to the session-setting randomizer (the client only injects a setting if not already present). Co-Authored-By: Claude Opus 4.8 <[email protected]>
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-worker-slot-1:20260713-120400 |
|
cc @shankar-iyer, test-only follow-up to #108548: the QCC x skip-index regression 02346 went flaky on master under randomized |
|
Workflow [PR], commit [389a832] Summary: ❌ AI ReviewSummaryThis PR makes Final VerdictStatus: ✅ Approve |
Algunenano
left a comment
There was a problem hiding this comment.
I'm force merging this. It's causing hundreds of failures in CI
99112f9
Pulls in #110260, the fix for the flaky test `02346_text_index_bug108519_qcc_skip_index` under randomized `materialize_statistics_on_insert`, which was the only failing test in https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=110179&sha=b2143caac05dd213da79134fa637667a64d5efd5&name_0=PR Co-Authored-By: Claude Fable 5 <[email protected]>
Pull in the merged fix for the flaky test 02346_text_index_bug108519_qcc_skip_index (#110260), which caused the only real stateless test failures on the previous CI run of this branch.
…ause Pulls in the merged fix from ClickHouse#110260 for the randomized-settings flake in 02346_text_index_bug108519_qcc_skip_index (failing on 5 stateless shards of the previous CI run for this PR, culprit setting materialize_statistics_on_insert). No conflicts: master touched none of this PR's files since the previous merge base. CI report with the failures: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=102308&sha=22618ceb1a3dd7ce53a877452e204eb895de7596
A PR's green CI describes the master of its last run, not of its merge. PR ClickHouse#108548 merged on 2026-07-13 with CI last run on 07-01; on 07-03 master merged ClickHouse#108511, which added materialize_statistics_on_insert to the settings randomizer in tests/clickhouse-test. The PR's new test 02346_text_index_bug108519_qcc_skip_index then failed on master whenever the randomized setting was drawn (~40% of runs) and kept master red for ~7 hours until ClickHouse#110260 pinned auto_statistics_types at the table level. The merge queue already builds the exact merged state (Build (amd_binary)) but ran no stateless tests on it. Add "Stateless tests (amd_binary, flaky check)" to MergeQueueCI: it reruns the PR's new/changed stateless tests on the merge group state (the PR merged with the current master), so a semantic conflict with post-CI master changes bounces the PR from the queue instead of breaking master. The job self-skips when the PR changes no tests. Merge-queue runs use a reduced budget (20 iterations / 20 min instead of 50 iterations / 45 min): the PR CI already ran the full flaky check, and a randomized setting drawn with probability 0.4 per run escapes 20 iterations with probability 0.6^20 ~= 4e-5. Changed-file detection in merge-queue runs now uses the linked PR's paginated files list (PR_NUMBER is 0 there, and the commits API caps a merge commit's file list at 300 entries), and the changed-files fetch fails closed in merge-queue runs so a GitHub API failure cannot silently skip the check. Incident: ClickHouse#108548 Follow-up fix it required: ClickHouse#110260 Co-Authored-By: Claude Fable 5 <[email protected]>
…-qcc-namecol-auto-statistics Fix flaky 02346_text_index_bug108519_qcc_skip_index under randomized statistics
Pulls in ClickHouse#110260, which fixes the flaky test 02346_text_index_bug108519_qcc_skip_index under randomized materialize_statistics_on_insert - the cause of 4 of the 5 red checks on the previous run of this PR: ClickHouse#109463
A PR's green CI describes the master of its last run, not of its merge. PR ClickHouse#108548 merged on 2026-07-13 with CI last run on 07-01; on 07-03 master merged ClickHouse#108511, which added materialize_statistics_on_insert to the settings randomizer in tests/clickhouse-test. The PR's new test 02346_text_index_bug108519_qcc_skip_index then failed on master whenever the randomized setting was drawn (~40% of runs) and kept master red for ~7 hours until ClickHouse#110260 pinned auto_statistics_types at the table level. The merge queue already builds the exact merged state (Build (amd_binary)) but ran no stateless tests on it. Add "Stateless tests (amd_binary, flaky check)" to MergeQueueCI: it reruns the PR's new/changed stateless tests on the merge group state (the PR merged with the current master), so a semantic conflict with post-CI master changes bounces the PR from the queue instead of breaking master. The job self-skips when the PR changes no tests. Merge-queue runs use a reduced budget (20 iterations / 20 min instead of 50 iterations / 45 min): the PR CI already ran the full flaky check, and a randomized setting drawn with probability 0.4 per run escapes 20 iterations with probability 0.6^20 ~= 4e-5. Changed-file detection in merge-queue runs now uses the linked PR's paginated files list (PR_NUMBER is 0 there, and the commits API caps a merge commit's file list at 300 entries), and the changed-files fetch fails closed in merge-queue runs so a GitHub API failure cannot silently skip the check. Incident: ClickHouse#108548 Follow-up fix it required: ClickHouse#110260 Co-Authored-By: Claude Fable 5 <[email protected]>
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
Follow-up to #108548, which added
02346_text_index_bug108519_qcc_skip_index. The test started failing on master across all build types on 2026-07-13 under CI-randomized settings.Root cause: the
tab_namecolandtab_disjsections use minmax skip indexes on a numeric columnnwith an out-of-range predicaten = 999. With the randomizedmaterialize_statistics_on_insert = 1andauto_statistics_typesincludingminmax, a minmax statistic onnis built at insert time and prunes the whole part before the skip-index query condition cache path runs. No QCC entry is written, so the reuse query cannot hit andnamecol_reuse_a_reuses_entryflips from 1 to 0.The randomized-settings diagnosis in the failing CI report confirms the single culprit:
materialize_statistics_on_insert True(130/130 fail with it, 184/184 pass without).Fix: pin
auto_statistics_types = ''on both tables so the skip index is the only exclusion mechanism, which is what these sections assert. A table-level MergeTree setting is immune to the session-setting randomizer (the client only injects a setting if it is not already present).Verified both directions on a debug binary with
materialize_statistics_on_insert = 1: the pre-fix test yieldsnamecol_reuse_a_reuses_entry 0(fail), the fixed test matches the reference exactly (pass). Report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?REF=master&sha=8b9a8c2d3636ea7a077b4e11d250cd28c0cc47c2&name_0=MasterCI&name_1=Stateless%20tests%20%28amd_debug%2C%20sequential%29Version info
26.7.1.867(included in26.7and later)