[MDEV-31328] GTID replication error Created: 2023-05-22  Updated: 2023-05-25

Status: Open
Project: MariaDB Server
Component/s: Replication
Affects Version/s: 10.6.10
Fix Version/s: 10.6

Type: Bug Priority: Major
Reporter: Jeremy Knapp Assignee: Unassigned
Resolution: Unresolved Votes: 1
Labels: None
Environment:

RDS MariaDB 10.6.10 Primary to Aurora V2 8.0.mysql_aurora.3.03.0 Secondary



 Description   

When running binlog replication from the primary to the secondary we see replication work for a while. We then get an error on the secondary.

Got fatal error 1236 from master when reading data from binary log: 'Failed to replace GTID event with backwards-compatible event: corrupt event.; the first event 'mysql-bin-changelog.368637' at 69545, the last event read from 'mysql-bin-changelog.368637' at 69545, the last byte read from 'mysql-bin-changelog.368637' at 69591.'

The binlog in question looks like the following at the start.

MariaDB [(none)]> SHOW BINLOG EVENTS IN 'mysql-bin-changelog.368637' FROM 69545 LIMIT 50\G
*************************** 1. row ***************************
   Log_name: mysql-bin-changelog.368637
        Pos: 69545
 Event_type: Gtid
  Server_id: 2033967690
End_log_pos: 69591
       Info: BEGIN GTID 0-2033967690-104242786 cid=735717

It looks like a similar issue was listed here MDEV-5754

However it was fixed ages ago.



 Comments   
Comment by Daniel Black [ 2023-05-23 ]

Are you able to extract the full binary log event and upload via sftp?

Given its an Aurora secondary generating this error perhaps its their bug. At least they might be able to point to where in the MariaDB binary log message the incompatibility is.

I'm assuming by the binary log filenames/positions this has been running successfully for quite a while. Has the MariaDB version or its replication settings, or the Aurora version/settings changed recently that triggered this?

I'm slightly surprised it works at all.

Comment by Jeremy Knapp [ 2023-05-23 ]

For sure I can upload it. I have ben looking at the MariaDB due to the from Master part. I can try to dig into the other side more.

We probably can upgrade MariaDB versions on our primary. I have been searching for some sort of matrix that shows working. Or does binlog replication from MariaDB to Mysql just not work anymore?

Actually I rolled the target log off. I can reproduce this pretty easily though.

Comment by Daniel Black [ 2023-05-25 ]

Testing can occur on the MySQL side as at least there's source there and assume Aurora follows their implementation close enough.

It takes two to ensure compatibility. I'm not sure MariaDB or MySQL are going to publicly document compatibility we can't control.

I'm curious as to how well the compatibility has occurred with little testing effort around it.

SQL steps on reproducibility welcome.

Generated at Thu Feb 08 10:23:01 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.