US 11,809,916 B2
Deadlock detection in distributed databases
Chen Luo, San Mateo, CA (US); Alexander Miller, San Mateo, CA (US); and William Waddington, Stateline, NV (US)
Assigned to Snowflake Inc., Bozeman, MT (US)
Filed by Snowflake Inc., Bozeman, MT (US)
Filed on Jan. 12, 2022, as Appl. No. 17/647,752.
Application 17/647,752 is a continuation of application No. 17/334,946, filed on May 31, 2021, granted, now 11,243,820.
Claims priority of provisional application 63/201,487, filed on Apr. 30, 2021.
Prior Publication US 2022/0350677 A1, Nov. 3, 2022
This patent is subject to a terminal disclaimer.
Int. Cl. G06F 9/52 (2006.01); G06F 16/23 (2019.01); G06F 16/25 (2019.01)
CPC G06F 9/524 (2013.01) [G06F 16/2343 (2019.01); G06F 16/2379 (2019.01); G06F 16/256 (2019.01)] 30 Claims
OG exemplary drawing
 
1. A system comprising:
at least one hardware processor; and
a memory storing instructions that cause the at least one hardware processor to perform operations comprising:
executing, using an execution node provided by an execution platform, a first transaction and a second transaction on a database system;
determining, using the execution node provided by the execution platform, that a conflict occurred between the first transaction and the second transaction;
performing, using the execution node, a deadlock detection process, the performing comprising:
storing, using the execution node, a key value pair in a table, the key value pair comprising a key and a value, wherein the key indicates the first transaction and the value indicates the second transaction, and wherein the value includes a statement number;
detecting, using the execution node, based at least in part on a graph traversal of a table starting from the first transaction, a cycle between the first transaction and the second transaction;
determining, using the execution node, that the first transaction is a youngest transaction in the detected cycle; and
ceasing, using the execution node, execution of the first transaction in response to the first transaction being the youngest transaction in the detected cycle.