Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions src/v/cluster/tests/rm_stm_tests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1237,9 +1237,14 @@ FIXTURE_TEST(
BOOST_REQUIRE(producers().contains(pid1.get_id()));
BOOST_REQUIRE(producers().contains(pid2.get_id()));

// Ensure the LSO is held back by the open transactions.
auto lso = stm->last_stable_offset();
BOOST_REQUIRE_NE(lso, model::invalid_lso);
// Ensure the LSO is held back by the open transactions. After restart
// the STM has applied through the snapshot offset; data batches replay
// asynchronously, so wait for last_stable_offset() to become valid.
model::offset lso;
RPTEST_REQUIRE_EVENTUALLY(10s, [&]() {
lso = stm->last_stable_offset();
return lso != model::invalid_lso;
});
BOOST_REQUIRE_LE(lso, model::offset(last_data_offset()));

// Ensure pid1's transaction can be committed
Expand Down
Loading