Details
-
Bug
-
Status: Done
-
Low
-
Resolution: Fixed
-
None
-
None
-
None
Description
**Reported in Launchpad by markus_albe last update 10-11-2017 08:12:52
When using --safe-slave-backup the following can happen:
t1: temporary table is created
t2: long DML starts
t3: safe-slave-backup STOP SLAVE arrives
t4: slave SQL thread is killed and long DML is rollback'ed.
t5: safe-slave-backup START SLAVE arrives... and restarts where long DML starts.
t6 safe-slave-backup sleeps a bit...but far less than the long DML, so it will STOP SLAVE again while the long DML is still running, repeating the above ad-eternum.
Proposed fix would be for safe-slave-backup to check position when it stops slave, and make sure replication position has moved forward since it last stopped. This way at least we won't loop over the exact same query every time, depleting all retries.