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

Cache rollback events that failed to replicate for later retry

This patch introduces a queue to store ids of transactions that failed
to send a rollback fragment in streaming_rollback(). This is to avoid
potentially  missed rollback fragments when a cluster splits and then
later reforms. Rollback fragments would be missing if a node rolled
back a transaction locally (either BFed or voluntary rollback) while
non-primary, and the attempt to send rollback fragment failed in
transaction::streaming_rollback().
Transaction that fail to send rollback fragment can proceed to
rollback locally.  However we must ensure that rollback fragments for
those transactions are eventually delivered by the cluster. This must
be done before a potentially conflicting writeset causes BF-BF
conflicts in the rest of the cluster.
This commit is contained in:
Daniele Sciascia
2021-09-24 10:45:34 +02:00
parent efb4aab090
commit 22921e7082
7 changed files with 443 additions and 28 deletions

View File

@ -110,7 +110,9 @@ namespace wsrep
int protocol_version() const
{ return protocol_version_; }
const std::vector<member>& members() const { return members_; }
const std::vector<member>& members() const
{ return members_; }
/**
* Return true if the view is final
@ -128,6 +130,14 @@ namespace wsrep
*/
int member_index(const wsrep::id& member_id) const;
/**
* Return true if id is member of this view
*/
bool is_member(const wsrep::id& id) const
{
return member_index(id) != -1;
}
void print(std::ostream& os) const;
private: