As far as I can tell, gtid_strict_mode is not compatible with topologies that contain an intermediate primary server. Let's say that we have a topology like this:
Let's say that M1 has gtid_domain_id=5 and M2 has gtid_domain_id=0.
When you want to set up replication from M2 to M1, you will run into an error when you try to set gtid_slave_pos on M2 if gtid_strict_mode is enabled:
This check occurs here:
It may make sense for this scenario to trigger an error in a simple primary-replica topology. However, in topologies with an intermediate primary server, it does not make sense for this scenario to trigger an error. The intermediate primary server is expected to have domains that the other primary server does not have.
Perhaps we need another variable to disable this check. For example, some options might be:
- We could create a variable called gtid_intermediate_primary that controls whether this check is performed.
- Or we could create a variable called gtid_local_domain_ids that allows DBAs to configure domains that their primary is not expected to have, so that those domains would be ignored for this check.