mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-07-28 20:02:00 +03:00
NBO applying
- High priority interface method to apply NBO begin, separate from apply_toi() in order to avoid implementation to force interpreting ws_meta flags. - Method to put client_state into NBO mode when applying NBO begin. The client_state will process in m_local mode. - Unit tests for applying NBO
This commit is contained in:
@ -500,6 +500,17 @@ int wsrep::client_state::end_nbo_phase_one()
|
||||
return ret;
|
||||
}
|
||||
|
||||
int wsrep::client_state::enter_nbo_mode(const wsrep::ws_meta& ws_meta)
|
||||
{
|
||||
assert(state_ == s_exec);
|
||||
assert(mode_ == m_local);
|
||||
wsrep::unique_lock<wsrep::mutex> lock(mutex_);
|
||||
toi_meta_ = ws_meta;
|
||||
toi_mode_ = mode_;
|
||||
mode(lock, m_nbo);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int wsrep::client_state::begin_nbo_phase_two(const wsrep::key_array& keys)
|
||||
{
|
||||
assert(state_ == s_exec);
|
||||
|
@ -463,8 +463,10 @@ static int apply_toi(wsrep::provider& provider,
|
||||
}
|
||||
else if (wsrep::starts_transaction(ws_meta.flags()))
|
||||
{
|
||||
// NBO begin
|
||||
throw wsrep::not_implemented_error();
|
||||
provider.commit_order_enter(ws_handle, ws_meta);
|
||||
int ret(high_priority_service.apply_nbo_begin(ws_meta, data));
|
||||
provider.commit_order_leave(ws_handle, ws_meta);
|
||||
return ret;
|
||||
}
|
||||
else if (wsrep::commits_transaction(ws_meta.flags()))
|
||||
{
|
||||
|
Reference in New Issue
Block a user