mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-07-30 07:23:07 +03:00
TOI replicating and applying codepaths
This commit is contained in:
@ -6,15 +6,23 @@
|
||||
#include "mock_client_state.hpp"
|
||||
|
||||
|
||||
int wsrep::mock_client_service::apply(
|
||||
int wsrep::mock_client_service::apply_write_set(
|
||||
const wsrep::const_buffer&)
|
||||
|
||||
{
|
||||
assert(client_state_.toi_meta().seqno().is_undefined());
|
||||
assert(client_state_.transaction().state() == wsrep::transaction::s_executing ||
|
||||
client_state_.transaction().state() == wsrep::transaction::s_replaying);
|
||||
return (fail_next_applying_ ? 1 : 0);
|
||||
}
|
||||
|
||||
int wsrep::mock_client_service::apply_toi(const wsrep::const_buffer&)
|
||||
{
|
||||
assert(client_state_.transaction().active() == false);
|
||||
assert(client_state_.toi_meta().seqno().is_undefined() == false);
|
||||
return (fail_next_toi_ ? 1 : 0);
|
||||
}
|
||||
|
||||
int wsrep::mock_client_service::commit(
|
||||
const wsrep::ws_handle&, const wsrep::ws_meta&)
|
||||
{
|
||||
|
@ -47,6 +47,7 @@ namespace wsrep
|
||||
, is_autocommit_()
|
||||
, do_2pc_()
|
||||
, fail_next_applying_()
|
||||
, fail_next_toi_()
|
||||
, bf_abort_during_wait_()
|
||||
, error_during_prepare_data_()
|
||||
, killed_before_certify_()
|
||||
@ -58,7 +59,9 @@ namespace wsrep
|
||||
, aborts_()
|
||||
{ }
|
||||
|
||||
int apply(const wsrep::const_buffer&) WSREP_OVERRIDE;
|
||||
int apply_write_set(const wsrep::const_buffer&) WSREP_OVERRIDE;
|
||||
|
||||
int apply_toi(const wsrep::const_buffer&) WSREP_OVERRIDE;
|
||||
|
||||
int commit(const wsrep::ws_handle&, const wsrep::ws_meta&)
|
||||
WSREP_OVERRIDE;
|
||||
@ -169,6 +172,7 @@ namespace wsrep
|
||||
bool is_autocommit_;
|
||||
bool do_2pc_;
|
||||
bool fail_next_applying_;
|
||||
bool fail_next_toi_;
|
||||
bool bf_abort_during_wait_;
|
||||
bool error_during_prepare_data_;
|
||||
bool killed_before_certify_;
|
||||
|
Reference in New Issue
Block a user