US 11,755,558 B2
Transaction identifier locking with data row locks
Chaitanya Sreenivas Ravella, Bellevue, WA (US); Prashanth Purnananda, Bellevue, WA (US); Raghavendra Thallam Kodandaramaih, Redmond, WA (US); Peter Byrne, Charlotte Hall, MD (US); Hanumantha Rao Kodavalla, Sammamish, WA (US); Girish Mittur Venkataramanappa, Redmond, WA (US); Panagiotis Antonopoulos, Redmond, WA (US); Adrian-Leonard Radu, Sammamish, WA (US); Wei Chen, Sammamish, WA (US); and Craig Steven Freedman, Sammamish, WA (US)
Assigned to Microsoft Technology Licensing, LLC, Redmond, WA (US)
Filed by Microsoft Technology Licensing, LLC, Redmond, WA (US)
Filed on Jun. 25, 2021, as Appl. No. 17/358,773.
Prior Publication US 2022/0414081 A1, Dec. 29, 2022
Int. Cl. G06F 16/00 (2019.01); G06F 16/23 (2019.01)
CPC G06F 16/2343 (2019.01) [G06F 16/2365 (2019.01); G06F 16/2379 (2019.01)] 18 Claims
OG exemplary drawing
 
1. A computing device comprising:
non-volatile memory storing a database including a table having a plurality of rows; and
a processor configured to:
receive a request to perform a first transaction on a row of the plurality of rows;
assign a first transaction identifier (TID) of the first transaction to the row;
impose a first exclusive TID lock on the first TID of the row;
impose a first exclusive data lock associated with the first transaction on the row;
perform the first transaction on the row, wherein performing the first transaction includes modifying the table as stored in the memory;
subsequently to imposing the first exclusive TID lock and the first exclusive data lock and prior to completing the first transaction, receive a request to perform a second transaction on the row and prevent the second transaction from being performed on the row while the first exclusive TID lock and first exclusive data lock are held;
in response to completing the first transaction:
release the first exclusive data lock on the row; and
release the first exclusive TID lock on the first TID of the row;
in response to releasing the first exclusive TID lock and the first exclusive data lock, impose a second exclusive data lock associated with the second transaction on the row;
in response to imposing the second exclusive data lock on the row, assign a second TID associated with the second transaction to the row;
perform the second transaction on the row, wherein performing the second transaction includes modifying the table as stored in the memory; and
in response to completing the second transaction, release the second exclusive data lock on the row.