mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-07-30 07:23:07 +03:00
codership/wsrep-lib#52 Removed client_service do_2pc()
This commit is contained in:
@ -77,9 +77,6 @@ namespace wsrep
|
||||
|
||||
int bf_rollback() WSREP_OVERRIDE;
|
||||
|
||||
bool do_2pc() const WSREP_OVERRIDE
|
||||
{ return do_2pc_; }
|
||||
|
||||
bool interrupted() const WSREP_OVERRIDE
|
||||
{ return killed_before_certify_; }
|
||||
|
||||
|
@ -48,7 +48,7 @@ int wsrep::mock_high_priority_service::commit(
|
||||
{
|
||||
int ret(0);
|
||||
client_state_->prepare_for_ordering(ws_handle, ws_meta, true);
|
||||
if (client_state_->client_service().do_2pc())
|
||||
if (do_2pc_)
|
||||
{
|
||||
ret = client_state_->before_prepare() ||
|
||||
client_state_->after_prepare();
|
||||
|
@ -33,6 +33,7 @@ namespace wsrep
|
||||
wsrep::mock_client_state* client_state,
|
||||
bool replaying)
|
||||
: wsrep::high_priority_service(server_state)
|
||||
, do_2pc_()
|
||||
, fail_next_applying_()
|
||||
, fail_next_toi_()
|
||||
, client_state_(client_state)
|
||||
@ -74,6 +75,7 @@ namespace wsrep
|
||||
{
|
||||
return client_state_;
|
||||
}
|
||||
bool do_2pc_;
|
||||
bool fail_next_applying_;
|
||||
bool fail_next_toi_;
|
||||
private:
|
||||
|
@ -226,6 +226,7 @@ BOOST_FIXTURE_TEST_CASE(server_state_applying_1pc,
|
||||
BOOST_FIXTURE_TEST_CASE(server_state_applying_2pc,
|
||||
applying_server_fixture)
|
||||
{
|
||||
hps.do_2pc_ = true;
|
||||
char buf[1] = { 1 };
|
||||
BOOST_REQUIRE(ss.on_apply(hps, ws_handle, ws_meta,
|
||||
wsrep::const_buffer(buf, 1)) == 0);
|
||||
@ -251,6 +252,7 @@ BOOST_FIXTURE_TEST_CASE(server_state_applying_1pc_rollback,
|
||||
BOOST_FIXTURE_TEST_CASE(server_state_applying_2pc_rollback,
|
||||
applying_server_fixture)
|
||||
{
|
||||
hps.do_2pc_ = true;
|
||||
hps.fail_next_applying_ = true;
|
||||
char buf[1] = { 1 };
|
||||
BOOST_REQUIRE(ss.on_apply(hps, ws_handle, ws_meta,
|
||||
|
Reference in New Issue
Block a user