From 958a916b25d216d84425d01f8832dec501080f7e Mon Sep 17 00:00:00 2001 From: Teemu Ollakka Date: Mon, 9 Jul 2018 13:23:16 +0300 Subject: [PATCH] * Don't set ordering meta data for replaying transaction * Renamed transaction prepare_for_fragment_ordering() to prepare_for_ordering() --- include/wsrep/client_state.hpp | 2 +- include/wsrep/transaction.hpp | 6 +++--- src/transaction.cpp | 12 +++++++----- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/include/wsrep/client_state.hpp b/include/wsrep/client_state.hpp index 402d112..8119cc9 100644 --- a/include/wsrep/client_state.hpp +++ b/include/wsrep/client_state.hpp @@ -329,7 +329,7 @@ namespace wsrep bool is_commit) { assert(state_ == s_exec); - return transaction_.prepare_for_fragment_ordering( + return transaction_.prepare_for_ordering( ws_handle, ws_meta, is_commit); } /** @} */ diff --git a/include/wsrep/transaction.hpp b/include/wsrep/transaction.hpp index 7af1ac2..5ce5579 100644 --- a/include/wsrep/transaction.hpp +++ b/include/wsrep/transaction.hpp @@ -87,9 +87,9 @@ namespace wsrep int start_transaction(const wsrep::ws_handle& ws_handle, const wsrep::ws_meta& ws_meta); - int prepare_for_fragment_ordering(const wsrep::ws_handle& ws_handle, - const wsrep::ws_meta& ws_meta, - bool is_commit); + int prepare_for_ordering(const wsrep::ws_handle& ws_handle, + const wsrep::ws_meta& ws_meta, + bool is_commit); int start_replaying(const wsrep::ws_meta&); diff --git a/src/transaction.cpp b/src/transaction.cpp index 32a28af..d08ca4a 100644 --- a/src/transaction.cpp +++ b/src/transaction.cpp @@ -155,17 +155,19 @@ int wsrep::transaction::start_transaction( return 0; } -int wsrep::transaction::prepare_for_fragment_ordering( +int wsrep::transaction::prepare_for_ordering( const wsrep::ws_handle& ws_handle, const wsrep::ws_meta& ws_meta, bool is_commit) { assert(active()); - ws_handle_ = ws_handle; - ws_meta_ = ws_meta; - certified_ = is_commit; - + if (state_ != s_replaying) + { + ws_handle_ = ws_handle; + ws_meta_ = ws_meta; + certified_ = is_commit; + } return 0; }