1
0
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:
Teemu Ollakka
2018-06-25 09:28:51 +03:00
parent 6a369a5d0e
commit cad9176474
11 changed files with 324 additions and 169 deletions

View File

@ -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&)
{