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

Add provider position field to ws_meta and view

Provider position is needed in coordinated recovery
between application and provider. Pass the position
info from provider to application to allow making
it durable.
This commit is contained in:
Teemu Ollakka
2022-03-22 17:43:52 +02:00
parent 53e60f64c9
commit ba8e23df0d
13 changed files with 123 additions and 86 deletions

View File

@ -50,13 +50,13 @@ BOOST_FIXTURE_TEST_CASE(test_toi_applying,
applying_client_fixture)
{
BOOST_REQUIRE(cc.toi_mode() == wsrep::client_state::m_undefined);
wsrep::ws_meta ws_meta(wsrep::gtid(wsrep::id("1"), wsrep::seqno(2)),
wsrep::stid(sc.id(),
wsrep::transaction_id::undefined(),
cc.id()),
wsrep::seqno(1),
wsrep::provider::flag::start_transaction |
wsrep::provider::flag::commit);
wsrep::ws_meta ws_meta(
wsrep::gtid(wsrep::id("1"), wsrep::seqno(2)),
wsrep::stid(sc.id(), wsrep::transaction_id::undefined(), cc.id()),
wsrep::seqno(1),
wsrep::provider::flag::start_transaction
| wsrep::provider::flag::commit,
0);
cc.enter_toi_mode(ws_meta);
BOOST_REQUIRE(cc.in_toi());
BOOST_REQUIRE(cc.toi_mode() == wsrep::client_state::m_high_priority);