mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-07-31 18:24:25 +03:00
Fixes according to review comments
This commit is contained in:
@ -85,6 +85,7 @@ namespace wsrep
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Perform a background rollback for a transaction.
|
* Perform a background rollback for a transaction.
|
||||||
|
* @return true if rollbacker was not started, false otherwise
|
||||||
*/
|
*/
|
||||||
virtual bool background_rollback(wsrep::client_state&) = 0;
|
virtual bool background_rollback(wsrep::client_state&) = 0;
|
||||||
|
|
||||||
|
@ -1076,8 +1076,17 @@ bool wsrep::transaction::bf_abort(
|
|||||||
lock.unlock();
|
lock.unlock();
|
||||||
/* if background rollback is skipped, reset rollbacker activity */
|
/* if background rollback is skipped, reset rollbacker activity */
|
||||||
if (server_service_.background_rollback(client_state_))
|
if (server_service_.background_rollback(client_state_))
|
||||||
client_state_.set_rollbacker_active(false);
|
{
|
||||||
lock.lock();
|
lock.lock();
|
||||||
|
client_state_.set_rollbacker_active(false);
|
||||||
|
|
||||||
|
/* release the victim from waiting, if it has advanced to
|
||||||
|
wait_rollback_complete_and_acquire_ownership stage */
|
||||||
|
if (client_state_.state() == wsrep::client_state::s_idle)
|
||||||
|
client_state_.cond_.notify_all();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
lock.lock();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
|
Reference in New Issue
Block a user