mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-07-28 20:02:00 +03:00
Initial support for XA
Force fragment replication when XA transaction is prepared, with prepare fragment. Commit fragment happens in before_commit(). Adjusted fragment removal, which cannot happen in atomically with the executing transaction.
This commit is contained in:
@ -34,13 +34,14 @@
|
||||
|
||||
namespace wsrep
|
||||
{
|
||||
class transaction;
|
||||
class client_service
|
||||
{
|
||||
public:
|
||||
client_service() { }
|
||||
virtual ~client_service() { }
|
||||
|
||||
virtual const char* query() const = 0;
|
||||
|
||||
/**
|
||||
* Return true if the current transaction has been interrupted
|
||||
* by the DBMS. The lock which is passed to interrupted call
|
||||
@ -72,6 +73,11 @@ namespace wsrep
|
||||
*/
|
||||
virtual void cleanup_transaction() = 0;
|
||||
|
||||
/**
|
||||
* Return true if the current transactions is XA
|
||||
*/
|
||||
virtual bool is_xa() const = 0;
|
||||
|
||||
//
|
||||
// Streaming
|
||||
//
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include "lock.hpp"
|
||||
#include "sr_key_set.hpp"
|
||||
#include "buffer.hpp"
|
||||
#include "client_service.hpp"
|
||||
|
||||
#include <cassert>
|
||||
#include <vector>
|
||||
@ -39,7 +40,6 @@ namespace wsrep
|
||||
class key;
|
||||
class const_buffer;
|
||||
|
||||
|
||||
class transaction
|
||||
{
|
||||
public:
|
||||
@ -121,6 +121,11 @@ namespace wsrep
|
||||
return sr_keys_.empty();
|
||||
}
|
||||
|
||||
bool is_xa() const
|
||||
{
|
||||
return client_service_.is_xa();
|
||||
}
|
||||
|
||||
bool pa_unsafe() const { return pa_unsafe_; }
|
||||
void pa_unsafe(bool pa_unsafe) { pa_unsafe_ = pa_unsafe; }
|
||||
|
||||
|
Reference in New Issue
Block a user