~percona-dev/percona-xtrabackup/xb_datadir

Viewing all changes in revision 215.

  • Committer: Alexey Kopytov
  • Date: 2011-02-06 13:34:45 UTC
  • Revision ID: akopytov@gmail.com-20110206133445-taaco31lrflq7hdx
Fix for LP bug #713799: race condition when trying to open an already
                        removed tablespace

Dropping a table during a backup process could result in assertion
failure in xtrabackup.

xtrabackup iterates a data dictionary snapshot taken at the very start
of a backup process when looking for files to copy. Since some tables
may be dropped while backup is in progress, there is a possibility for
some .ibd files to be removed by the time xtrabackup will try to copy
them.

The actual crash occurred as a result of the following chain of calls:
fil_space_get_zip_size() -> fil_space_get_flags() ->
fil_node_prepare_for_io() -> fil_node_open_file() which
eventually led to an assertion failure in fil_node_open_file() when it
was trying to open a nonexistent .ibd.

Fixed by changing fil_node_prepare_for_io() and fil_node_open_file() so
that in case of the 'file not found' error, the error is signaled to
the caller instead of generating an assertion failure.

xtrabackup.c also had to be fixed to actually skip nonexistent file with
a warning message rather than terminate the entire backup process with a
fatal error.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: