mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-07-28 20:02:00 +03:00
Fix attempt to replicate empty fragments
* Adds method wsrep::transaction::streaming_step() so that there is a single place where streaming context unit counter is udpated. The method also checks that some data has been generated before attempting fragment replication. * Emit a warning if there is an attempt to replicate a fragment and there is no data to replicate.
This commit is contained in:
@ -118,6 +118,11 @@ namespace wsrep
|
||||
return unit_counter_;
|
||||
}
|
||||
|
||||
void set_unit_counter(size_t count)
|
||||
{
|
||||
unit_counter_ = count;
|
||||
}
|
||||
|
||||
void increment_unit_counter(size_t inc)
|
||||
{
|
||||
unit_counter_ += inc;
|
||||
@ -133,6 +138,11 @@ namespace wsrep
|
||||
return fragments_;
|
||||
}
|
||||
|
||||
bool fragment_size_exceeded() const
|
||||
{
|
||||
return unit_counter_ >= fragment_size_;
|
||||
}
|
||||
|
||||
void cleanup()
|
||||
{
|
||||
fragments_certified_ = 0;
|
||||
|
Reference in New Issue
Block a user