diff --git a/include/wsrep/client_state.hpp b/include/wsrep/client_state.hpp index 01a74e2..c17262e 100644 --- a/include/wsrep/client_state.hpp +++ b/include/wsrep/client_state.hpp @@ -382,6 +382,18 @@ namespace wsrep state_ == s_quitting); return transaction_.after_rollback(); } + + /** + * This method should be called by the background rollbacker + * thread after the rollback is complete. This will allow + * the client to proceed with command execution. + */ + void sync_rollback_complete() + { + assert(state_ == s_idle && mode_ == m_replicating && + transaction_.state() == wsrep::transaction::s_aborted); + cond_.notify_all(); + } /** @} */ // diff --git a/src/transaction.cpp b/src/transaction.cpp index 984a3ba..09c2ed4 100644 --- a/src/transaction.cpp +++ b/src/transaction.cpp @@ -470,7 +470,6 @@ int wsrep::transaction::after_rollback() if (state() == s_aborting) { state(lock, s_aborted); - client_state_.cond_.notify_all(); } // Releasing the transaction from provider is postponed into