Details
-
Bug
-
Resolution: Fixed
-
Major - P3
-
None
-
None
-
None
-
Fully Compatible
-
ALL
-
Sharding 2022-03-07
-
135
Description
When a session is killed in the SessionCatalog, an internal counter is incremented to prevent the session from being checked out for a normal operation until the killer has checked it out. To check out a "child" session (a new concept introduced in PM-2210), the child's "parent" session must also be checked out, which is a separate session in the SessionCatalog. Killing the child only increments the child's counter, so nothing prevents the parent from getting checked out and blocking the killer from checking out the child, which can lead to a deadlock if the parent gets blocked like in the case of a replication state change, where all sessions are killed while the RSTL is held.
Instead, killing a child should also prevent its parent from getting checked out until the killer has checked out the child.