Repository navigation
Fix flaky 01666_merge_tree_max_query_limit: pin max_threads=1 on the holder query - #111528
Conversation
…holder query The test spins up a long-running "holder" query (select sleepEachRow(0.1) from simple settings max_block_size = 1) to occupy the single max_concurrent_queries slot, then asserts that concurrent reads are throttled with error 202. The holder pinned only max_block_size and left max_threads to the CI settings randomizer. When the randomizer sets a high max_threads and a low merge_tree_min_rows_for_concurrent_read, the single part is split into many concurrent read streams (MergeTreeSelect(pool: ReadPool, algorithm: Thread) x N), so the 5000 sleepEachRow(0.1) rows run in parallel and the holder finishes early. Once the holder finishes it releases the concurrency slot, so a later throttle assertion returns success instead of 202, and the test fails with "Expected error code: 202 but got: 0". Pinning max_threads = 1 forces a single sequential read stream regardless of the randomized settings, so the holder reads the rows one at a time and stays alive for the whole test, keeping the concurrency slot occupied. The throttle assertions are unchanged. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-author-slot-1:20260723-045300 |
Internal second-model review — adjudication log (click to expand)Pre-publication review by an independent model (engine: codex; 0 findings; bounded: 1 full pass + 1 fix round + 1 delta recheck). Coverage: read the full changed test and reference, the runner randomization/precedence logic, the MergeTree planning and concurrency-holder paths, sibling tests, the parallel-replicas blacklist, and the CI report. Nothing material was uncovered; no blockers, majors, or nits raised. Session id: cron:clickhouse-author-slot-1:20260723-045300 |
|
cc @tiandiwonder — could you review this? Test-only flaky fix: it pins |
|
Workflow [PR], commit [b0ed095] Summary: ✅ AI ReviewSummaryThis PR makes Final Verdict
|
CI finish ledger — 6e4780bCI fully finished (only
Session id: cron:our-pr-ci-monitor:20260723-193000 |
…e-max-query-limit-holder-max-threads
|
Branch updated: merged master into it as #110048 (merge commit The merge was clean and the PR content is unchanged: still one file, one line ( |
CI finish ledger — 09e1920CI fully finished on this head (Config Workflow, Fast test, Style check,
Not caused by this PR: the whole diff is one file,
The crash-mode half of this family was fixed by #111656 (merged 2026-07-24) and that fix is already an ancestor of this head, so it is not the owner of this hang-mode failure. Session id: cron:our-pr-ci-monitor:20260727-023000 |
|
Owner update for the That failure is a hang on the macOS native runner, not a fault in this pull request's diff. It was No fixing pull request exists yet, and I am deliberately not opening a speculative one: the stuck |
…e-max-query-limit-holder-max-threads
CI finish ledger - b0ed095CI fully finished on this head:
This head is a plain master merge on top of the previously ledgered Session id: cron:our-pr-ci-monitor:20260728-053000 |
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
The test starts a long-running "holder" query
select sleepEachRow(0.1) from simple settings max_block_size = 1to occupy the singlemax_concurrent_queriesslot, then asserts that concurrent reads are throttled witherror 202.
The holder pinned only
max_block_sizeand leftmax_threadsto the CI settingsrandomizer. When the randomizer picks a high
max_threadstogether with a lowmerge_tree_min_rows_for_concurrent_read, the single part is split into many concurrentread streams (
MergeTreeSelect(pool: ReadPool, algorithm: Thread) x N), so the 5000sleepEachRow(0.1)rows run in parallel and the holder finishes early. Once it finishesit releases the concurrency slot, so a later throttle assertion returns success instead
of 202 and the test fails with "Expected error code: 202 but got: 0".
Pinning
max_threads = 1forces a single sequential read stream regardless of therandomized settings, so the holder reads the rows one at a time and stays alive for the
whole test. The throttle assertions are unchanged.
Found by CI triage on #108091 (Stateless tests, amd_tsan, s3 storage, parallel).
Version info
26.8.1.265(included in26.8and later)