From 41a6e9dad79c921134e44cf974b6b7ca3b84e538 Mon Sep 17 00:00:00 2001 From: Daniele Sciascia Date: Wed, 28 Oct 2020 14:37:46 +0100 Subject: [PATCH] Address review comments Removed unnecessary assertion in transaction::before_commit(). Assert client state and mode in client_state::xa_detach(). --- include/wsrep/client_state.hpp | 2 ++ src/transaction.cpp | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/wsrep/client_state.hpp b/include/wsrep/client_state.hpp index fd68eb1..7d4eaf4 100644 --- a/include/wsrep/client_state.hpp +++ b/include/wsrep/client_state.hpp @@ -601,6 +601,8 @@ namespace wsrep */ void xa_detach() { + assert(mode_ == m_local); + assert(state_ == s_none || state_ == s_exec); transaction_.xa_detach(); } diff --git a/src/transaction.cpp b/src/transaction.cpp index d02f5f2..b3af8a1 100644 --- a/src/transaction.cpp +++ b/src/transaction.cpp @@ -484,7 +484,6 @@ int wsrep::transaction::before_commit() if (ret == 0 && state() == s_prepared) { - assert(state() == s_prepared); ret = certify_commit(lock); assert((ret == 0 && state() == s_committing) || (state() == s_must_abort ||