mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-07-30 07:23:07 +03:00
Release TOI critical section in poll_enter_toi() in case of error.
This commit is contained in:
@ -344,6 +344,20 @@ wsrep::client_state::poll_enter_toi(
|
|||||||
{
|
{
|
||||||
lock.unlock();
|
lock.unlock();
|
||||||
status = provider().enter_toi(id_, keys, buffer, toi_meta_, flags);
|
status = provider().enter_toi(id_, keys, buffer, toi_meta_, flags);
|
||||||
|
if (status != wsrep::provider::success &&
|
||||||
|
not toi_meta_.gtid().is_undefined())
|
||||||
|
{
|
||||||
|
// Successfully entered TOI, but the provider reported failure.
|
||||||
|
// This may happen for example if certification fails.
|
||||||
|
// Leave TOI before proceeding.
|
||||||
|
if (provider().leave_toi(id_, wsrep::mutable_buffer()))
|
||||||
|
{
|
||||||
|
wsrep::log_warning()
|
||||||
|
<< "Failed to leave TOI after failure in "
|
||||||
|
<< "poll_enter_toi()";
|
||||||
|
}
|
||||||
|
toi_meta_ = wsrep::ws_meta();
|
||||||
|
}
|
||||||
if (status == wsrep::provider::error_certification_failed)
|
if (status == wsrep::provider::error_certification_failed)
|
||||||
{
|
{
|
||||||
::usleep(100000);
|
::usleep(100000);
|
||||||
|
Reference in New Issue
Block a user