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

Mariabackup: GTID saved for replication in 10.4.14 is wrong

Details

    Description

      It appears that the fix for https://jira.mariadb.org/browse/MDEV-21953 has introduced a serious regression and now any backup taken with MariaDB server 10.4.14 and above saves the wrong GTID.

      To reproduce, take a mariabackup from a 10.4.14 instance, then notice how the reported position does refer to a GTID which is not proper. In the example below, the PIT corresponds to position 25035029, but the reported GTID 0-1-18691 is wrong and if used, yields several duplicate keys errors. In fact the correct GTID for that position would be 0-1-18699 as reported by BINLOG_GTID_POS() function.

      This wrong GTID is saved to the xtrabackup_slave_info and since the position is no longer saved there (WHY???) the resulting backup does not carry a valid PIT information anymore.
      This is hitting a customer of ours and makes all backups inconsistent due to wrong PIT info, hence the critical priority.

      Thanks to aponzo who found and verified this issue.

      Workaround: downgrade server to 10.4.13

      [00] 2020-08-26 12:25:52 Backup created in directory '/root/backup/andre2/xtrabackup_backupfiles/'
      [00] 2020-08-26 12:25:52 MySQL binlog position: filename 'm2-bin.000007', position '25035029', GTID of the last change '0-1-18691'
      [00] 2020-08-26 12:25:52 MySQL slave binlog position: master host '192.168.56.101', gtid_slave_pos 0-1-18691
      [00] 2020-08-26 12:25:52 Streaming backup-my.cnf
      [00] 2020-08-26 12:25:52         ...done
      [00] 2020-08-26 12:25:52 Streaming xtrabackup_info
      [00] 2020-08-26 12:25:52         ...done
      [00] 2020-08-26 12:25:52 Redo log (from LSN 29523906 to 31884588) was copied.
      [00] 2020-08-26 12:25:52 completed OK!
      prepare
      2020-08-26 12:26:53 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=30269374
      2020-08-26 12:26:53 0 [Note] InnoDB: Starting final batch to recover 286 pages from redo log.
      2020-08-26 12:26:53 0 [Note] InnoDB: Last binlog file './m2-bin.000007', position 25035029
      [00] 2020-08-26 12:26:54 Last binlog file ./m2-bin.000007, position 25035029
      [00] 2020-08-26 12:26:54 completed OK!
      MariaDB [test]> SELECT BINLOG_GTID_POS("m2-bin.000007",25035029 );
      +--------------------------------------------+
      | BINLOG_GTID_POS("m2-bin.000007",25035029 ) |
      +--------------------------------------------+
      | 0-1-18699                                  |
      +--------------------------------------------+
      1 row in set (0.133 sec)
      

      Attachments

        Issue Links

          Activity

            rpizzi Rick Pizzi (Inactive) created issue -
            rpizzi Rick Pizzi (Inactive) made changes -
            Field Original Value New Value
            rpizzi Rick Pizzi (Inactive) made changes -
            Summary GTID saved for replication in 10.4.14 is wrong Mariabackup: GTID saved for replication in 10.4.14 is wrong
            julien.fritsch Julien Fritsch made changes -
            Assignee Michael Widenius [ monty ]
            julien.fritsch Julien Fritsch made changes -
            Fix Version/s 10.4 [ 22408 ]
            GeoffMontee Geoff Montee (Inactive) made changes -
            rpizzi Rick Pizzi (Inactive) made changes -
            Description It appears that the fix for https://jira.mariadb.org/browse/MDEV-21953 has introduced a serious regression and now any backup taken with MariaDB server 10.4.14 and above saves the wrong GTID.

            To reproduce, take a mariabackup from a 10.4.14 instance, then notice how the reported position does refer to a GTID which is not proper. In the example below, the PIT corresponds to position 25035029, but the reported GTID 0-1-18691 is wrong and if used, yields several duplicate keys errors. In fact the correct GTID for that position would be 0-1-18699 as reported by BINLOG_GTID_POS() function.

            This wrong GTID is saved to the xtrabackup_binlog_info and since the position is no longer saved there (WHY???) *the resulting backup does not carry a valid PIT information anymore*.
            This is hitting a customer of ours and makes all backups inconsistent due to wrong PIT info, hence the critical priority.

            Thanks to [~aponzo] who found and verified this issue.


            Workaround: downgrade server to 10.4.13

            {code}
            [00] 2020-08-26 12:25:52 Backup created in directory '/root/backup/andre2/xtrabackup_backupfiles/'
            [00] 2020-08-26 12:25:52 MySQL binlog position: filename 'm2-bin.000007', position '25035029', GTID of the last change '0-1-18691'
            [00] 2020-08-26 12:25:52 MySQL slave binlog position: master host '192.168.56.101', gtid_slave_pos 0-1-18691
            [00] 2020-08-26 12:25:52 Streaming backup-my.cnf
            [00] 2020-08-26 12:25:52 ...done
            [00] 2020-08-26 12:25:52 Streaming xtrabackup_info
            [00] 2020-08-26 12:25:52 ...done
            [00] 2020-08-26 12:25:52 Redo log (from LSN 29523906 to 31884588) was copied.
            [00] 2020-08-26 12:25:52 completed OK!
            prepare
            2020-08-26 12:26:53 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=30269374
            2020-08-26 12:26:53 0 [Note] InnoDB: Starting final batch to recover 286 pages from redo log.
            2020-08-26 12:26:53 0 [Note] InnoDB: Last binlog file './m2-bin.000007', position 25035029
            [00] 2020-08-26 12:26:54 Last binlog file ./m2-bin.000007, position 25035029
            [00] 2020-08-26 12:26:54 completed OK!
            MariaDB [test]> SELECT BINLOG_GTID_POS("m2-bin.000007",25035029 );
            +--------------------------------------------+
            | BINLOG_GTID_POS("m2-bin.000007",25035029 ) |
            +--------------------------------------------+
            | 0-1-18699 |
            +--------------------------------------------+
            1 row in set (0.133 sec)
            {code}
            It appears that the fix for https://jira.mariadb.org/browse/MDEV-21953 has introduced a serious regression and now any backup taken with MariaDB server 10.4.14 and above saves the wrong GTID.

            To reproduce, take a mariabackup from a 10.4.14 instance, then notice how the reported position does refer to a GTID which is not proper. In the example below, the PIT corresponds to position 25035029, but the reported GTID 0-1-18691 is wrong and if used, yields several duplicate keys errors. In fact the correct GTID for that position would be 0-1-18699 as reported by BINLOG_GTID_POS() function.

            This wrong GTID is saved to the xtrabackup_slave_info and since the position is no longer saved there (WHY???) *the resulting backup does not carry a valid PIT information anymore*.
            This is hitting a customer of ours and makes all backups inconsistent due to wrong PIT info, hence the critical priority.

            Thanks to [~aponzo] who found and verified this issue.


            Workaround: downgrade server to 10.4.13

            {code}
            [00] 2020-08-26 12:25:52 Backup created in directory '/root/backup/andre2/xtrabackup_backupfiles/'
            [00] 2020-08-26 12:25:52 MySQL binlog position: filename 'm2-bin.000007', position '25035029', GTID of the last change '0-1-18691'
            [00] 2020-08-26 12:25:52 MySQL slave binlog position: master host '192.168.56.101', gtid_slave_pos 0-1-18691
            [00] 2020-08-26 12:25:52 Streaming backup-my.cnf
            [00] 2020-08-26 12:25:52 ...done
            [00] 2020-08-26 12:25:52 Streaming xtrabackup_info
            [00] 2020-08-26 12:25:52 ...done
            [00] 2020-08-26 12:25:52 Redo log (from LSN 29523906 to 31884588) was copied.
            [00] 2020-08-26 12:25:52 completed OK!
            prepare
            2020-08-26 12:26:53 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=30269374
            2020-08-26 12:26:53 0 [Note] InnoDB: Starting final batch to recover 286 pages from redo log.
            2020-08-26 12:26:53 0 [Note] InnoDB: Last binlog file './m2-bin.000007', position 25035029
            [00] 2020-08-26 12:26:54 Last binlog file ./m2-bin.000007, position 25035029
            [00] 2020-08-26 12:26:54 completed OK!
            MariaDB [test]> SELECT BINLOG_GTID_POS("m2-bin.000007",25035029 );
            +--------------------------------------------+
            | BINLOG_GTID_POS("m2-bin.000007",25035029 ) |
            +--------------------------------------------+
            | 0-1-18699 |
            +--------------------------------------------+
            1 row in set (0.133 sec)
            {code}
            julien.fritsch Julien Fritsch made changes -
            Labels need_feedback
            julien.fritsch Julien Fritsch made changes -
            Assignee Michael Widenius [ monty ] Vladislav Lesin [ vlad.lesin ]
            julien.fritsch Julien Fritsch made changes -
            Labels need_feedback
            vlad.lesin Vladislav Lesin made changes -
            Assignee Vladislav Lesin [ vlad.lesin ] Michael Widenius [ monty ]
            monty Michael Widenius made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            monty Michael Widenius made changes -
            Assignee Michael Widenius [ monty ] Sergei Golubchik [ serg ]
            Status In Progress [ 3 ] In Review [ 10002 ]
            vlad.lesin Vladislav Lesin made changes -
            serg Sergei Golubchik made changes -
            Priority Critical [ 2 ] Blocker [ 1 ]
            serg Sergei Golubchik made changes -
            Fix Version/s 10.5 [ 23123 ]
            monty Michael Widenius made changes -
            issue.field.resolutiondate 2020-09-25 14:22:50.0 2020-09-25 14:22:50.189
            monty Michael Widenius made changes -
            Fix Version/s 10.4.15 [ 24507 ]
            Fix Version/s 10.5.6 [ 24508 ]
            Fix Version/s 10.4 [ 22408 ]
            Fix Version/s 10.5 [ 23123 ]
            Assignee Sergei Golubchik [ serg ] Michael Widenius [ monty ]
            Resolution Fixed [ 1 ]
            Status In Review [ 10002 ] Closed [ 6 ]
            ralf.gebhardt Ralf Gebhardt made changes -
            Fix Version/s 10.5.7 [ 25019 ]
            ralf.gebhardt Ralf Gebhardt made changes -
            Fix Version/s 10.5.6 [ 24508 ]
            ralf.gebhardt Ralf Gebhardt made changes -
            Fix Version/s 10.4.16 [ 25020 ]
            ralf.gebhardt Ralf Gebhardt made changes -
            Fix Version/s 10.4.15 [ 24507 ]
            elenst Elena Stepanova made changes -
            marko Marko Mäkelä made changes -
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 112953 ] MariaDB v4 [ 158300 ]
            mariadb-jira-automation Jira Automation (IT) made changes -
            Zendesk Related Tickets 120782 129317

            People

              monty Michael Widenius
              rpizzi Rick Pizzi (Inactive)
              Votes:
              4 Vote for this issue
              Watchers:
              14 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.