1
0
mirror of https://github.com/codership/wsrep-lib.git synced 2025-07-28 20:02:00 +03:00

Revised logic to handle SR replaying

* Added server_id into transaction in order to be able to stop
  streaming applier during high priority BF abort
* Added missing commit fragment applying
* Don't clear fragments for replaying SR transaction
This commit is contained in:
Teemu Ollakka
2018-07-12 13:36:45 +03:00
parent ddc6c6495b
commit 3f4e5dea3b
6 changed files with 255 additions and 250 deletions

View File

@ -425,15 +425,6 @@ namespace wsrep
return transaction_.bf_abort(lock, bf_seqno);
}
//
// Replaying
//
int start_replaying(const wsrep::ws_meta& ws_meta)
{
assert(mode_ == m_high_priority);
return transaction_.start_replaying(ws_meta);
}
/**
* Adopt a streaming transaction state. This is must be
* called from high_priority_service::adopt_transaction()

View File

@ -47,6 +47,7 @@ namespace wsrep
void disable()
{
wsrep::log_info() << "Disabling streaming";
fragment_size_ = 0;
}

View File

@ -52,6 +52,9 @@ namespace wsrep
wsrep::transaction_id id() const
{ return id_; }
const wsrep::id& server_id() const
{ return server_id_; }
bool active() const
{ return (id_ != wsrep::transaction_id::undefined()); }
@ -95,8 +98,6 @@ namespace wsrep
const wsrep::ws_meta& ws_meta,
bool is_commit);
int start_replaying(const wsrep::ws_meta&);
int append_key(const wsrep::key&);
int append_data(const wsrep::const_buffer&);
@ -161,6 +162,7 @@ namespace wsrep
wsrep::server_service& server_service_;
wsrep::client_service& client_service_;
wsrep::client_state& client_state_;
wsrep::id server_id_;
wsrep::transaction_id id_;
enum state state_;
std::vector<enum state> state_hist_;