CPC G06F 16/2343 (2019.01) [G06F 16/2365 (2019.01); G06F 16/2379 (2019.01)] | 18 Claims |
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.
|