Repository navigation
Fix flaky test 02789_filesystem_cache_alignment under concurrency control - #126391
Merged
alexey-milovidov merged 3 commits intoOct 19, 2026
Conversation
…trol The two `all > 1` checks need the `LIMIT 1` read to log more than one non-final file segment of `b.bin`. With the prefetched pool disabled (as in CI), each stream of `MergeTreeReadPool` starts at a different mark range, so the number of logged segments is bounded by the streams and threads that start reading before the limit closes the query. Since ClickHouse#125085 an auto `max_threads` is lowered to the fair share of CPU slots. In the failing job (PR ClickHouse#109455, Stateless tests (arm_asan_ubsan, azure, sequential, 1/2)) background pipelines held the slots and the read got `Lower number of threads for query to the fair share of CPU slots 1 (8 requested)` and `Reading approx. 1000000 rows with 1 streams`, so it read one granule, one segment, and printed FAIL twice. Disable `use_concurrency_control` for the read: `getEffectiveMaxThreads` then keeps the auto value and the executor spawns threads without slots. Validated with the CI test config and a MinIO-backed `s3_disk`: with `concurrent_threads_soft_limit_num = 1` the unfixed test fails 5/5 with CI's diff and log lines, the fixed one passes 20/20 there (7-8 streams) and 50/50 on the default config. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Collaborator
Author
Internal second-model review: adjudication log (click to expand)Pre-publication review by an independent model (engine: codex; 1 finding) plus my own review.
Severity: ❌ blocker / Session id: cron:clickhouse-review-slot-8:20261017-015000 |
Contributor
|
Workflow [PR], commit [318e8e5] Summary: ✅ AI ReviewSummaryDisables Missing context / blind spots
Final VerdictStatus: ✅ Approve |
Collaborator
Author
alexey-milovidov
approved these changes
Oct 18, 2026
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related: #125085
Related: #109455
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
02789_filesystem_cache_alignmentfailed in Stateless tests (arm_asan_ubsan, azure, sequential, 1/2) on #109455: stdout lines 2 and 6 printedFAILbecause the read logged only one non-final file segment, while the check needs more than one.The
LIMIT 1read touches several file segments ofb.binonly when it runs with several streams: each stream starts at a different mark range, so at a different 20 MiB aligned offset. Since #125085 an automax_threadsis lowered to the fair share of CPU slots, which also counts background pipelines. In the failing job the read was the only query running, and the server log for the read showsLower number of threads for query to the fair share of CPU slots 1 (8 requested)followed byReading approx. 1000000 rows with 1 streams.The fix sets
use_concurrency_control = 0for that read, so neither its stream count nor its thread spawning depends on what else the server runs. The reference is unchanged.Validation, with the CI test config and an S3 (MinIO) disk: with
concurrent_threads_soft_limit_num = 1the unfixed test fails 5/5 with the same diff and the same two log lines; the fixed test passes 20/20 there (7-8 streams) and 50/50 on the default config.Workflow [PR]
Sync PR [sync-upstream/pr/126391]
Version info
26.11.1.186-master(included in26.11and later)