We are running a Percona 5.5.22 master replicating to Percona 5.5.62 slaves on CentOS 6.9.
We have a database backup script which runs on the slaves and before taking a backup the script attempts to ensure that replication is in sync on the slave.
It does this by stopping the Slave I/O thread and waiting until Exec_Master_Log_Pos = Read_Master_Log_Pos.
Most of the time this works fine, but occasionally Exec_Master_Log_Pos never reaches Read_Master_Log_Pos - it just sticks at a value lower than Read_Master_Log_Pos, even after 5 minutes, and so the backup doesn’t get run.
Any idea what is going on? Is this a valid way of checking that replication has caught up?
Chris