Hi all,
I’m running MySQL 8.0.35 on RHEL 8.8 and am using Xtrabackup 8.0.34-29.
When I run a backup using the following command:
xtrabackup --backup --target-dir=${BACKUPDIR} --compress
I get the following warnings dumped to /var/log/mysqld.log and performance_schema.error_log:
2024-05-08T20:01:48.333785+10:00 7 [Warning] [MY-014054] [Repl] Could not purge binary logs since another session is executing LOCK INSTANCE FOR BACKUP. Wait for that session to release the lock.
2024-05-08T20:01:48.333980+10:00 7 [Warning] [MY-014054] [Repl] Could not purge binary logs since another session is executing LOCK INSTANCE FOR BACKUP. Wait for that session to release the lock.
It looks like the backup is triggering a binary log switch which then triggers a purge which is failing. Looking at the date stamps on the binary logs, I see this happens during every backup (daily @ 8pm) and the file date stamp matches the error_log messages:
-rw-r-----. 1 mysql mysql 501M May 7 17:00 /var/lib/mysql/mysql-bin.005354
-rw-r-----. 1 mysql mysql 367M May 7 20:01 /var/lib/mysql/mysql-bin.005355
-rw-r-----. 1 mysql mysql 501M May 7 22:09 /var/lib/mysql/mysql-bin.005356
-rw-r-----. 1 mysql mysql 501M May 8 03:58 /var/lib/mysql/mysql-bin.005357
-rw-r-----. 1 mysql mysql 501M May 8 07:49 /var/lib/mysql/mysql-bin.005358
-rw-r-----. 1 mysql mysql 501M May 8 09:08 /var/lib/mysql/mysql-bin.005359
-rw-r-----. 1 mysql mysql 501M May 8 10:32 /var/lib/mysql/mysql-bin.005360
-rw-r-----. 1 mysql mysql 501M May 8 11:53 /var/lib/mysql/mysql-bin.005361
-rw-r-----. 1 mysql mysql 501M May 8 13:12 /var/lib/mysql/mysql-bin.005362
-rw-r-----. 1 mysql mysql 501M May 8 14:46 /var/lib/mysql/mysql-bin.005363
-rw-r-----. 1 mysql mysql 501M May 8 16:34 /var/lib/mysql/mysql-bin.005364
-rw-r-----. 1 mysql mysql 418M May 8 20:01 /var/lib/mysql/mysql-bin.005365
-rw-r-----. 1 mysql mysql 501M May 8 23:25 /var/lib/mysql/mysql-bin.005366
-rw-r-----. 1 mysql mysql 501M May 9 06:33 /var/lib/mysql/mysql-bin.005367
Checking the backup log file, there doesn’t seem to be any indication of an issue or a log switch.
This occurs on all of our MySQL servers (4 production and 7 non-production).
Is there any way to prevent these warnings?