mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-07-28 20:02:00 +03:00
Make is_rollbacker_active() public, don't unlock for background rollback
Make is_rollbacker_active() public so that the BF thread can check if the rollbacker was started or not. Also don't unlock the lock for launching the background rollbacker to avoid race conditions in accessing the victim state.
This commit is contained in:
@ -902,6 +902,15 @@ namespace wsrep
|
||||
{
|
||||
return current_error_status_;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if rollbacker is active. The caller should
|
||||
* hold the mutex protecting client_state.
|
||||
*/
|
||||
bool is_rollbacker_active()
|
||||
{
|
||||
return rollbacker_active_;
|
||||
}
|
||||
protected:
|
||||
/**
|
||||
* Client context constuctor. This is protected so that it
|
||||
@ -1007,11 +1016,6 @@ namespace wsrep
|
||||
{
|
||||
rollbacker_active_ = value;
|
||||
}
|
||||
|
||||
bool is_rollbacker_active()
|
||||
{
|
||||
return rollbacker_active_;
|
||||
}
|
||||
};
|
||||
|
||||
static inline const char* to_c_string(
|
||||
|
Reference in New Issue
Block a user