Repository navigation
Fix flaky 05255_filter_output_evaluated_before_its_filter - #123135
alexey-milovidov merged 1 commit into
Conversation
The last assertion checked `RuntimeFilterRowsChecked >= 2000` to prove the runtime filter was applied to the t1 side (2001 rows) rather than to t2 (5 rows). Every t1 row passes the filter, so after a block whose pass ratio exceeds join_runtime_filter_pass_ratio_threshold_for_disabling (0.7) the filter skips later blocks within its budget (rows checked times join_runtime_filter_blocks_to_skip_before_reenabling) and books them in RuntimeFilterRowsSkipped, not in RuntimeFilterRowsChecked. With the default layout t1 arrives in one block, so at most one row is skipped. With optimize_on_insert = 0 the part has level 0 and FINAL reads it through the merging path; with a wide part and index_granularity = 1493 that read yields a 1493-row and a 507-row block, and RowsChecked is 1494. This is what failed in Stateless tests (arm_binary, parallel) on PR ClickHouse#123121, where the runner's diagnosis narrowed it to these three settings (208/208 failing). In the failing job's query_log, Checked + Skipped was 2001 on all 470 executions of the probe, across every layout the runner tried. Sum the two counters. The threshold still separates t1 from the reversed join orientation (5) and from a filter that is planted but never applied (0). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Internal second-model review: adjudication log (click to expand)Pre-publication review by an independent model (engine: codex; 1 finding) plus my own review (2 nits).
Severity: ❌ blocker / Session id: cron:clickhouse-review-slot-8:20260930-201900 |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-4:20260930-200021 |
|
Workflow [PR], commit [ab5d329] Summary: ✅ AI ReviewSummaryThis PR fixes the flakiness in Final Verdict
|
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
Related: #122143
The last assertion of this test (added in #122143) printed
0instead of1in Stateless tests (arm_binary, parallel). The runner narrowed it tooptimize_on_insert = 0,index_granularity = 1493andmin_bytes_for_wide_part = 0(208/208 failing with them).The assertion checks
RuntimeFilterRowsChecked >= 2000to prove the runtime filter was applied to t1 (2001 rows) and not to t2 (5 rows). Every t1 row passes the filter, so after the first probe block the filter disables itself (join_runtime_filter_pass_ratio_threshold_for_disabling) and counts later blocks inRuntimeFilterRowsSkippedinstead. With the default layout no block is skipped. A level-0 wide part read throughFINALin 1493-row granules arrives in two blocks, and the job'squery_logshows 1494 checked plus 507 skipped.The assertion now sums both counters. The sum was 2001 on all 470 executions of the probe in the failing job. The threshold still separates t1 from the reversed join orientation (5) and from a filter that is never applied (0).
Validation: with the CI layout the old test fails every time and the new one passes. A sweep over
index_granularity1 to 8192, wide and compact parts andoptimize_on_insertgives a sum of 2001 in every arm (the old assertion fails 13 of 34). 123 runs with randomized settings pass. Reversing the join, disabling the runtime filter, or raising the threshold to 2002 makes the assertion print0.Workflow [PR]
Sync PR [sync-upstream/pr/123135]
Version info
26.10.1.1134-master(included in26.10and later)