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

Made transaction streaming context private and provided accessor method.

This commit is contained in:
Teemu Ollakka
2018-07-09 08:49:29 +03:00
parent 7c424d8337
commit 95dbab4c08
5 changed files with 62 additions and 36 deletions

View File

@ -286,7 +286,7 @@ namespace wsrep
{
assert(mode_ == m_local);
assert(state_ == s_exec);
return (transaction_.streaming_context_.fragment_size() ?
return (transaction_.streaming_context().fragment_size() ?
transaction_.after_row() : 0);
}
@ -307,11 +307,10 @@ namespace wsrep
fragment_unit,
size_t fragment_size);
void disable_streaming()
{
assert(state_ == s_exec && mode_ == m_local);
transaction_.streaming_context_.disable();
}
/**
* Disable streaming for context.
*/
void disable_streaming();
/**
* Prepare write set meta data for fragment storage ordering.
@ -426,7 +425,7 @@ namespace wsrep
{
assert(mode_ == m_high_priority);
transaction_.start_transaction(transaction.id());
transaction_.streaming_context_ = transaction.streaming_context_;
transaction_.streaming_context() = transaction.streaming_context();
}
/** @name Non-transactional operations */

View File

@ -135,6 +135,10 @@ namespace wsrep
wsrep::ws_handle& ws_handle() { return ws_handle_; }
const wsrep::ws_handle& ws_handle() const { return ws_handle_; }
const wsrep::ws_meta& ws_meta() const { return ws_meta_; }
const wsrep::streaming_context& streaming_context() const
{ return streaming_context_; }
wsrep::streaming_context& streaming_context()
{ return streaming_context_; }
private:
transaction(const transaction&);
transaction operator=(const transaction&);
@ -162,7 +166,6 @@ namespace wsrep
int flags_;
bool pa_unsafe_;
bool certified_;
public:
wsrep::streaming_context streaming_context_;
};