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

Count fragments certified for a statement.

The counter counts fragments which were succesfully certified since
the object construction or last after_statement() call.
This commit is contained in:
Teemu Ollakka
2019-02-14 23:50:41 +02:00
parent af8383daf0
commit 9c387ef82f
2 changed files with 20 additions and 2 deletions

View File

@ -89,7 +89,7 @@ namespace wsrep
bool ordered() const
{ return (ws_meta_.seqno().is_undefined() == false); }
/*!
/**
* Return true if any fragments have been succesfully certified
* for the transaction.
*/
@ -98,6 +98,20 @@ namespace wsrep
return (streaming_context_.fragments_certified() > 0);
}
/**
* Return number of fragments certified for current statement.
*
* This counts fragments which have been succesfully certified
* since the construction of object or last after_statement()
* call.
*
* @return Number of fragments certified for current statement.
*/
size_t fragments_certified_for_statement() const
{
return fragments_certified_for_statement_;
}
/**
* Return true if transaction has not generated any changes.
*/
@ -210,6 +224,7 @@ namespace wsrep
bool pa_unsafe_;
bool implicit_deps_;
bool certified_;
size_t fragments_certified_for_statement_;
wsrep::streaming_context streaming_context_;
wsrep::sr_key_set sr_keys_;
};