Repository navigation
Read system.query_log in default-size blocks in 05620_read_in_order_virtual_row_fixed_key - #132195
Conversation
…r_virtual_row_fixed_key` The test sets `max_threads = 1, max_block_size = 8` for the whole session, as its fixture tables need, and that also applied to its `read_rows` check, whose two scalar subqueries scan `system.query_log` of the shared CI server (0.5-2M rows of other tests' queries). With the default `use_query_condition_cache = 1` `MergeTreeRangeReader` rounds every read up to complete granules, so the 8-row limit is not honoured there and the check is fast. The randomizer draws `use_query_condition_cache = 0` about half the time; then 8-row blocks are honoured, the filter runs once per 8 rows, and on sanitizer builds the check alone took 383-655 s (over 93% of every failing run, from the failing jobs' own query_log), hitting the 600 s test timeout on master amd_msan and amd_tsan. Reset `max_block_size` to its compiled default for the check and set it back to 8 right after it, the idiom of 2bf75d0 (04508) and 4ceaaf8 (05497). The two measured queries run before the reset, so the `read_rows` they log are unchanged; every assertion and the `.reference` stay as they are. Measured on the master 088b6f5 CI binaries with `system.query_log` filled to 2M rows: tsan, use_query_condition_cache = 0, the check ran over 300 s (killed by max_execution_time) before and 15-17 s after (whole test 30-37 s); query_log shows every other statement still runs with max_block_size = 8; 50/50 randomized runs pass on the debug binary. 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 my own cold review (1 nit).
Severity: ❌ blocker / Session id: cron:clickhouse-review-slot-8:20261117-014400 |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-40:20261117-010800 |
|
Workflow [PR], commit [40bbc0f] Summary: ✅ AI ReviewSummaryPR #132195 temporarily resets Final VerdictStatus: ✅ Approve |
9b10750
Backport #132195 to 26.10: Read `system.query_log` in default-size blocks in `05620_read_in_order_virtual_row_fixed_key`
Backport #132195 to 26.9: Read `system.query_log` in default-size blocks in `05620_read_in_order_virtual_row_fixed_key`
Related: #130893
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Description
05620_read_in_order_virtual_row_fixed_key(new in #130893) hits the 600 s test timeout on master sanitizer builds: amd_msan, amd_tsan, amd_tsan.The test sets
max_threads = 1, max_block_size = 8for the whole session, as its fixtures need, and that also applies to itsread_rowscheck oversystem.query_log, which on a CI server holds 0.5-2M rows of other tests' queries. With the defaultuse_query_condition_cache = 1the reader rounds reads up to whole granules, so the check is fast. The randomizer sets it to 0 in about half the runs, and then the filter runs once per 8 rows. In the failing jobs' ownquery_logthis one query took 383-655 s, over 93% of every failing run, always withuse_query_condition_cache = 0.The check now runs after
SET max_block_size = DEFAULT, and the session goes back to 8 right after it (the same idiom as 2bf75d0 and 4ceaaf8). The measured queries run before the reset, so theread_rowsthey log are unchanged, and.referenceis unchanged.Validation on the master CI binaries with
system.query_logfilled to 2M rows: on the tsan binary the check ran over 300 s (killed bymax_execution_time) before the change and 15-17 s after it, with the whole test at 30-37 s.query_logshows every other statement still runs withmax_block_size = 8. 50/50 randomized runs pass on the debug binary.Reverting #130893 would also stop the timeouts, but it would bring back the wrong row order that it fixes; the slow part is only in the test.
🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/132195]
Version info
26.11.1.2551-master(included in26.11and later)26.10.5.56,26.9.31.19