feat: Add state sync available checkpoint content gap test#11800
Open
semenov-vladyslav wants to merge 1 commit into
Open
feat: Add state sync available checkpoint content gap test#11800semenov-vladyslav wants to merge 1 commit into
semenov-vladyslav wants to merge 1 commit into
Conversation
bingyanglin
reviewed
Jun 9, 2026
| // ~40 retry cycles fire for checkpoint 1. If push_back were used | ||
| // (pre-fix), checkpoints 2–5 would advance the watermark to 5 within | ||
| // this window. | ||
| tokio::time::sleep(Duration::from_secs(2)).await; |
Contributor
There was a problem hiding this comment.
Not sure a fixed 2s here is good especially for a heavy/slow CI box, and it might be even safer to add an assertion here like
// e.g. before the watermark assert:
assert!(
store_2.get_full_checkpoint_contents_by_sequence_number(2).is_some(),
"content loop did not even fetch seq 2 within the window — test is not exercising the gap",
);so we can prove the loop ran and still refused to advance.
How do you think?
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.
Description of change
This PR add a reproducer test for a fix in #11485. Before the fix a missing checkpoint would be pushed to the end of retry queue, causing state sync to try and fetch the following checkpoint thus breaking the invariant. The test simulates a gap in the available checkpoint contents and checks that the state sync does not break the invariant. Without the fix (with
checkpoint_contents_tasks.push_back) the test fails.Links to any relevant issues
Fixes #11496
How the change has been tested