mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-11 18:35:46 +02:00
fix: forbid parallel save operations (#2172)
* fix: forbid parallel save operations * feat: add SAVE option to takeover command
This commit is contained in:
parent
c10dac4db2
commit
e6f3522d59
18 changed files with 165 additions and 83 deletions
|
@ -87,8 +87,9 @@ class Service : public facade::ServiceInterface {
|
|||
// Returns: the new state.
|
||||
// if from equals the old state then the switch is performed "to" is returned.
|
||||
// Otherwise, does not switch and returns the current state in the system.
|
||||
// true if operation is successed
|
||||
// Upon switch, updates cached global state in threadlocal ServerState struct.
|
||||
GlobalState SwitchState(GlobalState from, GlobalState to);
|
||||
std::pair<GlobalState, bool> SwitchState(GlobalState from, GlobalState to);
|
||||
|
||||
GlobalState GetGlobalState() const;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue