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

close SR transacions on equal consecutive views

Fixes a bug where the fact that an SR master leaves the primary view
gets missed. When two consecutive primary views have the same
membership we now assume that every SR needs to be rolled back, as the
system may have been through a state of only non-primary components.
This commit is contained in:
Leandro Pacheco
2019-03-05 09:41:48 +01:00
parent 56f605c607
commit 71f3fb2d01
5 changed files with 107 additions and 11 deletions

View File

@ -355,6 +355,10 @@ namespace wsrep
* Return current view
*/
const wsrep::view& current_view() const { return current_view_; }
/**
* Return the previous primary view
*/
const wsrep::view& previous_primary_view() const { return previous_primary_view_; }
/**
* Set last committed GTID.
*/
@ -603,6 +607,7 @@ namespace wsrep
, max_protocol_version_(max_protocol_version)
, rollback_mode_(rollback_mode)
, connected_gtid_()
, previous_primary_view_()
, current_view_()
, last_committed_gtid_()
{ }
@ -692,6 +697,7 @@ namespace wsrep
int max_protocol_version_;
enum rollback_mode rollback_mode_;
wsrep::gtid connected_gtid_;
wsrep::view previous_primary_view_;
wsrep::view current_view_;
wsrep::gtid last_committed_gtid_;
};