~akopytov/percona-xtrabackup/bug870119-2.0

Viewing all changes in revision 505.

  • Committer: Alexey Kopytov
  • Date: 2013-03-05 13:07:11 UTC
  • Revision ID: akopytov@gmail.com-20130305130711-lmej03v69am381vg
Bug #870119: assertion failure while trying to read InnoDB partition

The problem was that the InnoDB file I/O subsystem may reuse file
descriptors by closing the old ones when the number of open files hits
innodb_open_files. Which works for InnoDB, because if InnoDB needs to
access a table which has been closed, it would just reopen it.However,
that didn't work for XtraBackup, since it only keeps a file descriptor
when copying a file. So when the --parallel option was used, there was a
chance that another thread wanted to open a file and hit
innodb_open_files. Therefore fil_try_to_close_file_in_LRU() might close
the file descriptor which was currently in use by another thread and
then this descriptor is shortly reused when opening another file. Which
would result in obscure failures like this.

However, most part of the problem disappeared with the fix for bug
#713267: XtraBackup no longer relies on the file descriptors created by
the 'fil' subsystem of InnoDB to get tablespace flags, and that was the
reason for exhausting the innodb_open_files pool. So bug #870119 is
essentially a duplicate, or at least became extremely hard to hit in the
wild.

The only thing that should be done to exclude even a theoretical chance
of reusing file descriptors from the 'fil' subsystem is to always create
a new file descriptor to copy the file, instead of checking if a node
has been previously open by the 'fil' subsystem and reusing the
descriptor if so. Which is what this fix implements.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: