replication-manager
replication-manager copied to clipboard
No need to change gtid_slave_pos on slaves, breaks multi-domain intermediate master setup
Hi,
Currently mrm changes the gtid_slave_pos on the slaves. I don't see why that is needed in normal operation.
I am testing MRM in a slightly special setup, -> is a replication stream domain 1 and => is replication stream domain 2: Server A -> B, C, D, Server C => D The SET GLOBAL gtid_slave_pos fails on server C due to domain 2 not present, on server D it fails because the secondary replication stream is down.
We came to 2 caveats: If you failover a master and have to let it rejoin the cluster. However there is an easy fix for that situation: If there is not gtid_slave_pos present on a master that has to become slave, we have to do CHANGE MASTER TO MASTER_USE_GTID=current_pos;
Another problem arises when the slave receives writes on the same GTID domain as the master. This is an incorrect setup and if we have strict_mode enabled writing on the slave will break replication anyways.
Perhaps I missed anything? Very interested in your response!
Cheers, Michaël
Perhaps also gtid_current_pos should be used if gtid_current_pos is higher the gtid_slave_pos.