Percona Mysql 8.0.19-10 Slave SQL: Could not execute Update_rows event on table Error_code: MY-001032

Hello,
we have this architecture: 3 db nodes master-master cluster replication, 1 slave db node (readonly, on offsite) without replication for backup purposes with binlogs application.
A db offline datadir snapshot is created on one master node of the cluster. Binlogs are periodically generated on the same master node (flush-logs binary).
The contents of the snapshot are copied to the slave, where the slave db is running above it. Subsequently, events from binlogs generated in the time since the master
node was stopped are replayed on slave db.
In some cases, an errors occurs when replaying binlogs events on the db slave, for example:
2020-10-23T11:20:09.500552Z 63 [ERROR] [MY-010584] [Repl] Slave SQL: Could not execute Update_rows event on table xxx.yyy; Can’t find record in ‘yyy’, Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND; the event’s master log FIRST, end_log_pos 2046, Error_code: MY-001032

Replication errors do not occur on cluster nodes.

We use this configuration on the nodes:
gtid_mode=ON
enforce_gtid_consistency
binlog_format=ROW

(mysqld 8.0.19-10) Percona XtraDB Cluster (GPL), Release rel10, Revision 727f180, WSREP version 26.4.3.

What could be the cause of this error, and how it can be fixed?
Thanks

1 Like

Hi, most likely there is data drift between the replication source and the replica itself. I suggest you run pt-table-checksum/pt-table-sync in your servers to ensure the data is the same across all of them.
After you do that you should configure crash-safe replication as per Enabling crash-safe slaves with MySQL 5.6
article is for 5.6 but instructions still apply

1 Like