Repository navigation
Fix flaky test 05394_filesystem_cache_slru_promote_partial_segment - #126174
Merged
alexey-milovidov merged 1 commit intoOct 16, 2026
Merged
alexey-milovidov merged 1 commit into
alexey-milovidov merged 1 commit into
Conversation
The test mark cache (128 MiB) is shared with all concurrently running tests. When it evicts the table's marks between `second_1` and `scan`, the scan reloads `key.cmrk2` and `value.cmrk2` through the test's filesystem cache. `first_1` downloaded each of them as one complete segment in the probationary queue, so the scan's hits promote both and the scan row reads `scan 1 0 1`. The failing CI run's query_log shows it: the scan has MarkCacheMisses = 2, LoadedMarksFiles = 2, Promoted = 2, and the only 898 bytes it read from the cache are the mark files. Subtract LoadedMarksFiles from the promotion count. One mark file load reads one small file and promotes at most one segment, so the difference never exceeds the data-segment promotions; without a mark reload the check is unchanged. UInt64 - UInt64 is Int64, so a reload of marks that are already protected gives a negative value, not a wrap-around. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Collaborator
Author
Internal review before publication: 0 blocking findingsOwn review and a second-model review of
|
Contributor
|
Workflow [PR], commit [0fe2526] Summary: ✅ AI ReviewSummaryPR #126174 ( Missing context / blind spots
Final VerdictStatus: ✅ Approve. |
Collaborator
Author
|
cc @CheSema, could you review this? When the shared mark cache evicts the table's marks, the scan in 05394 reloads both mark files through the test's filesystem cache and promotes their segments, so the check now subtracts |
alexey-milovidov
approved these changes
Oct 16, 2026
Merged
via the queue into
ClickHouse:master
with commit Oct 16, 2026
923af96
353 of 354 checks passed
This was referenced Oct 16, 2026
JTCunning
pushed a commit
to JTCunning/ClickHouse
that referenced
this pull request
Oct 17, 2026
…ents" Reverts ClickHouse#125657 and its test fix ClickHouse#126174: suspected of breaking CI.
opensource-fork-sync Bot
pushed a commit
to cla7aye15I4nd/opensource-ClickHouse__ClickHouse
that referenced
this pull request
Nov 3, 2026
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.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Not required.
Description
Related: #125657
Failure:
Stateless tests (arm_binary, parallel)on PR #107567:-scan 0 0 1/+scan 1 0 1, so the scan counted 2 promotions where the test expects none. The same diff appeared at 3 commits of #125657's own CI.The 128 MiB test mark cache is shared with all concurrently running tests. When it evicts this table's marks between
second_1andscan, the scan reloadskey.cmrk2andvalue.cmrk2through the test's filesystem cache.first_1downloaded each of them as one complete segment in the probationary queue, so the scan's hits promote both. The failing run'squery_logshows exactly that: the scan hasMarkCacheMisses = 2,LoadedMarksFiles = 2, and the only 898 bytes it read from the cache are the two mark files.The check now counts
FilesystemCachePromotedFileSegments - LoadedMarksFiles. A mark file load reads one small file, so it promotes at most one segment, and the difference never exceeds the data-segment promotions. When no marks are reloaded, the check is unchanged.Validation (debug build):
SYSTEM DROP MARK CACHEbefore the scan: the unchanged test fails 21/21 with the CI diff and the CI's counters; the fixed test passes 11/11.+scan 1 0 1), fixed 50/50 OK, with 8 of those scans hitting the trigger.promoted = 1under the new check. 50/50 OK without the loop.Workflow [PR]
Sync PR [sync-upstream/pr/126174]
Version info
26.11.1.44-master(included in26.11and later)