fix: deflake //rs/state_layout:state_layout_test#9203
Merged
basvandijk merged 2 commits intomasterfrom Mar 6, 2026
Merged
Conversation
schneiderstefan
approved these changes
Mar 6, 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.
Root Cause
The
checkpoints_files_are_removed_after_flushing_removal_channeltest creates 20 checkpoints with 500 dummy files each (10,000 files total), then removes 19 of them (9,500 file deletions) through the async removal channel. On busy CI machines with limited I/O bandwidth, this excessive file I/O causes the entire test binary to exceed its timeout.The 500 files per checkpoint were intended to create backlog in the checkpoint removal channel, so that we can do some assertions while the backlog is still clearing (namely that the checkpoint is no longer in the list of verified checkpoints), and other assertions after it is cleared (namely that the files are deleted from disk).
Fix
Reduce the dummy file count from 500 to 50 per checkpoint. This drops total file I/O from ~10,000 to ~1000 files. It strikes a balance between ensuring that the backlog definitely didn't clear before the assertion and overall I/O load. If this reduction is not enough, then we can consider adding artificial blockers to the backlog, but it seems not necessary for this test atm.
This PR was created following the steps in
.claude/skills/fix-flaky-tests/SKILL.md.