Repository navigation
SLRU filesystem cache: promote partially downloaded file segments - #125657
Conversation
A hit moves a partially downloaded file segment to the protected queue. The reader holds the downloader role during the move, so no space reservation runs concurrently. Add `FilesystemCachePromotedFileSegments`. Related: #123607
|
Workflow [PR], commit [34f4c5c] Summary: ✅
AI ReviewSummaryThis PR promotes partially downloaded filesystem cache segments into the Findings
Tests
Missing context / blind spots
Final Verdict |
|
📊 Cloud Performance Report 🟢 AI verdict: This PR lets the SLRU filesystem cache move partially downloaded file segments into the protected queue, and adds a profile event that counts promotions. It does not touch query execution or aggregation code. The large Q20 improvement (-43.2%, with CPU time roughly halved) passes the hard trust override and stands, but the diff only explains it if the benchmark cache runs SLRU and was re-fetching URL column segments before; it is worth checking that against base-commit drift. I downgraded the Q33 and Q34 improvements (-6.5% and -6.4%) to not sure: their PR medians are inside master's current range, and both queries have a noisy history. The Q32 suppression (+10.3%, inside master's range) and the borderline Q28 result (+6.9%) both match a PR with no plausible effect on those queries. clickbench🟢 1 improved · Flagged queries (5 of 43)
Change = percent below ×2; the ratio of medians (×N faster/slower) beyond, where percent understates the scale. q-value = BH-FDR adjusted p; smaller is stronger evidence. MIRAI flags a query when q < fdr_q (default 0.10) — the value the verdict is based on. tpch_adapted_1_official🟢 No significant changes Debug info
|
…queue whole" A file segment larger than an SLRU queue becomes an invalid cache configuration instead. This reverts commit ff840e6.
…ents" Reverts ClickHouse#125657 and its test fix ClickHouse#126174: suspected of breaking CI.
With the
SLRUcache policy, a hit moved a file segment to the protected queue only if it was fully downloaded. A partially downloaded segment stayed in the probationary queue, so a scan could evict the data of narrow reads. WithReaderExecutor, most segments stay partially downloaded.Now the reader that hits a partially downloaded segment holds its downloader role during the move. Only the downloader reserves space, so no reservation runs during the move. After the move, the segment grows in the protected queue. Adds the
FilesystemCachePromotedFileSegmentsprofile event.Adds
FileSegmentWaitWithoutDataandFileSegmentWaitWithoutDataMicroseconds: waits for a concurrent downloader that ended because the downloader released the file segment before it downloaded the awaited offset.Related: #123607
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
The
SLRUfilesystem cache policy now moves a partially downloaded file segment to the protected queue on a cache hit, as it does for a fully downloaded one. Before, a scan could evict the data of narrow reads from the probationary queue.🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/125657]
Version info
26.10.1.2499-master(included in26.10and later)