Skip to content

Commit 6fe3bca

Browse files
committed
Fixes according to review comments
1 parent f0e2462 commit 6fe3bca

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

include/wsrep/server_service.hpp

+1
Original file line numberDiff line numberDiff 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

src/transaction.cpp

+11-2
Original file line numberDiff line numberDiff 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;

0 commit comments

Comments
 (0)