Repository navigation
Fix flaky test 03254_prewarm_mark_cache_rmt with the columns cache - #127866
alexey-milovidov merged 1 commit into
Conversation
Since ClickHouse#127287 the columns cache also serves compact parts. The runner randomizes `use_columns_cache` + `enable_reads_from_columns_cache` + `enable_writes_to_columns_cache`. When all three are on and the parts are compact, the read after ATTACH fills the cache (DETACH destroys the parts and removes their entries), and `SYSTEM CLEAR MARK CACHE` does not drop it. The next `SELECT ... WHERE NOT ignore(*)`, the test's positive control ("a read after clearing the mark cache loads marks"), is then served entirely from the columns cache and requests no marks. Only the speculative async marks load scheduled by the compact reader can still count `LoadedMarksCount`, and it is cancelled when the reader finishes first, so the reference `1` becomes `0` in a fraction of runs. Under the same settings the expected-0 "prewarm worked" rows are vacuous, since a cache-served read loads no marks either way. Disable the columns cache for the whole test, as 2376801 did for the sibling 03254_prewarm_mark_cache_columns. A session SET beats the runner's injected value and also holds where randomization is off. 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; 2 findings).
Severity: ❌ blocker / Session id: cron:clickhouse-review-slot-8:20261026-172500 |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-7:20261026-171000 |
|
Workflow [PR], commit [ea55f64] Summary: ✅ AI ReviewSummaryPR #127866 disables Final VerdictStatus: ✅ Approve. |
|
cc @rschu1ze, could you review this and add the |
8ea1384
Related: #127287
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fix the flaky test
03254_prewarm_mark_cache_rmt, which failed with a randomizeduse_columns_cache = 1since the columns cache also serves compact parts.Description
03254_prewarm_mark_cache_rmtfails with reference line 151->0since #127287 merged, on unrelated PRs (amd_debug report, arm_binary report). Both runs drewuse_columns_cache,enable_reads_from_columns_cacheandenable_writes_to_columns_cache= 1 with compact parts.The read right after
ATTACHfills the columns cache, andSYSTEM CLEAR MARK CACHEdoes not drop it. The nextSELECT ... WHERE NOT ignore(*), the test's check that a read after clearing the mark cache loads marks, is then served from the columns cache and requests no marks. Only the compact reader's speculative async marks load can still countLoadedMarksCount, and it is cancelled when the reader finishes first.The test now sets
use_columns_cache = 0, as 2376801 did for the sibling03254_prewarm_mark_cache_columns. A sessionSETwins over the runner's injected value and also holds in lanes without randomization.Validation on a master debug build that contains #127287: with the three cache settings,
load_marks_asynchronously = 0and compact parts, the unmodified test fails 10/10 with the CI diff (the 7th SELECT has 15 columns cache hits and loads 0 marks); with the exact CI settings of the amd_debug report it fails 80/90, each time with the async marks task cancelled. With the fix it passes 10/10 and 90/90 with 0 columns cache hits or misses and marks loaded by the 7th SELECT every time; 50/50 randomized runs and a no-randomization run pass. The sibling03985_prewarm_index_mark_cachepasses 20/20 under the same settings while the cache serves its data (its index marks are loaded during index analysis), so it is unchanged.🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/127866]
Version info
26.11.1.859-master(included in26.11and later)