summaryrefslogtreecommitdiff
path: root/sql/rpl_mi.h
diff options
context:
space:
mode:
authorAndrei <andrei.elkin@mariadb.com>2022-06-30 15:46:19 +0300
committerAndrei <andrei.elkin@mariadb.com>2022-07-26 16:01:14 +0300
commit8d238d47268bcd7470abed147d79eb9546b28ac4 (patch)
treedad53b0525dbd2f91aed017dbb25bb32e9e91f94 /sql/rpl_mi.h
parent552919d041c474d967701673c869edcc49081f84 (diff)
downloadmariadb-git-8d238d47268bcd7470abed147d79eb9546b28ac4.tar.gz
MDEV-28609 refine gtid-strict-mode to ignore same server-id gtid from the past
... on semisync slave To provide semisync master crash-recovery the same server-id transactions were made to accept for execution on the semisync slave when the strict gtid mode (see MDEV-27760). That however caused out-of-order error on a master's transaction server of the circular setup. The error was fair in the sense of the gtid strict mode rule as indeed under the condition of the circular setup the replicated transaction already exists in the local binlog. This is fixed by the commit to ignore on the gtid strict mode semisync slave those gtids that exist in the slave's binlog that effectively restores the default same-server-id ignore policy. At the same time the fixes complies with MDEV-21117 semisync slave recovery to accept the same server-id transactions that do not exist in local binlog.
Diffstat (limited to 'sql/rpl_mi.h')
-rw-r--r--sql/rpl_mi.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/sql/rpl_mi.h b/sql/rpl_mi.h
index ce2d3cc9ad5..1377a816d48 100644
--- a/sql/rpl_mi.h
+++ b/sql/rpl_mi.h
@@ -352,6 +352,20 @@ class Master_info : public Slave_reporting_capability
ACK from slave, or if delay_master is enabled.
*/
int semi_ack;
+ /*
+ The flag has replicate_same_server_id semantics and is raised to accept
+ a same-server-id event group by the gtid strict mode semisync slave.
+ Own server-id events can normally appear as result of EITHER
+ A. this server semisync (failover to) slave crash-recovery:
+ the transaction was created on this server then being master,
+ got replicated elsewhere right before the crash before commit,
+ and finally at recovery the transaction gets evicted from the
+ server's binlog and its gtid (slave) state; OR
+ B. in a general circular configuration and then when a recieved (returned
+ to slave) gtid exists in the server's binlog. Then, in gtid strict mode,
+ it must be ignored similarly to the replicate-same-server-id rule.
+ */
+ bool do_accept_own_server_id;
};
int init_master_info(Master_info* mi, const char* master_info_fname,