1
0
mirror of https://github.com/codership/wsrep-lib.git synced 2025-07-02 05:22:26 +03:00

Fix total order BF abort

Streaming rollback for total order BF abort used regular
BF abort codepath, which was not correct because the streaming
rollback must fully complete before total order operation executes.
Fixed this by adjusting bf_aborted_in_total_order_
before streaming_rollback() gets called.
This commit is contained in:
Teemu Ollakka
2023-03-02 08:24:44 +02:00
parent 7843345a19
commit 19eaed587c
4 changed files with 45 additions and 4 deletions

View File

@ -1406,6 +1406,28 @@ BOOST_FIXTURE_TEST_CASE(transaction_row_streaming_bf_abort_executing,
wsrep::transaction_id(1));
}
BOOST_FIXTURE_TEST_CASE(
transaction_row_streaming_total_order_bf_abort_executing,
streaming_client_fixture_row)
{
BOOST_REQUIRE(cc.start_transaction(wsrep::transaction_id(1)) == 0);
BOOST_REQUIRE(cc.after_row() == 0);
BOOST_REQUIRE(tc.streaming_context().fragments_certified() == 1);
wsrep_test::bf_abort_in_total_order(cc);
BOOST_REQUIRE(tc.bf_aborted_in_total_order());
// TO BF abort must not replicate rollback fragment,
// rollback must complete before TO is allowed to
// continue.
BOOST_REQUIRE(sc.provider().rollback_fragments() == 0);
BOOST_REQUIRE(tc.streaming_context().rolled_back());
BOOST_REQUIRE(cc.before_rollback() == 0);
BOOST_REQUIRE(cc.after_rollback() == 0);
BOOST_REQUIRE(cc.after_statement());
wsrep_test::terminate_streaming_applier(sc, sc.id(),
wsrep::transaction_id(1));
}
//
// Test streaming certification failure during fragment replication
//
@ -1490,8 +1512,6 @@ BOOST_FIXTURE_TEST_CASE(transaction_row_streaming_bf_abort_committing,
BOOST_REQUIRE(sc.provider().commit_fragments() == 1);
}
BOOST_FIXTURE_TEST_CASE(transaction_byte_streaming_1pc_commit,
streaming_client_fixture_byte)
{