5.8. Managing Transaction Failures
Inconsistencies between a master and slave dataserver can occur for a number
of reasons, including:
An update or insertion has occurred on the slave independently of the
master. This situation can occur if updates are allowed on a slave that
is acting as a read-only slave for scale out, or in the event of running
management or administration scripts on the slave
A switch or failover operation has lead to inconsistencies. This can
happen if client applications are still writing to the slave or master
at the point of the switch.
A database failure causes a database or table to become corrupted.
When a failure to apply transactions occurs, the problem must be resolved,
either by skipping or ignoring the transaction, or fixing and updating the
underlying database so that the transaction can be applied.
When a failure occurs, replication is stopped immediately at the first
transaction that caused the problem, but it may not be the only transaction
and this may require extensive examination of the pending transactions to
determine what caused the original database failure and then to fix and
address the error and restart replication.