US 11,669,518 B1
Method and system for processing database transactions in a distributed online transaction processing (OLTP) database
Yuk Kuen Chan, Markham (CA); Ronen Grosman, Markham (CA); Seyyed Mohammad Hadi Sajjadpour, Markham (CA); Hoi leng Lao, Markham (CA); Wen Hao Zhang, Scarborough (CA); and Chung Yin Alan Wong, Toronto (CA)
Assigned to Huawei Technologies Co., Ltd., Shenzhen (CN)
Filed by Yuk Kuen Chan, Markham (CA); Ronen Grosman, Markham (CA); Seyyed Mohammad Hadi Sajjadpour, Markham (CA); Hoi leng Lao, Markham (CA); Wen Hao Zhang, Scarborough (CA); and Chung Yin Alan Wong, Toronto (CA)
Filed on Dec. 14, 2021, as Appl. No. 17/550,547.
Int. Cl. G06F 16/23 (2019.01); G06F 16/245 (2019.01)
CPC G06F 16/2379 (2019.01) [G06F 16/245 (2019.01)] 20 Claims
OG exemplary drawing
 
1. A method of processing database transactions, the method comprising:
receiving, at a coordinator node, a query for a transaction comprising one or more statements;
at a data node comprising one or more data records referenced in a single-shard read statement in the transaction:
receiving, from the coordinator node, the single-shard read statement;
generating a local database snapshot and a copy of a prepared list, wherein the prepared list comprises a list of transactions having one or more multi-shard write statements that have been prepared but not been committed, wherein transactions in the prepared list are identified by a respective local transaction identifier (TXID);
determining, for each data record in the one or more data records, a TXID of a previous transaction associated with each data record in the one or more data records referenced in the single-shard read statement;
determining, for each data record in the one or more data records, whether a transaction associated the data record is present in the copy of the prepared list by comparing the TXID of the previous transaction to the TXIDs in the copy of the prepared list to determine if a match exists;
responsive to a determination that one or more data records in referenced in the single-shard read statement are present in the copy of the prepared list, causing the single-shard read statement to await processing until all matching transactions identified in the prepared list are either committed or aborted;
determining a visibility of one or more committed changes to the one or more data records referenced in the single-shard read statement upon all matching the transactions identified in the prepared list being either committed or aborted; and
processing the single-shard read statement based on the determined visibility of the one or more committed changes to the one or more data records referenced in the single-shard read statement.