1
0
mirror of https://github.com/codership/wsrep-lib.git synced 2026-10-23 09:48:57 +03:00

Fix locking in commit_or_rollback_by_xid()

The provider::certify() call may be synchronous and blocking.
Unlock the mutex for the duration of provider::certify() call
to avoid deadlock if an applier tries to access the local transaction
which is executing provider::certify() call.
This commit is contained in:
Teemu Ollakka
2025-12-31 11:02:52 +02:00
parent 2dc8339ff1
commit e9c1936cfd

View File

@@ -1200,13 +1200,13 @@ int wsrep::transaction::commit_or_rollback_by_xid(const wsrep::xid& xid,
sa->transaction().id(),
client_state_.id());
wsrep::ws_meta meta(stid);
lock.unlock();
const enum wsrep::provider::status cert_ret(
provider().certify(client_state_.id(),
ws_handle_,
flags(),
meta, nullptr));
lock.lock();
int ret;
if (cert_ret == wsrep::provider::success)
{