US 12,131,200 B2
Balanced winner assignment for deadlock resolution
Vladimir Shveidel, Pardes-Hana (IL); Amitai Alkalay, Kadima (IL); and Bar David, Rishon Lezion (IL)
Assigned to EMC IP Holding Company LLC, Hopkinton, MA (US)
Filed by EMC IP Holding Company LLC, Hopkinton, MA (US)
Filed on Jul. 1, 2021, as Appl. No. 17/364,937.
Prior Publication US 2023/0004448 A1, Jan. 5, 2023
Int. Cl. G06F 9/52 (2006.01); G06F 9/46 (2006.01)
CPC G06F 9/524 (2013.01) [G06F 9/466 (2013.01)] 19 Claims
OG exemplary drawing
 
1. A computer implemented method comprising:
performing first processing that includes role switching of a winner role and a loser role between a first node and a second node, wherein the winner role and the loser role are used in connection with resolving detected deadlocks or potential deadlocks, wherein prior to performing said first processing, the first node has the loser role and the second node has the winner role, wherein said first processing includes:
the first node updating a first current state of the first node from a value, denoting that the first node has the loser role and the second node has the winner role, to a first value indicating a “no winner” state and that role switching of the winner role and the loser role is in progress;
detecting at a first point in time, by the first node while the first current state of the first node has the first value indicating the “no winner” state, a deadlock or potential deadlock between the first node performing processing for a first transaction and the second node performing processing for a second transaction;
responsive to said detecting at the first point in time, by the first node while the first current state of the first node has the first value indicating the “no winner” state, the deadlock or potential deadlock between the first node and the second node, waiting to perform deadlock resolution processing in accordance with the loser role and the winner role to resolve the deadlock or potential deadlock detected in said detecting by the first node by placing a first conflicting lock request between the first transaction and the second transaction on a first queue until a second point in time when the first current state of the first node has been further updated by the first processing from the first value to a second value, wherein the first value indicates the “no winner” state, and wherein the first current state of the first node having the second value indicates that the first node has the winner role and that the second node has the loser role;
while the first current state of the first node as updated by said updating has the first value denoting the “no winner” state and subsequent to said waiting to perform deadlock resolution processing to resolve the deadlock or potential deadlock detected, the first node sending to the second node a new winner value indicating that the first node is transitioning from the loser role to the winner role and also indicating that the second node is transitioning from the winner role to the loser role;
responsive to the second node receiving the new winner value from the first node, the second node updating a second current state of the second node to the second value in accordance with the new winner value, where the second value of the second current state after updating by the second node indicates that the first node has the winner role and the second node has the loser role;
subsequent to the second node updating the second current state to the second value, the second node sending a reply to the first node; and
in response to the first node receiving the reply from the second node, the first node updating, at the second point in time, the first current state of the first node from the first value indicating the “no winner” state to the second value indicating that the first node has the winner role and the second node has the loser role.