New MySQL 8.0.21 and Percona XtraBackup 8.0.13 Issues
On Monday, July 13, 2020, Oracle released MySQL 8.0.21. This release contained a few new changes that cause issues with Percona XtraBackup.
First, this release introduced the ability to temporarily disable InnoDB redo logging (see the work log and documentation). If you love your data, this feature should ONLY be used to speed up an initial logical data import and should never be used under a production workload.
When used, this new feature creates some interesting complications for Percona XtraBackup that you need to be aware of. The core requirement for XtraBackup to be able to make consistent hot backups is to have some form of redo or write ahead log to copy and read from. Disabling the InnoDB redo log will prevent XtraBackup from making a consistent backup. As of XtraBackup 8.0.13, the process of making a backup with the InnoDB redo log disabled will succeed, but the backup will be useless. We are working towards adding some validation to a future release of XtraBackup that will cause it to detect and fail earlier in the process.
XtraBackup has the –lock-ddl option that can help prevent a backup from failing due to a DDL operation occurring during the backup. This option can also be used to help to prevent the toggling of InnoDB redo logs during the backup process. Here is the current truth table that explains the potential outcome based on the various combinations of starting states and –lock-ddl:
- With –lock-ddl
- With REDO enabled at start – good backup
- With REDO disabled at start – bad backup, prepare may even succeed
- Can not disable or enable redo during backup
- Without –lock-ddl
- With REDO enabled – good backup
- With REDO disabled – bad backup, prepare may even succeed
- Can disable and enable redo during backup, if so, bad backup, prepare may even succeed
Second, this worklog modified the handling of the
ALTER UNDO TABLESPACE tablespace_name SET INACTIVE operation and will cause XtraBackup to hang during the backup phase if this operation is executed and exists within the InnoDB redo log.
Look out for the upcoming release of Percona Server 8.0.21 and Percona XtraBackup 8.0.14 which will have more advanced detection and locking to ensure that you are making good, clean, consistent backups.
by George O. Lorch III via Percona Database Performance Blog