We are running full backups on replica node.
At times we are seeing this in the processlist and backups is not moving and replication lag increases.
| 738 | system user | | DBX | Query | 19472 | Waiting for table backup lock | DROP TABLE DBX
/* generated by server */ | 19471738 | 0 | 0 |
+---------------+---------------+--------------+---------------------+-------------+-----------+----------------+-----------------------------------------------------+
| OBJECT_TYPE | OBJECT_SCHEMA | OBJECT_NAME | LOCK_TYPE | LOCK_STATUS | THREAD_ID | PROCESSLIST_ID | PROCESSLIST_INFO |
+---------------+---------------+--------------+---------------------+-------------+-----------+----------------+-----------------------------------------------------+
| BACKUP TABLES | NULL | NULL | SHARED | GRANTED | 50313 | 50268 | NULL |
| GLOBAL | NULL | NULL | INTENTION_EXCLUSIVE | GRANTED | 783 | 738 | DROP TABLE `Y` /* generated by server */ |
| BACKUP LOCK | NULL | NULL | INTENTION_EXCLUSIVE | GRANTED | 783 | 738 | DROP TABLE `Y` /* generated by server */ |
| SCHEMA | x | NULL | INTENTION_EXCLUSIVE | GRANTED | 783 | 738 | DROP TABLE `Y` /* generated by server */ |
| TABLE | x | Y | EXCLUSIVE | GRANTED | 783 | 738 | DROP TABLE `Y` /* generated by server */ |
| BACKUP TABLES | NULL | NULL | INTENTION_EXCLUSIVE | PENDING | 783 | 738 | DROP TABLE `Y` /* generated by server */ |
| TABLE | fact | Y | SHARED_HIGH_PRIO | PENDING | 57403 | 57360 | NULL |
+---------------+---------------+--------------+---------------------+-------------+-----------+----------------+-----------------------------------------------------+
I wondering how backup tables and the DDL replicated from primary are under same thread.
Can you post the backup command that you are executing?
Xtrabackup 8.0 will by default use --lock-ddl
Here is more reference,