mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-07-30 07:23:07 +03:00
codership/wsrep-lib#34 Provided a method to interrupt state waiters
Intruduced server_state::interrupt_state_waiters() to interrupt all waiters inside server_state::wait_until_state(). This mechanism is needed when an error is encountered during state change processing and waiting threads may need to be interrupted to check and handle the error condition. Made server_state::wait_until_state() to throw exception if the wait was interrupted and the new server state is either disconnecting or disconnected, which usually indicates error condition.
This commit is contained in:
@ -600,6 +600,8 @@ namespace wsrep
|
||||
void resync(wsrep::unique_lock<wsrep::mutex>&);
|
||||
void state(wsrep::unique_lock<wsrep::mutex>&, enum state);
|
||||
void wait_until_state(wsrep::unique_lock<wsrep::mutex>&, enum state) const;
|
||||
// Interrupt all threads which are waiting for state
|
||||
void interrupt_state_waiters(wsrep::unique_lock<wsrep::mutex>&);
|
||||
// Close SR transcations whose origin is outside of current
|
||||
// cluster view.
|
||||
void close_orphaned_sr_transactions(
|
||||
|
Reference in New Issue
Block a user