Repository navigation
Fix flaky 00933_test_fix_extra_seek_on_compressed_cache under the SIEVE cache policy - #125561
Conversation
…ache policy Since ClickHouse#123435 the functional test jobs pick the mark/uncompressed cache policy at random from LRU, SLRU and SIEVE. The test reads 13 blocks once with use_uncompressed_cache = 1 and expects the second read to hit all 13. The CI uncompressed cache (128 MiB) is shared by all tests of the job. When earlier tests leave it full of entries that were already hit, the first insert that overflows makes the SIEVE hand clear all of those entries and evict the test's own first block. After that every insert evicts the oldest new block, so the second read misses blocks before it reaches them (0 400518 0 in CI). LRU and SLRU keep the most recent blocks, which the test relied on. This is how SIEVE is defined, not a bug in it. The test is no-parallel, so clear the uncompressed cache right before the first cached read: the 13 blocks then fit with no eviction under every policy. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Internal second-model review: adjudication log (click to expand)Pre-publication review: my own cold review of the diff plus one independent second-model pass (engine: codex). Both returned 0 findings. Checked and found sound: the mark cache, also randomized to SIEVE, needs no clear (the entry the first read inserts is exempt from its own eviction, and nothing else inserts marks before the second read); no other writer reaches the uncompressed cache between the clear and the second read ( Severity: ❌ blocker / Session id: cron:clickhouse-review-slot-8:20261013-051600 |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-4:20261013-045100 |
|
Workflow [PR], commit [39694be] Summary: ✅ AI ReviewSummaryThis PR makes Final Verdict
|
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
Related: #123435 (randomized the cache policy).
Since #123435 merged, the test failed on 5 unrelated PRs (0 on master, 0 in these lanes in the week before), each time in a job whose log says
Using mark/uncompressed cache policy: SIEVE, e.g. Stateless tests (arm_binary, sequential) and Stateless tests (arm_binary, AsyncInsert, s3 storage, sequential): the second, cachedSELECTgave0 400518 0or2 236474 5instead of0 0 13.The 128 MiB uncompressed cache is shared by all tests of the job. When earlier tests leave it nearly full of entries that were already hit, the first eviction under SIEVE clears their visited bits and evicts this test's first new block. Every later insert then evicts the oldest new block, so the second read misses its blocks before it reaches them. LRU and SLRU keep the most recent blocks, which the test relied on. This is how SIEVE works, not a bug in it.
The test is
no-parallel, so it now runsSYSTEM CLEAR UNCOMPRESSED CACHEbefore the first cached read, as04326_json_advanced_shared_data_file_opendoes for the mark cache. The 13 blocks then fit without eviction under every policy. The assertion is unchanged.Validation (debug build, 128 MiB caches pre-filled with 2035 blocks that were all hit): under SIEVE the old test failed 3/3 with exactly
0 400518 0(on s3 storage0 262466 5), and the new one passed 3/3. It also passed 20/20 runs each under SIEVE, SIEVE on s3 storage, and SLRU. With an 8 MiB pre-filled cache the old test failed 10/10 and the new one passed 50/50.Workflow [PR]
Sync PR [sync-upstream/pr/125561]
Version info
26.10.1.2297-master(included in26.10and later)