1
0
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:
Daniele Sciascia
2019-01-07 11:45:28 +01:00
parent a9e2fdccfc
commit 4ac15e4349
7 changed files with 106 additions and 41 deletions

View File

@ -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;