← Back to team overview

maria-developers team mailing list archive

MariaDB allows for slave to connect with non-existent GTID



I've realized that the way slaves are processed now on the master
allows them to connect even if they request non-existent GTID. Is it
"works as intended" and will be different in the "strict mode" or you
didn't want for such things to happen even in non-strict mode?

I've attached a test reproducing the problem. It sets up replication
1->2->3, executes transaction on 1, executes transaction on 2,
disconnects 3, executes one more transaction on 1, fails over to 2,
executes one more transaction on 2. Then when it tries to connect 3 to
1 it should fail because 1 doesn't have the last transaction that 3
I agree that this scenario is artificial, but in reality scenario can
be e.g. like this: 2 is slave of 1, then it gets disconnected and
executes one extra transaction, then backup is taken from 2, then 2
gets restarted and restored to the state of 1, then failover happens
and 2 becomes master, then 3 restores from the backup taken earlier
from 2 and if all this time 1 and then 2 as masters executed some
transactions 3 will be able to connect to 2 even though its last
transaction doesn't exist on 2...


Attachment: rpl_gtid_bad_rpl.cnf
Description: Binary data

Attachment: rpl_gtid_bad_rpl.test
Description: Binary data

Follow ups