1
0
mirror of https://github.com/codership/wsrep-lib.git synced 2025-07-31 18:24:25 +03:00

Added timeout option to enter_toi_local() and begin_nbo_phase_one()

If timeout option is give, enter_toi_local() and begin_nbo_phase_one()
retry provider::enter_toi() as long as return status indicates
certification failure, given timeout expires or the client is interrupted.
This commit is contained in:
Teemu Ollakka
2019-09-04 15:32:16 +03:00
parent b46f89f4ce
commit 55fdbb7a05
3 changed files with 65 additions and 32 deletions

View File

@ -33,9 +33,7 @@ BOOST_FIXTURE_TEST_CASE(test_toi_mode,
key.append_key_part("k2", 2);
wsrep::key_array keys{key};
wsrep::const_buffer buf("toi", 3);
BOOST_REQUIRE(cc.enter_toi_local(keys, buf,
wsrep::provider::flag::start_transaction |
wsrep::provider::flag::commit) == 0);
BOOST_REQUIRE(cc.enter_toi_local(keys, buf) == 0);
BOOST_REQUIRE(cc.mode() == wsrep::client_state::m_toi);
BOOST_REQUIRE(cc.in_toi());
BOOST_REQUIRE(cc.toi_mode() == wsrep::client_state::m_local);