Skip to content

tests/rm_stm: wait for STM replay before LSO check after restart#30369

Open
ballard26 wants to merge 1 commit intoredpanda-data:devfrom
ballard26:CORE-16227
Open

tests/rm_stm: wait for STM replay before LSO check after restart#30369
ballard26 wants to merge 1 commit intoredpanda-data:devfrom
ballard26:CORE-16227

Conversation

@ballard26
Copy link
Copy Markdown
Contributor

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

  • none - not a bug fix
  • none - this is a backport
  • none - issue does not exist in previous branches
  • none - papercut/not impactful enough to backport
  • v26.1.x
  • v25.3.x
  • v25.2.x

Release Notes

  • none

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.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 return model::invalid_lso after restart.
  • Keeps the existing semantic assertion that LSO remains held back by open transactions.

@vbotbuildovich
Copy link
Copy Markdown
Collaborator

Retry command for Build#83973

please wait until all jobs are finished before running the slash command

/ci-repeat 1
skip-redpanda-build
skip-units
skip-rebase
tests/rptest/tests/cluster_linking_e2e_test.py::ShadowLinkingReplicationTests.test_with_restart@{"storage_mode":"tiered_cloud"}

@vbotbuildovich
Copy link
Copy Markdown
Collaborator

CI test results

test results on build#83973
test_status test_class test_method test_arguments test_kind job_url passed reason test_history
FLAKY(FAIL) ShadowLinkingReplicationTests test_with_restart {"storage_mode": "tiered_cloud"} integration https://buildkite.com/redpanda/redpanda/builds/83973#019deaa7-71d5-43cf-851d-c0c0e5ea6d2d 16/21 Test FAILS after retries.Significant increase in flaky rate(baseline=0.0123, p0=0.0001, reject_threshold=0.0100) https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=ShadowLinkingReplicationTests&test_method=test_with_restart

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants