From e9c1936cfdfd93d5f9acdb1ec5bbc7231fe64643 Mon Sep 17 00:00:00 2001 From: Teemu Ollakka Date: Wed, 31 Dec 2025 11:02:52 +0200 Subject: [PATCH] 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. --- src/transaction.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/transaction.cpp b/src/transaction.cpp index 6647cfc..bf26266 100644 --- a/src/transaction.cpp +++ b/src/transaction.cpp @@ -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) {