Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-14499

Mariabackup 10.2 fails to back up a multi-file InnoDB system tablespace

    XMLWordPrintable

Details

    Description

      When Mariabackup is invoked on an instance that uses a multi-file InnoDB system tablespace, it may fail to other files of the system tablespace than the first one.
      This was revealed by the MDEV-14447 test case.
      The offending code is assuming that the first page of each data file is page 0. But, in multi-file system tablespaces that is not the case. It turns out that we should just rely on the metadata that already exists in memory:

      diff --git a/extra/mariabackup/fil_cur.cc b/extra/mariabackup/fil_cur.cc
      index e0f0df72611..f6e6fe43085 100644
      --- a/extra/mariabackup/fil_cur.cc
      +++ b/extra/mariabackup/fil_cur.cc
      @@ -212,24 +212,7 @@ xb_fil_cur_open(
       
       	posix_fadvise(cursor->file, 0, 0, POSIX_FADV_SEQUENTIAL);
       
      -	/* Determine the page size */
      -	ulint	flags = xb_get_space_flags(cursor->file);
      -	if (flags == ULINT_UNDEFINED) {
      -		xb_fil_cur_close(cursor);
      -		return(XB_FIL_CUR_SKIP);
      -	}
      -
      -	if (!fsp_flags_is_valid(flags, cursor->space_id)) {
      -		ulint cflags = fsp_flags_convert_from_101(flags);
      -		if (cflags == ULINT_UNDEFINED) {
      -			msg("[%02u] mariabackup: Error: Invalid "
      -			    "tablespace flags: %x.\n", thread_n, uint(flags));
      -			return(XB_FIL_CUR_SKIP);
      -		}
      -		flags = cflags;
      -	}
      -
      -	const page_size_t page_size(flags);
      +	const page_size_t page_size(cursor->node->space->flags);
       	cursor->page_size = page_size;
       
       	/* Allocate read buffer */
      

      Attachments

        Issue Links

          Activity

            People

              marko Marko Mäkelä
              marko Marko Mäkelä
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.