1
0
mirror of https://github.com/codership/wsrep-lib.git synced 2025-07-02 05:22:26 +03:00

Implemented convenience methods to desync/pause, resume/resync.

This commit is contained in:
Teemu Ollakka
2018-07-04 18:12:42 +03:00
parent 2668d85ebf
commit b3de50fa05
2 changed files with 51 additions and 17 deletions

View File

@ -371,6 +371,21 @@ namespace wsrep
void resume();
/**
* Desync and pause the provider on one go. Will return
* pause seqno if successful. In case of failure,
* undefined seqno will be returned.
*/
wsrep::seqno desync_and_pause();
/**
* Resume and resync the provider on one go. Prior this
* call the provider must have been both desynced and paused,
* by either desync_and_pause() or separate calls to desync()
* and pause().
*/
void resume_and_resync();
/**
* Prepares server state for SST.
*
@ -508,7 +523,6 @@ namespace wsrep
, desync_count_()
, pause_count_()
, pause_seqno_()
, desynced_on_pause_()
, streaming_appliers_()
, provider_()
, name_(name)
@ -548,7 +562,6 @@ namespace wsrep
size_t desync_count_;
size_t pause_count_;
wsrep::seqno pause_seqno_;
bool desynced_on_pause_;
typedef std::map<std::pair<wsrep::id, wsrep::transaction_id>, wsrep::high_priority_service*> streaming_appliers_map;
streaming_appliers_map streaming_appliers_;
wsrep::provider* provider_;