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:
@ -52,6 +52,10 @@ namespace db
|
||||
{
|
||||
return false;
|
||||
}
|
||||
std::string xid() const override
|
||||
{
|
||||
return "";
|
||||
}
|
||||
size_t bytes_generated() const override
|
||||
{
|
||||
return 0;
|
||||
|
@ -40,8 +40,9 @@ namespace db
|
||||
wsrep::mutable_buffer&) override;
|
||||
int append_fragment_and_commit(
|
||||
const wsrep::ws_handle&,
|
||||
const wsrep::ws_meta&, const wsrep::const_buffer&)
|
||||
override
|
||||
const wsrep::ws_meta&,
|
||||
const wsrep::const_buffer&,
|
||||
const std::string&) override
|
||||
{ return 0; }
|
||||
int remove_fragments(const wsrep::ws_meta&) override
|
||||
{ return 0; }
|
||||
|
@ -34,7 +34,8 @@ namespace db
|
||||
int append_fragment(const wsrep::id&,
|
||||
wsrep::transaction_id,
|
||||
int,
|
||||
const wsrep::const_buffer&) override
|
||||
const wsrep::const_buffer&,
|
||||
const std::string&) override
|
||||
{ throw wsrep::not_implemented_error(); }
|
||||
int update_fragment_meta(const wsrep::ws_meta&) override
|
||||
{ throw wsrep::not_implemented_error(); }
|
||||
|
Reference in New Issue
Block a user