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

Allow direct manipulation of streaming context parameters.

Added a method to change streaming context fragment unit and
size. The method has a side effect of resetting unit counter.
This commit is contained in:
Teemu Ollakka
2019-02-11 16:06:39 +02:00
parent 4eb6074e67
commit 20b52ff1dd
3 changed files with 43 additions and 0 deletions

View File

@ -49,6 +49,31 @@ namespace wsrep
, unit_counter_()
{ }
/**
* Set streaming parameters.
*
* Calling this method has a side effect of resetting unit
* counter.
*
* @param fragment_unit Desired fragment unit.
* @param fragment_size Desired fragment size.
*/
void params(enum fragment_unit fragment_unit, size_t fragment_size)
{
if (fragment_size)
{
wsrep::log_debug() << "Enabling streaming: "
<< fragment_unit << " " << fragment_size;
}
else
{
wsrep::log_debug() << "Disabling streaming";
}
fragment_unit_ = fragment_unit;
fragment_size_ = fragment_size;
reset_unit_counter();
}
void enable(enum fragment_unit fragment_unit, size_t fragment_size)
{
wsrep::log_debug() << "Enabling streaming: "