mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-08-08 02:02:57 +03:00
Support detach on transaction prepare
Split method `transaction::xa_detach()` in `before_xa_detach()` and `after_xa_detach()`. This allows to handle bf abort or replay while transaction is detaching and to distinguish if a transaction is bf aborted before or after the DBMS has detached a transaction from its storage engine.
This commit is contained in:
@@ -126,6 +126,11 @@ namespace wsrep
|
||||
return !xid_.is_null();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if the transaction has completed the prepare step.
|
||||
*/
|
||||
bool is_prepared_xa() const;
|
||||
|
||||
void assign_xid(const wsrep::xid& xid);
|
||||
|
||||
const wsrep::xid& xid() const
|
||||
@@ -137,7 +142,9 @@ namespace wsrep
|
||||
|
||||
int commit_or_rollback_by_xid(const wsrep::xid& xid, bool commit);
|
||||
|
||||
void xa_detach();
|
||||
int before_xa_detach(wsrep::unique_lock<mutex>&);
|
||||
|
||||
int after_xa_detach(wsrep::unique_lock<mutex>&);
|
||||
|
||||
int xa_replay(wsrep::unique_lock<wsrep::mutex>&);
|
||||
|
||||
@@ -213,6 +220,11 @@ namespace wsrep
|
||||
return bf_aborted_in_total_order_;
|
||||
}
|
||||
|
||||
wsrep::seqno bf_seqno() const
|
||||
{
|
||||
return bf_seqno_;
|
||||
}
|
||||
|
||||
int flags() const
|
||||
{
|
||||
return flags_;
|
||||
@@ -270,6 +282,7 @@ namespace wsrep
|
||||
enum wsrep::provider::status bf_abort_provider_status_;
|
||||
int bf_abort_client_state_;
|
||||
bool bf_aborted_in_total_order_;
|
||||
wsrep::seqno bf_seqno_;
|
||||
wsrep::ws_handle ws_handle_;
|
||||
wsrep::ws_meta ws_meta_;
|
||||
int flags_;
|
||||
|
Reference in New Issue
Block a user