Repository navigation
Fix flaky 05219_streaming_queries_part_offset (no per-query time limit) - #123897
alexey-milovidov merged 1 commit into
Conversation
The test failed on `Stateless tests (arm_asan_ubsan, azure, parallel)` with `Code: 159 ... Timeout exceeded: elapsed 21292.078 ms, maximum: 20000.000 ms` on its first 8-row INSERT. On that lane MergeTree tables use a write-through filesystem cache, and debug/sanitizer builds randomly run FileCache::assertCacheCorrectness (check_cache_probability), which holds the cache priority lock while it stats every entry. The INSERT spent 21.18 of its 21.29 s in FilesystemCachePriorityWriteLockMicroseconds (11 reservations) behind a concurrent query that ran 23 such checks; the Azure uploads took 8 ms. The session `max_execution_time = 20` is not part of any oracle: the test has no serverError expectation, the reference holds only result values, and STREAM BOUNDED terminates by itself, so a real hang still fails on the runner timeout. Remove it, as ClickHouse#113737 did for 04545_streaming_queries_row_policy_multi_partition. Validated with file_segment_pause_before_write holding the first INSERT's cache write for 25 s on a write-through local_cache table: the old test fails with Code 159 every time, the new one passes and matches the reference. 50/50 randomized runs, 20/20 with the write-through cache as the MergeTree default. 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 blockers, 0 majors).
Severity: ❌ blocker / Session id: cron:clickhouse-review-slot-10:20261004-195500 |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-7:20261004-193600 |
|
Workflow [PR], commit [ed489b5] Summary: ✅ AI ReviewSummaryThis PR removes the session-level Final Verdict
|
…for_async_insert=0 poll Case 4 inserts with `async_insert=1&wait_for_async_insert=0` and then polled `count()` 20 times (about 19 s on the arm_asan_ubsan azure lane) before printing the rows. `wait_for_async_insert=0` gives no visibility deadline, and on ClickHouse#119181 the background flush took 27.4 s, 27.1 s of it waiting for the filesystem cache priority lock while writing a 2-row part to the write-through `cached_azure` disk (Azure writes took 5 ms). The rows landed 8 s after the final SELECT, so the reference diff was caused only by the 20-iteration cap. Loop until the rows land instead. The runner's per-test timeout stays the bound, so a lost insert still fails. Same remedy as ClickHouse#123897. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Related: #120957
Related: #113737
Related: #122567
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
05219_streaming_queries_part_offsetfailed onStateless tests (arm_asan_ubsan, azure, parallel)withCode: 159 ... Timeout exceeded: elapsed 21292.078 ms, maximum: 20000.000 mson an 8-rowINSERT.Root cause: on that lane MergeTree tables use a write-through filesystem cache, and debug and sanitizer builds randomly run a full cache consistency check (
check_cache_probability) that holds the cache priority lock while it stats every entry. TheINSERTspent 21.18 of its 21.29 s inFilesystemCachePriorityWriteLockMicroseconds(11 reservations) behind a concurrent query that ran 23 such checks; its Azure uploads took 8 ms. Same stall as04344(#122567).The test's own
max_execution_time = 20asserts nothing: there is noserverErrorexpectation, the reference holds only result values, andSTREAM BOUNDEDterminates by itself; a real hang still fails on the runner's timeout. So it can only turn a slow but correct run into a failure. Change: remove it, as #113737 did for04545_streaming_queries_row_policy_multi_partition.Validation (debug build, write-through
local_cache): with the firstINSERT's cache write paused for 25 s viafile_segment_pause_before_write, the unchanged test fails withCode: 159every time (3 of 3), the changed one passes and matches the reference (3 of 3). 50/50 randomized runs, 20/20 with the write-through cache as the MergeTree default.The other failures of this test in the last 30 days are on PRs that change the test randomization themselves (
prefer_optimize_projection, forced reverse primary keys). The cost of the cache check on write-through caches is its owners' call.Workflow [PR]
Sync PR [sync-upstream/pr/123897]
Version info
26.10.1.1549-master(included in26.10and later)