tests/rm_stm: wait for STM replay before LSO check after restart#30369
Open
ballard26 wants to merge 1 commit intoredpanda-data:devfrom
Open
tests/rm_stm: wait for STM replay before LSO check after restart#30369ballard26 wants to merge 1 commit intoredpanda-data:devfrom
ballard26 wants to merge 1 commit intoredpanda-data:devfrom
Conversation
After restart_stm_and_raft() the STM has only applied through the snapshot offset; data batches are still asynchronously replaying, so last_stable_offset() can briefly return invalid_lso. Wrap the check in RPTEST_REQUIRE_EVENTUALLY, mirroring the wait already used at the end of the test.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR stabilizes an rm_stm restart test by accounting for asynchronous log replay after restart_stm_and_raft(). It fits into the cluster transaction test suite by making the post-restart last_stable_offset() assertion wait until the STM has replayed far enough for LSO to become valid.
Changes:
- Replaces an immediate post-restart LSO check with
RPTEST_REQUIRE_EVENTUALLY. - Documents why
last_stable_offset()can transiently returnmodel::invalid_lsoafter restart. - Keeps the existing semantic assertion that LSO remains held back by open transactions.
Collaborator
Retry command for Build#83973please wait until all jobs are finished before running the slash command |
Collaborator
CI test resultstest results on build#83973
|
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.
After restart_stm_and_raft() the STM has only applied through the snapshot offset; data batches are still asynchronously replaying, so last_stable_offset() can briefly return invalid_lso. Wrap the check in RPTEST_REQUIRE_EVENTUALLY, mirroring the wait already used at the end of the test.
Backports Required
Release Notes