Uploaded image for project: 'Percona XtraBackup'
  1. Percona XtraBackup
  2. PXB-1783

Xtrabackup GTID is incorrect after prepare

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Low
    • Resolution: Fixed
    • Affects Version/s: 2.4.13, 8.0.x
    • Fix Version/s: 2.4.20, 8.0.11
    • Component/s: Documentation
    • Labels:
      None

      Description

      I'm making a backup for Percona Server 5.7.24 with GTID configured while sysbench is running.
      After starting a new instance Executed_Gtid_Set:
      1f57e990-2b5e-11e9-a7a2-0242ac110002:1-5
      But xtrabackup_binlog_info shows a correct (proven by configuring replication and checksums for resulting sbtest1 table):
      1f57e990-2b5e-11e9-a7a2-0242ac110002:1-1555

      docker exec -it p5724sl mysql -uroot -psecret -e 'show master status;'
      mysql: [Warning] Using a password on the command line interface can be insecure.
      +-------------------------+----------+--------------+------------------+------------------------------------------+
      | File                    | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set                        |
      +-------------------------+----------+--------------+------------------+------------------------------------------+
      | cacdc48c8066-bin.000001 |      154 |              |                  | 1f57e990-2b5e-11e9-a7a2-0242ac110002:1-5 |
      +-------------------------+----------+--------------+------------------+------------------------------------------+
      $ cat mysql/xtrabackup_binlog_info
      eedbac7620e8-bin.000003	191881298	1f57e990-2b5e-11e9-a7a2-0242ac110002:1-1555
      cat mysql/xtrabackup_binlog_pos_innodb
      eedbac7620e8-bin.000003	191881298
      

      How to reproduce the issue:

      Dockerfile:
      FROM percona:5.7.24
      USER root
      RUN yum install --nogpg -y sysbench percona-xtrabackup-24
      USER mysql
      
      docker build -t percona-server-with-sysbench:5.7.24 .
      docker run -d --name p5724 -e MYSQL_ROOT_PASSWORD=secret -p 3306:3306 percona-server-with-sysbench:5.7.24 --gtid_mode=ON --log-bin --log-slave-updates --enforce-gtid-consistency --server-id=51
      
      docker exec p5724 mysql -uroot -psecret -e 'create database sbtest'
      docker exec p5724 sysbench --mysql-user=root --mysql-password=secret /usr/share/sysbench/oltp_read_write.lua --table_size=1000000 prepare
      nohup docker exec p5724 sysbench --time=600 --mysql-user=root --mysql-password=secret /usr/share/sysbench/oltp_read_write.lua --table_size=1000000  run &
      docker exec -it p5724 innobackupex --user=root --password=secret /tmp/
      docker exec -it p5724 xtrabackup --prepare --target-dir=/tmp/2019-02-08_05-04-33
      docker exec -it p5724 tar cf /tmp/backup.tar.gz /tmp/2019-02-08_05-04-33
      docker cp p5724:/tmp/backup.tar.gz ./
      tar xf backup.tar.gz
      mv tmp/* mysql
      chmod ogu+rwX -R mysql
      docker run -d -v $PWD/mysql:/var/lib/mysql --name p5724sl -e MYSQL_ROOT_PASSWORD=secret -p 3307:3306 percona-server-with-sysbench:5.7.24 --gtid_mode=ON --log-bin --log-slave-updates --enforce-gtid-consistency --server-id=52
      docker exec -it p5724sl mysql -uroot -psecret -e 'show master status;'
      cat mysql/xtrabackup_binlog_pos_innodb
      cat mysql/xtrabackup_binlog_info
      

      If this is an expected behavior, please mention that GTID position after prepare is incorrect at https://www.percona.com/doc/percona-xtrabackup/2.4/howtos/recipes_ibkx_gtid.html

        Smart Checklist

          Attachments

            Activity

              People

              Assignee:
              borys.belinsky Borys Belinsky (Inactive)
              Reporter:
              nickolay.ihalainen Nickolay Ihalainen
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - Not Specified
                  Not Specified
                  Logged:
                  Time Spent - 1 day, 1 hour
                  1d 1h