From 4d59ade77b4f1f9a3eca8ed897947c84feb5b43b Mon Sep 17 00:00:00 2001 From: Teemu Ollakka Date: Wed, 4 Jul 2018 08:39:20 +0300 Subject: [PATCH] Always call provider bf_abort for active transactions in transaction::bf_abort(). Check if the state is s_must_abort before changing the state to s_must_abort when entering a critical section. --- src/transaction.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/transaction.cpp b/src/transaction.cpp index ff8ab8e..b6e9c1d 100644 --- a/src/transaction.cpp +++ b/src/transaction.cpp @@ -599,12 +599,6 @@ bool wsrep::transaction::bf_abort( { WSREP_TC_LOG_DEBUG(1, "Transaction not active, skipping bf abort"); } - else if (ordered() && seqno() < bf_seqno) - { - WSREP_TC_LOG_DEBUG(1, - "Not allowed to BF abort transaction ordered before " - << "aborter: " << seqno() << " < " << bf_seqno); - } else { switch (state()) @@ -838,7 +832,10 @@ int wsrep::transaction::certify_commit( { lock.lock(); client_state_.override_error(wsrep::e_size_exceeded_error); - state(lock, s_must_abort); + if (state_ != s_must_abort) + { + state(lock, s_must_abort); + } return 1; } @@ -846,7 +843,10 @@ int wsrep::transaction::certify_commit( { lock.lock(); client_state_.override_error(wsrep::e_interrupted_error); - state(lock, s_must_abort); + if (state_ != s_must_abort) + { + state(lock, s_must_abort); + } return 1; }