MySQL Master-Master Replication Bug – ERROR 1872

When i tried to configurate a crash safe slave with MTS and GTID based replication, but after a OS crash
replication failed to be start.

And, “start slave” also failed

According the manual, When using GTIDs and MASTER_AUTO_POSITION “sync_relay_log=1” is not necessary.

How to repeat:
run a script to execute update sql on the master continuously

use “kill -9” kill the kvm process of the slave in the physical machine

start mysql of the slave

Suggested fix:
The error ocuurs when mts_recovery_groups() reading the corrupted relay log files in MTS group recovery.
But with “gtid_mode=ON” and “relay_log_recovery = 1”, the relay log files will be discard later, and so, at the beginning should skip the relay log read.

The following steps can start slave successfully

Don’t forget to add below line to my.cnf to skip erros

Leave a Reply

Your email address will not be published. Required fields are marked *