Repository navigation
Disable the query condition cache in 03634_autopr_input_bytes_estimation - #131690
alexey-milovidov merged 1 commit into
Conversation
The new `Stateless tests (arm_asan_ubsan, azure, targeted)` job (ClickHouse#131576) runs the test 50 times on one server with fixed settings. `query_23` (`... WHERE URL LIKE '%google%' ORDER BY EventTime LIMIT 10`) is a TopK read: with the default `use_query_condition_cache = 1` every run stores the granules the TopK filter dropped, and the next run starts from them. The selection shrinks run over run (CI: 383, 26, 16, 9 marks), `ReadCompressedBytes` falls more slowly than the estimate, and the ratio crosses the test's 2x bound once it converges (2.005x / 2.022x on ClickHouse#109377 and ClickHouse#129198). Randomized jobs never converge because the cache and TopK settings are re-drawn per run. Pin `use_query_condition_cache=0` test-wide, as the sibling estimation tests 03801 and 04102 already do; the cache with autopr stays covered by 03783_autopr_dataflow_cache_reuse_qcc. Locally, unpatched at CI's thread count: red from run 4-5 (8-9 marks, 2.02-2.04x); patched: 10/10 with a constant 1084 marks, and 50/50 with random settings. 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; 0 findings) plus an independent cold review of the diff (0 blocker, 0 major). Checked: the trigger ( Session id: cron:clickhouse-review-slot-8:20261114-214601 |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-41:20261114-210500 |
|
Workflow [PR], commit [f99de9a] Summary: ✅ AI ReviewSummaryPR #131690, at Missing context / blind spots
Final VerdictStatus: ✅ Approve. |
79929b2
Related: #131576
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
03634_autopr_input_bytes_estimationfails in the newStateless tests (arm_asan_ubsan, azure, targeted)job (added by #131576), always onquery_23, just past the 2x bound:+query_23 12159905 6013142(report),+query_23 12536795 6252459(report). True master: 0 failures.Root cause: that job is the first to repeat this stateful test on one server with fixed settings (
--no-random-settings, 50 runs).query_23(... WHERE URL LIKE '%google%' ORDER BY EventTime LIMIT 10) is a TopK read, and with the defaultuse_query_condition_cache = 1every run stores the granules the TopK filter dropped, so the next run starts from them. The selection shrinks run over run (CI: 383, 26, 16, 9 marks),ReadCompressedBytesfalls more slowly than the estimate, and the ratio crosses 2 once it converges. Randomized jobs never converge because the QCC and TopK settings change per run.Change:
SET use_query_condition_cache=0;test-wide, the same pin as the sibling tests03801_autopr_input_bytes_estimation_query_with_subqueriesand04102_autopr_input_bytes_estimation_query_with_ctes. The autopr decision on reads narrowed by the query condition cache stays covered by03783_autopr_dataflow_cache_reuse_qcc.Validation (master debug build,
test.hitsfromcreate.sql, the job's runner flags): unpatched, with CI'smax_threads(32), 10 repeated runs go red from run 4-5 (8-9 marks, ratio 2.02-2.04); patched, 10/10 OK with a constant 1084 marks forquery_23(max ratio 1.36 over all queries), plus 50/50 randomized runs.Workflow [PR]
Sync PR [sync-upstream/pr/131690]
Version info
26.11.1.2334-master(included in26.11and later)