From db71eb0fb6bdcdaac598b79226faddd96b43ac7e Mon Sep 17 00:00:00 2001 From: sjaakola Date: Mon, 3 Dec 2018 11:50:48 +0200 Subject: [PATCH] codership/wsrep-lib#29 non-active transaction abort bf_abort() has been extended to abort also non active transactions With this fix, mtr test galera.galera_concurrent_ctas is supposed to pass --- src/transaction.cpp | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/transaction.cpp b/src/transaction.cpp index 5065b2cd..6d2e4bac 100644 --- a/src/transaction.cpp +++ b/src/transaction.cpp @@ -848,7 +848,27 @@ bool wsrep::transaction::bf_abort( if (active() == false) { - WSREP_TC_LOG_DEBUG(1, "Transaction not active, skipping bf abort"); + WSREP_TC_LOG_DEBUG(1, "Aborting non-active transaction"); + wsrep::seqno victim_seqno; + enum wsrep::provider::status status( + client_state_.provider().bf_abort(bf_seqno, id_, victim_seqno)); + switch (status) + { + case wsrep::provider::success: + WSREP_TC_LOG_DEBUG(1, "Seqno " << bf_seqno + << " succesfully BF aborted non-active " << id_ + << " victim_seqno " << victim_seqno); + bf_abort_state_ = state(); + ret = true; + break; + default: + WSREP_TC_LOG_DEBUG(1, + "Seqno " << bf_seqno + << " failed to BF abort non-active" << id_ + << " with status " << status + << " victim_seqno " << victim_seqno); + break; + } } else {