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

MariaBackup backup does not work with compression providers

    XMLWordPrintable

Details

    Description

      I've set it to blocker because for now I don't see a decent workaround. Please feel free to demote if there is one.

      MariaBackup doesn't appear to recognize compression algorithms loaded through compression providers. It doesn't pick up clues from the server, and even the command-line option --plugin-load=provider_xxx, while accepted, doesn't seem to have any effect.

      There are exceptions which MTR tests probably unwillingly exploit. For example, if a table was just created, and after that MariaBackup backup is executed, it works. But if the server was restarted before MariaBackup, the backup fails. I'm not sure it really requires server restart, maybe it has something to do with table eviction, purge or whatever. But server restart certainly does the trick.

      The test below is derived from mariabackup.compression_providers_loaded test, essentially it just adds server restart before the mariabackup call.

      --source include/have_innodb.inc
       
      install soname 'provider_snappy'; # or load it upon startup
       
      eval set global innodb_compression_algorithm = snappy;
      create table t1 (a int, b text) engine = innodb page_compressed = 1;
      insert t1 (a, b) values (0, repeat("abc", 100));
      select a, left(b, 9), length(b) from t1;
       
      --source include/restart_mysqld.inc
       
      select a, left(b, 9), length(b) from t1;
       
      let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
      exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir;
       
      drop table t1;
      rmdir $targetdir;
      

      preview-10.7-MDEV-12933-provider-plugins 67a8fca9b

      # restart
      select a, left(b, 9), length(b) from t1;
      a	left(b, 9)	length(b)
      0	abcabcabc	300
      bug.t 'innodb'                           [ fail ]
              Test ended at 2021-10-06 19:08:26
       
      CURRENT_TEST: bug.t
      [00] 2021-10-06 19:08:25 Connecting to MariaDB server host: localhost, user: root, password: set, port: 16000, socket: /mnt-hd8t/src/preview-10.7-MDEV-12933-provider-plugins/mysql-test/var/tmp/mysqld.1.sock
      [00] 2021-10-06 19:08:25 Using server version 10.7.0-MariaDB-debug-log
      /mnt-hd8t/src/preview-10.7-MDEV-12933-provider-plugins/extra/mariabackup/mariabackup based on MariaDB server 10.7.0-MariaDB Linux (x86_64)
      [00] 2021-10-06 19:08:25 uses posix_fadvise().
      [00] 2021-10-06 19:08:25 cd to /mnt-hd8t/src/preview-10.7-MDEV-12933-provider-plugins/mysql-test/var/mysqld.1/data/
      [00] 2021-10-06 19:08:25 open files limit requested 1024, set to 1024
      [00] 2021-10-06 19:08:25 mariabackup: using the following InnoDB configuration:
      [00] 2021-10-06 19:08:25 innodb_data_home_dir = 
      [00] 2021-10-06 19:08:25 innodb_data_file_path = ibdata1:12M:autoextend
      [00] 2021-10-06 19:08:25 innodb_log_group_home_dir = ./
      [00] 2021-10-06 19:08:25 InnoDB: Using Linux native AIO
      2021-10-06 19:08:25 0 [Note] InnoDB: Number of pools: 1
      [00] 2021-10-06 19:08:25 mariabackup: Generating a list of tablespaces
      2021-10-06 19:08:25 0 [Warning] InnoDB: './test/t1.ibd' is compressed with snappy, which is not currently loaded
      [00] FATAL ERROR: 2021-10-06 19:08:25 Failed to validate first page of the file test/t1, error 62
      mysqltest: At line 15: exec of '/mnt-hd8t/src/preview-10.7-MDEV-12933-provider-plugins/extra/mariabackup/mariabackup --defaults-file=/mnt-hd8t/src/preview-10.7-MDEV-12933-provider-plugins/mysql-test/var/my.cnf --backup --target-dir=/mnt-hd8t/src/preview-10.7-MDEV-12933-provider-plugins/mysql-test/var/tmp/backup' failed, error: 256, status: 1, errno: 11
      Output from before failure:
      a	left(b, 9)	length(b)
      0	abcabcabc	300
      

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.