Too weak condition (no < scanned_no) in log copying thread

Bug #1497912 reported by Sergei Glushchenko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona XtraBackup moved to https://jira.percona.com/projects/PXB
Fix Released
High
Sergei Glushchenko
2.2
Fix Released
High
Sergei Glushchenko
2.3
Fix Released
High
Sergei Glushchenko

Bug Description

If xtrabackup detected that log block which been just read has the
different number from what is expected it is trying to determine
whether it is OK or something went wrong and the backup has to be
aborted.

Possible cases are:

1. Log is just not flushed to position we are trying to read from. In
  this case we'll see log block which is older than we expect.
2. We are trying to read from wrong position and must retry (PS 5.5
  with large log files)
3. We are too slow to read from redo log and InnoDB has wrapped
  around before we could catch up (rare case).

Following condition for case (1) is too weak:

  if (no < scanned_no ||
   /* Log block numbers wrap around at 0x3FFFFFFF */
   ((scanned_no | 0x40000000UL) - no) %
   blocks_in_group == 0) {

More accurate condition will be:

   (no < scanned_no && ((scanned_no - no) % blocks_in_group) == 0) ||
   (((scanned_no | 0x40000000UL) - no) % blocks_in_group) == 0

It means that log block number for the same offset advancing by the
blocks_in_group increments.

Tags: i59230
tags: added: i59230
Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :
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-437

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

Other bug subscribers

Remote bug watches

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