mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-23586 Mariabackup: GTID saved for replication in 10.4.14 is wrong
MDEV-21953 deadlock between BACKUP STAGE BLOCK_COMMIT and parallel replication Fixed by partly reverting MDEV-21953 to put back MDL_BACKUP_COMMIT locking before log_and_order. The original problem for MDEV-21953 was that while a thread was waiting in for another threads to commit in 'log_and_order', it had the MDL_BACKUP_COMMIT lock. The backup thread was waiting to get the MDL_BACKUP_WAIT_COMMIT lock, which blocks all new MDL_BACKUP_COMMIT locks. This causes a deadlock as the waited-for thread can never get past the MDL_BACKUP_COMMIT lock in ha_commit_trans. The main part of the bug fix is to release the MDL_BACKUP_COMMIT lock while a thread is waiting for other 'previous' threads to commit. This ensures that no transactional thread keeps MDL_BACKUP_COMMIT while waiting, which ensures that there are no deadlocks anymore.
This commit is contained in:
@ -2200,7 +2200,10 @@ public:
|
||||
rpl_io_thread_info *rpl_io_info;
|
||||
rpl_sql_thread_info *rpl_sql_info;
|
||||
} system_thread_info;
|
||||
/* Used for BACKUP LOCK */
|
||||
MDL_ticket *mdl_backup_ticket, *mdl_backup_lock;
|
||||
/* Used to register that thread has a MDL_BACKUP_WAIT_COMMIT lock */
|
||||
MDL_request *backup_commit_lock;
|
||||
|
||||
void reset_for_next_command(bool do_clear_errors= 1);
|
||||
/*
|
||||
|
Reference in New Issue
Block a user