1
0
mirror of https://github.com/codership/wsrep-lib.git synced 2025-07-28 20:02:00 +03:00

Handle BF abort during fragment removal

Fragment removal for SR transaction is done in transaction context
to make it atomic. However, this means that if the BF abort arrives
during fragment removal, the transaction may be rolled back inside
client_service::remove_fragments(), and client_state::after_prepare()
is left in aborted state. This case was not handled in the
post condition checks of after_prepare().

Fixed assertion in after_prepare() and implemented unit test.
This commit is contained in:
Teemu Ollakka
2019-02-15 11:44:17 +02:00
parent 9c387ef82f
commit 8c2daa7e3d
3 changed files with 37 additions and 2 deletions

View File

@ -321,7 +321,8 @@ int wsrep::transaction::before_prepare(
assert(state() == s_preparing ||
(ret && (state() == s_must_abort ||
state() == s_must_replay ||
state() == s_cert_failed)));
state() == s_cert_failed ||
state() == s_aborted)));
debug_log_state("before_prepare_leave");
return ret;
}