1
0
mirror of https://github.com/codership/wsrep-lib.git synced 2025-11-01 17:51:06 +03:00

Fixed BF abort in sync rollback mode.

* Pass condition variable for client_state
* Notify all cond waiters when changing the transcation status to
  aborted
* Wait for aborting transaction state aborted in before_command
This commit is contained in:
Teemu Ollakka
2018-07-02 10:09:48 +03:00
parent db18e91c42
commit 658a84a7d4
7 changed files with 25 additions and 21 deletions

View File

@@ -65,15 +65,12 @@ int wsrep::client_state::before_command()
wsrep::unique_lock<wsrep::mutex> lock(mutex_);
debug_log_state("before_command: enter");
assert(state_ == s_idle);
if (server_state_.rollback_mode() == wsrep::server_state::rm_sync)
if (transaction_.active() &&
server_state_.rollback_mode() == wsrep::server_state::rm_sync)
{
/**
* @todo Wait until the possible synchronous rollback
* has been finished.
*/
while (transaction_.state() == wsrep::transaction::s_aborting)
{
// cond_.wait(lock);
cond_.wait(lock);
}
}
state(lock, s_exec);