File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,7 @@ namespace wsrep
8585
8686 /* *
8787 * Perform a background rollback for a transaction.
88+ * @return true if rollbacker was not started, false otherwise
8889 */
8990 virtual bool background_rollback (wsrep::client_state&) = 0;
9091
Original file line number Diff line number Diff line change @@ -1076,8 +1076,17 @@ bool wsrep::transaction::bf_abort(
10761076 lock.unlock ();
10771077 /* if background rollback is skipped, reset rollbacker activity */
10781078 if (server_service_.background_rollback (client_state_))
1079- client_state_.set_rollbacker_active (false );
1080- lock.lock ();
1079+ {
1080+ lock.lock ();
1081+ client_state_.set_rollbacker_active (false );
1082+
1083+ /* release the victim from waiting, if it has advanced to
1084+ wait_rollback_complete_and_acquire_ownership stage */
1085+ if (client_state_.state () == wsrep::client_state::s_idle)
1086+ client_state_.cond_ .notify_all ();
1087+ }
1088+ else
1089+ lock.lock ();
10811090 }
10821091 }
10831092 return ret;
You can’t perform that action at this time.
0 commit comments