Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.5
-
None
Description
This problem is similar to MDEV-33798, but involves DDL and not just DML.
What happens here is that we have two DML transactions T1 and T2 in
domain_id=0 that access a table, and an ALTER TABLE in domain_id=1 that adds
an index to the same table.
First T2 starts, it gets a shared metadata lock on the table and then starts
waiting for prior commit of T1.
Then ALTER starts, it requests an exclusive metadata lock and thus waits on
T2.
Then T1 starts, its request for a shared metadata lock is blocked by the
pending lock for ALTER TABLE.
This results in a deadlock.
I have not yet come up with a test case, but I believe unfortunately the
patch for MDEV-33798 will not solve this case. Because DDL uses metadata
locks, and these locks currently do not report waits to the
thd_rpl_deadlock_check() function and thus the T2 will not be killed and
retried to resolve the deadlock.
Attachments
Issue Links
- is duplicated by
-
MDEV-36403 metadata deadlock on restore system table
-
- Open
-
- relates to
-
MDEV-33798 ROW base optimistic deadlock with concurrent writes on same table row and multi domain
-
- Closed
-