mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-08-06 15:02:41 +03:00
Removed SR store implementation detail from wsrep-lib
The following was moved to application side implementation: - Removed sr_store from streaming context. - Removed sr_state from transaction. - Removed get_binlog_cache() from client_service interface. Other: - Add SR applier reference to append_fragment_and_commit() to make it available for application. - Add separate interface call to rollback SR transactions on disconnect. Rolling back SR transactions due to rollback fragment and rolling back SR transactions due to disconnect have different behaviors. Have separate calls for these different cases for clarity. - Remove non-const transaction accessor, not needed anymore because SR state has been moved to application side. - Remove unneeded set_fragments_from_table().
This commit is contained in:
@@ -142,48 +142,6 @@ namespace wsrep
|
||||
void xa_detach();
|
||||
|
||||
int xa_replay(wsrep::unique_lock<wsrep::mutex>&);
|
||||
int fragment_cache_remove_transaction(
|
||||
const wsrep::id& server_id, wsrep::transaction_id transaction_id);
|
||||
void *get_binlog_cache();
|
||||
/* state of Streaming Replication Speedup feature for the
|
||||
transaction. This describes the relationship of this WSREP
|
||||
transaction and the underlying InnoDB transaction.
|
||||
*/
|
||||
enum sr_state
|
||||
{
|
||||
/* this is not an SR Speedup transaction */
|
||||
sr_state_none,
|
||||
/* this is an SR Speedup transaction, but SR XID is not set
|
||||
for the underlying InnoDB transaction
|
||||
*/
|
||||
sr_state_require_xid,
|
||||
/* this is an SR Speedup transaction, and SR XID is set
|
||||
for the underlying InnoDB transaction
|
||||
*/
|
||||
sr_state_xid_set
|
||||
};
|
||||
static const int n_sr_states = sr_state_xid_set + 1;
|
||||
enum sr_state sr_state() const
|
||||
{ return sr_state_; }
|
||||
void require_sr_xid()
|
||||
{
|
||||
if (sr_state_ == sr_state_none) {
|
||||
sr_state_ = sr_state_require_xid;
|
||||
}
|
||||
}
|
||||
void sr_xid_was_set()
|
||||
{
|
||||
sr_state_ = sr_state_xid_set;
|
||||
}
|
||||
bool sr_xid_is_required()
|
||||
{
|
||||
return sr_state_ == sr_state_require_xid;
|
||||
}
|
||||
bool sr_xid_is_set()
|
||||
{
|
||||
return sr_state_ == sr_state_xid_set;
|
||||
}
|
||||
|
||||
bool pa_unsafe() const { return (flags() & wsrep::provider::flag::pa_unsafe); }
|
||||
void pa_unsafe(bool pa_unsafe) {
|
||||
if (pa_unsafe) {
|
||||
@@ -323,7 +281,6 @@ namespace wsrep
|
||||
wsrep::mutable_buffer apply_error_buf_;
|
||||
wsrep::xid xid_;
|
||||
bool streaming_rollback_in_progress_;
|
||||
enum sr_state sr_state_;
|
||||
};
|
||||
|
||||
static inline const char* to_c_string(enum wsrep::transaction::state state)
|
||||
|
Reference in New Issue
Block a user