mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-07-30 07:23:07 +03:00
Allow external locking for BF aborts
Added methods bf_abort() and total_order_bf_abort() which take wsrep::unique_lock<wsrep::mutex> as argument to allow caller to grab the mutex before attempting BF abort. The old calls were kept for backwards compatibility and wrap the new calls with internal locking.
This commit is contained in:
@ -540,6 +540,13 @@ namespace wsrep
|
||||
* Brute force abort a transaction. This method should be
|
||||
* called by a transaction which needs to BF abort a conflicting
|
||||
* locally processing transaction.
|
||||
*
|
||||
* @param lock Lock to protect client state.
|
||||
* @param bf_seqno Seqno of the BF aborter.
|
||||
*/
|
||||
int bf_abort(wsrep::unique_lock<wsrep::mutex>& lock, wsrep::seqno bf_seqno);
|
||||
/**
|
||||
* Wrapper to bf_abort() call, grabs lock internally.
|
||||
*/
|
||||
int bf_abort(wsrep::seqno bf_seqno);
|
||||
|
||||
@ -548,6 +555,11 @@ namespace wsrep
|
||||
* should be called by the TOI operation which needs to
|
||||
* BF abort a transaction.
|
||||
*/
|
||||
int total_order_bf_abort(wsrep::unique_lock<wsrep::mutex>& lock, wsrep::seqno bf_seqno);
|
||||
|
||||
/**
|
||||
* Wrapper to total_order_bf_abort(), grabs lock internally.
|
||||
*/
|
||||
int total_order_bf_abort(wsrep::seqno bf_seqno);
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user