mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-07-28 20:02:00 +03:00
Support recovery of XA transactions
* Add method `restore_prepared_transaction` to `client_state` class which restores a transaction state from storage given its xid. * Add method `commit_or_rollback_by_xid` to terminate prepared XA transactions by xid. * Make sure that transactions in prepared state are not rolled back when their master fails/partitions away.
This commit is contained in:
@ -132,6 +132,15 @@ namespace wsrep
|
||||
return client_service_.is_xa_prepare();
|
||||
}
|
||||
|
||||
int restore_to_prepared_state();
|
||||
|
||||
int commit_or_rollback_by_xid(const std::string& xid, bool commit);
|
||||
|
||||
const std::string xid() const
|
||||
{
|
||||
return client_service_.xid();
|
||||
}
|
||||
|
||||
bool pa_unsafe() const { return pa_unsafe_; }
|
||||
void pa_unsafe(bool pa_unsafe) { pa_unsafe_ = pa_unsafe; }
|
||||
|
||||
@ -262,6 +271,7 @@ namespace wsrep
|
||||
wsrep::streaming_context streaming_context_;
|
||||
wsrep::sr_key_set sr_keys_;
|
||||
wsrep::mutable_buffer apply_error_buf_;
|
||||
bool is_recovered_xa_;
|
||||
};
|
||||
|
||||
static inline const char* to_c_string(enum wsrep::transaction::state state)
|
||||
|
Reference in New Issue
Block a user