mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-07-30 07:23:07 +03:00
Fixes for XA transactions with streaming enabled
Changes mostly related to handling of XA PREPARE fragments
This commit is contained in:
committed by
Daniele Sciascia
parent
54b0eeee45
commit
36346beab4
@ -78,6 +78,11 @@ namespace wsrep
|
||||
*/
|
||||
virtual bool is_xa() const = 0;
|
||||
|
||||
/**
|
||||
* Return true if the current statement is XA PREPARE
|
||||
*/
|
||||
virtual bool is_xa_prepare() const = 0;
|
||||
|
||||
//
|
||||
// Streaming
|
||||
//
|
||||
|
@ -436,6 +436,14 @@ namespace wsrep
|
||||
return transaction_.start_transaction(wsh, meta);
|
||||
}
|
||||
|
||||
int next_fragment(const wsrep::ws_meta& meta)
|
||||
{
|
||||
wsrep::unique_lock<wsrep::mutex> lock(mutex_);
|
||||
assert(current_thread_id_ == wsrep::this_thread::get_id());
|
||||
assert(mode_ == m_high_priority);
|
||||
return transaction_.next_fragment(meta);
|
||||
}
|
||||
|
||||
/** @name Commit ordering interface */
|
||||
/** @{ */
|
||||
int before_prepare()
|
||||
|
@ -51,6 +51,11 @@ namespace wsrep
|
||||
virtual int start_transaction(const wsrep::ws_handle&,
|
||||
const wsrep::ws_meta&) = 0;
|
||||
|
||||
/**
|
||||
* Start the next fragment of current transaction
|
||||
*/
|
||||
virtual int next_fragment(const wsrep::ws_meta&) = 0;
|
||||
|
||||
/**
|
||||
* Return transaction object associated to high priority
|
||||
* service state.
|
||||
|
@ -126,6 +126,11 @@ namespace wsrep
|
||||
return client_service_.is_xa();
|
||||
}
|
||||
|
||||
bool is_xa_prepare() const
|
||||
{
|
||||
return client_service_.is_xa_prepare();
|
||||
}
|
||||
|
||||
bool pa_unsafe() const { return pa_unsafe_; }
|
||||
void pa_unsafe(bool pa_unsafe) { pa_unsafe_ = pa_unsafe; }
|
||||
|
||||
@ -137,6 +142,8 @@ namespace wsrep
|
||||
int start_transaction(const wsrep::ws_handle& ws_handle,
|
||||
const wsrep::ws_meta& ws_meta);
|
||||
|
||||
int next_fragment(const wsrep::ws_meta& ws_meta);
|
||||
|
||||
void adopt(const transaction& transaction);
|
||||
void fragment_applied(wsrep::seqno seqno);
|
||||
|
||||
|
Reference in New Issue
Block a user