[MDEV-29803] Unexpected ERROR: Found out of order GTID after replaying binlog read from remote Created: 2022-10-16  Updated: 2023-11-28

Status: Open
Project: MariaDB Server
Component/s: Replication
Affects Version/s: 10.8, 10.9, 10.10
Fix Version/s: 10.11

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Brandon Nesterenko
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Problem/Incident
is caused by MDEV-4989 Support for GTID in mysqlbinlog Closed

 Description   

--source include/have_log_bin.inc
 
reset master;
create table t1 (a int);
create table t2 (a int);
drop table t1, t2;
flush binary logs;
 
--exec $MYSQL_BINLOG --read-from-remote-server -uroot --protocol=tcp --port=$MASTER_MYPORT master-bin.000001 | $MYSQL test 2>&1
 
drop table if exists t1, t2;
flush binary logs;
 
--let $datadir= `select @@datadir`
--exec $MYSQL_BINLOG $datadir/master-bin.000001 $datadir/master-bin.000002

10.8 618d8206

ERROR: Found out of order GTID. Got 0-1-1 after 0-1-3
mysqltest: At line 15: exec of '/mnt8t/bld/10.8-nightly/bin/mysqlbinlog --defaults-file=/mnt8t/bld/10.8-nightly/mysql-test/var/my.cnf --local-load=/mnt8t/bld/10.8-nightly/mysql-test/var/tmp /mnt8t/bld/10.8-nightly/mysql-test/var/mysqld.1/data//master-bin.000001 /mnt8t/bld/10.8-nightly/mysql-test/var/mysqld.1/data//master-bin.000002' failed, error: 256, status: 1, errno: 11

The error started happening on 10.8 after MDEV-4989:

commit 79e3ee00fa61f809d3e230905beac1d2ae26d5d0
Author: Brandon Nesterenko
Date:   Wed Aug 11 11:29:37 2021 -0600
 
    MDEV-4989: Support for GTID in mysqlbinlog



 Comments   
Comment by Kristian Nielsen [ 2023-05-05 ]

The work-around here is just to add --gtid-strict-mode=0 to the mysqlbinlog command.
The --gtid-strict-mode is a new option added, defaults to ON.

I'm not sure why it was decided to give these errors by default. While it can be argued that it's best to avoid out-of-order GTIDs in the server, it doesn't seem to make much sense for mysqlbinlog to refuse to even display the events to inspect the situation?

So maybe the default should be fixed to be OFF?

  • Kristian.
Generated at Thu Feb 08 10:11:24 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.