1
0
mirror of https://github.com/codership/wsrep-lib.git synced 2025-07-20 01:03:16 +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:
Teemu Ollakka
2019-06-06 15:50:58 +03:00
parent 1267e29b8f
commit 85a03394cc
12 changed files with 182 additions and 9 deletions

View File

@ -755,6 +755,18 @@ namespace wsrep
*/
int end_nbo_phase_one();
/**
* Enter in NBO mode. This method should be called when the
* applier launches the asynchronous process to perform the
* operation. The purpose of the call is to adjust
* the state and set write set meta data.
*
* @param ws_meta Write set meta data.
*
* @return Zero in case of success, non-zero on failure.
*/
int enter_nbo_mode(const wsrep::ws_meta& ws_meta);
/**
* Begin non-blocking operation phase two. The keys argument
* passed to this call must contain the same keys which were

View File

@ -161,6 +161,25 @@ namespace wsrep
const wsrep::const_buffer& ws,
wsrep::mutable_buffer& err) = 0;
/**
* Apply NBO begin event.
*
* The responsibility of the implementation is to start
* an asynchronous process which will complete the operation.
* The call is done under total order isolation, and the
* isolation is released by the caller after the method
* returns. It is a responsibility of the asynchronous process
* to complete the second phase of NBO.
*
* @param ws_meta Write set meta data.
* @param data Buffer containing the command to execute.
*
* @return Zero in case of success, non-zero if the asynchronous
* process could not be started.
*/
virtual int apply_nbo_begin(const wsrep::ws_meta& ws_meta,
const wsrep::const_buffer& data) = 0;
/**
* Actions to take after applying a write set was completed.
*/