1
0
mirror of https://github.com/codership/wsrep-lib.git synced 2025-07-28 20:02:00 +03:00

Add a method to disable BF aborts for transaction

This commit is contained in:
Teemu Ollakka
2024-03-20 19:05:36 +02:00
parent 7d108eb870
commit 06b07fe940
5 changed files with 98 additions and 1 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2019 Codership Oy <info@codership.com>
* Copyright (C) 2018-2024 Codership Oy <info@codership.com>
*
* This file is part of wsrep-lib.
*
@ -422,6 +422,7 @@ namespace wsrep
int ordered_commit();
int after_commit();
/** @} */
int before_rollback();
@ -562,6 +563,22 @@ namespace wsrep
*/
int total_order_bf_abort(wsrep::seqno bf_seqno);
/*
* Disable BF aborts for an active transaction. This method
* may be called several times during the transaction lifetime.
* Calling before_prepare() or before_commit() after calling
* this method will result error. The BF aborts are enabled again
* in the next call to after_statement().
*
* BF aborts cannot be disabled in the following cases: 1) The
* transactions has already been BF aborted. 2) The transaction
* has generated a write set.
*
* @return Zero on success, non-zero if the transaction was found
* BF aborted.
*/
int disable_bf_abort();
/**
* Adopt a streaming transaction state. This is must be
* called from high_priority_service::adopt_transaction()

View File

@ -202,6 +202,8 @@ namespace wsrep
wsrep::seqno bf_seqno);
bool total_order_bf_abort(wsrep::unique_lock<wsrep::mutex>&,
wsrep::seqno bf_seqno);
int disable_bf_abort();
void clone_for_replay(const wsrep::transaction& other);