diff options
author | Monty <monty@mariadb.org> | 2020-09-07 10:38:12 +0300 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2020-09-25 13:07:03 +0300 |
commit | 16ea692ed490a1a2c6dc0b855247d5bd02bd2345 (patch) | |
tree | 8cb9b735863d827a9839c937a904cb8d8c84fc2f /sql/handler.h | |
parent | 3cdbaa04bd573f2f09e2f7ff69c71e8b97ca078b (diff) | |
download | mariadb-git-16ea692ed490a1a2c6dc0b855247d5bd02bd2345.tar.gz |
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.
Diffstat (limited to 'sql/handler.h')
-rw-r--r-- | sql/handler.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/handler.h b/sql/handler.h index 80d0f1b59d8..3b0cedfcd96 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -5024,7 +5024,7 @@ int ha_change_key_cache(KEY_CACHE *old_key_cache, KEY_CACHE *new_key_cache); /* transactions: interface to handlerton functions */ int ha_start_consistent_snapshot(THD *thd); int ha_commit_or_rollback_by_xid(XID *xid, bool commit); -int ha_commit_one_phase(THD *thd, bool all, bool rw_trans); +int ha_commit_one_phase(THD *thd, bool all); int ha_commit_trans(THD *thd, bool all); int ha_rollback_trans(THD *thd, bool all); int ha_prepare(THD *thd); |