mirror of
https://github.com/codership/wsrep-lib.git
synced 2026-10-23 09:48:57 +03:00
MDEV-38843: WSREP: BF applier failed on a node causing complete Cluster lockup
Issue: When an applier commit fails (e.g. commit order could not be entered because the node is leaving the primary component), the caller skipped after_apply() and left the transaction active. It is then carried to client_state::close(), which runs the local-only after_statement() and asserts client_state_.mode() == m_local in debug builds. Solution: On commit failure roll the applier transaction back and always call after_apply() so it is terminated on the error path, mirroring the apply-error branch.
This commit is contained in:
@@ -336,7 +336,14 @@ static int apply_write_set(wsrep::server_state& server_state,
|
||||
{
|
||||
assert(err.size() == 0);
|
||||
ret = high_priority_service.commit(ws_handle, ws_meta);
|
||||
ret = ret || (high_priority_service.after_apply(), 0);
|
||||
// Commit may fail if commit order could not be entered, e.g.
|
||||
// the node left the primary component. Roll back the
|
||||
// still-active applier transaction; after_apply() cleans up.
|
||||
if (ret)
|
||||
{
|
||||
high_priority_service.rollback(ws_handle, ws_meta);
|
||||
}
|
||||
high_priority_service.after_apply();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user