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

Mariabackup incorrectly thinks we are on a multithreaded slave if slave_parallel_workers > 0

Details

    Description

      I have built a tool that takes backups using mariabackup, and passes the --slave-info option on command line regardless if the server is a slave or not.

      I have just found out that if slave_parallel_workers is not zero, mariabackup gets confused and errors out with:

      The --slave-info option requires GTID enabled for a multi-threaded slave.
      

      Now, this is not a slave, let alone a multi threaded one – that parameter was a leftover.
      So it should not error out.

      Looking at the code I see:

       if (slave_parallel_workers_var != NULL &&
            atoi(slave_parallel_workers_var) > 0)
        {
          have_multi_threaded_slave= true;
        }
      

      This is clearly incorrect; a proper way to detect if the server is a slave (and a multithreaded one) should be used.

      I verified that{{ set global slave_parallel_workers=0 }}fixes the issue.

      Attachments

        Activity

          This sounds like a left-over from MySQL functionality (from XtraBackup presumably) that does not apply to MariaDB.
          MariaDB parallel replication is in-order, and should not affect or be visible to backup.
          In MySQL, the multi-threaded slave can (or used to) operate out-of-order, so that a single non-GTID binlog position was not a usable representation of the current slave replication position.

          So presumably that code should just be skipped when the target is a mariadb server?

          knielsen Kristian Nielsen added a comment - This sounds like a left-over from MySQL functionality (from XtraBackup presumably) that does not apply to MariaDB. MariaDB parallel replication is in-order, and should not affect or be visible to backup. In MySQL, the multi-threaded slave can (or used to) operate out-of-order, so that a single non-GTID binlog position was not a usable representation of the current slave replication position. So presumably that code should just be skipped when the target is a mariadb server?

          I saw the one-line fix in bb-10.5-serg, it looks ok.

          - Kristian.

          knielsen Kristian Nielsen added a comment - I saw the one-line fix in bb-10.5-serg, it looks ok. - Kristian.

          People

            serg Sergei Golubchik
            pizzi Rick Pizzi
            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.