mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-07-28 20:02:00 +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:
@ -364,7 +364,7 @@ namespace
|
||||
}
|
||||
catch (const wsrep::runtime_error& e)
|
||||
{
|
||||
std::cerr << "Exception: " << e.what();
|
||||
wsrep::log_error() << "Exception: " << e.what();
|
||||
return WSREP_CB_FAILURE;
|
||||
}
|
||||
}
|
||||
@ -389,7 +389,7 @@ namespace
|
||||
}
|
||||
catch (const wsrep::runtime_error& e)
|
||||
{
|
||||
std::cerr << "Exception: " << e.what();
|
||||
wsrep::log_error() << "Exception: " << e.what();
|
||||
return WSREP_CB_FAILURE;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user