mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-06-14 15:02:27 +03:00
Support for replaying prepared XA transactions
This patch implments replaying for prepared XA transactions. Replay may happen in the following cases: 1) The transaction is BF aborted in prepared state and is idle. In that case, the transaction is handed over to rollbacker for replay. 2) The transaction is BF aborted while executing the commit (i.e. before or after successful certification). In which case the transaction replays itself from fragment storage. 3) The transaction is BF aborted while certifying its commit fragment. This case is handled like replay for streaming transactions, where the provider is directly involved and re-delivers the last fragment.
This commit is contained in:
@ -604,6 +604,23 @@ namespace wsrep
|
||||
transaction_.xa_detach();
|
||||
}
|
||||
|
||||
/**
|
||||
* Replay a XA transaction
|
||||
*
|
||||
* Replay a XA transaction that is in s_idle state.
|
||||
* This may happen if the transaction is BF aborted
|
||||
* between prepare and commit.
|
||||
* Since the victim is idle, this method can be called
|
||||
* by the BF aborter or the backround rollbacker.
|
||||
*/
|
||||
void xa_replay()
|
||||
{
|
||||
assert(mode_ == m_local);
|
||||
assert(state_ == s_idle);
|
||||
wsrep::unique_lock<wsrep::mutex> lock(mutex_);
|
||||
transaction_.xa_replay(lock);
|
||||
}
|
||||
|
||||
//
|
||||
// BF aborting
|
||||
//
|
||||
|
Reference in New Issue
Block a user