"FLUSH ENGINE LOGS" bring inconsistency into GTID-enabled slave

Bug #1394632 reported by Denis Zhdanov
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Percona XtraBackup moved to https://jira.percona.com/projects/PXB
Fix Released
High
Alexey Kopytov
2.1
Fix Released
High
Alexey Kopytov
2.2
Fix Released
High
Alexey Kopytov
2.3
Fix Released
High
Alexey Kopytov

Bug Description

When I backup Percona Server 5.6.21 on slave with percona-xtrabackup 2.2.5, I find that innobackupex executes the command:
'FLUSH ENGINE LOGS'
this command will be record to slave binlog,which leads to inconsistency between master and slave when GTID enabled.

Suggested fix:
Replace the line :
mysql_query(\%mysql, "FLUSH ENGINE LOGS");
with
mysql_query(\%mysql, "FLUSH NO_WRITE_TO_BINLOG ENGINE LOGS");

I have test it, and it doesn't record "FLUSH ENGINE LOGS" to slave binlog.

(Based on http://www.percona.com/forums/questions-discussions/percona-xtrabackup/24993-percona-xtrabackup-2-2-4-innobackup-update, but I hit same bug recently)

Related branches

Revision history for this message
Alexey Kopytov (akopytov) wrote :

Thank you for the bug report. This has also been reported as bug #1384140, but it didn't occur to us that the inconsistency is in the binary log coordinates, rather than data. I have marked that bug as a duplicate of this one.

Revision history for this message
Denis Zhdanov (deniszhdanov) wrote :

Of course, it will create "inconsistency is in the binary log",i.e. create new transaction on slave which become errant transaction instantly (http://www.percona.com/blog/2014/05/19/errant-transactions-major-hurdle-for-gtid-based-failover-in-mysql-5-6/) and blocks failover until we fix it.

Revision history for this message
pako (pakonet) wrote :

We have exactly the same problem. We cannot use Xtrabackup 2.3.1-beta1 on a MySQL slave in a GTID enabled replication setup. Executing:

FLUSH NO_WRITE_TO_BINLOG ENGINE LOGS

adds an errant transaction and we start getting notifications from our monitoring system. At this point we have to fix the "Executed_Gtid_Set" value on the slave or inject empty transactions on all other servers. This is not easy to do, so for now we decided against using Xtrabackup on MySQL slaves.

Revision history for this message
Denis Zhdanov (deniszhdanov) wrote :

pako, fix was released in stable version 2.2.7 too.
If you can't migrate to it - just edit percona-xtrabackup and
replace the line :
mysql_query(\%mysql, "FLUSH ENGINE LOGS");
with
mysql_query(\%mysql, "FLUSH NO_WRITE_TO_BINLOG ENGINE LOGS");

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PXB-415

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.