mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-07-28 20:02:00 +03:00
MDEV-26266 Fix error handling around remove_fragments()
Handle the case where client_service::remove_fragments() fails, for reasons other than bf abort. In this case, we want to make sure that the transaction state is moved to s_must_abort, so that we satisfy the sanity check at the end of before_prepare(): ``` assert(state() == s_preparing || (is_xa() && state() == s_replaying) || (ret && (state() == s_must_abort || state() == s_must_replay || state() == s_cert_failed || state() == s_aborted))); ```
This commit is contained in:
@ -312,6 +312,12 @@ int wsrep::transaction::before_prepare(
|
||||
ret = client_service_.remove_fragments();
|
||||
if (ret)
|
||||
{
|
||||
lock.lock();
|
||||
if (state() == s_executing)
|
||||
{
|
||||
state(lock, s_must_abort);
|
||||
}
|
||||
lock.unlock();
|
||||
client_state_.override_error(wsrep::e_deadlock_error);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user