US 11,940,972 B2
Execution of operations on partitioned tables
Xiaoke Liu, Xi'an (CN); Zhilong Hao, Xi'an (CN); Weimin Qi, Xi'an (CN); Zhe Qu, Xi'an (CN); Jiaxin Liu, Xi'an (CN); and Qingwei Ren, Xi'an (CN)
Assigned to SAP SE, Walldorf (DE)
Filed by SAP SE, Walldorf (DE)
Filed on May 27, 2022, as Appl. No. 17/826,974.
Prior Publication US 2023/0385263 A1, Nov. 30, 2023
Int. Cl. G06F 16/23 (2019.01); G06F 16/22 (2019.01); G06F 16/2455 (2019.01)
CPC G06F 16/2308 (2019.01) [G06F 16/2282 (2019.01); G06F 16/24554 (2019.01)] 20 Claims
OG exemplary drawing
 
1. One or more non-transitory computer-readable media storing computer-executable instructions that, when executed by a processor, perform a method for utilizing partition-based locking mechanisms to improve execution of overlapping data definition language (DDL) and data manipulation language (DML) operations on a partitioned database table, the method comprising:
receiving, by a first database node, one or more DML statements associated with a first transaction on a first table partition;
acquiring, by the first database node, a first-node intent exclusive lock on table metadata associated with the partitioned database table for the first transaction;
in response to receiving, by a second database node, a DDL statement associated with a second transaction operating on the partitioned database table:
acquiring, by the second database node, a second-node exclusive lock on second-node table metadata associated with the partitioned database table;
acquiring, by the second database node, a second-node intent exclusive lock on table data of the first table partition;
acquiring, by the first database node, a first-node exclusive lock on first-node table metadata;
executing, by the second database node, operations associated with a first one of the one or more DML statements; and
in response to determining that the operations associated with the one or more DML statements have successfully completed, committing the second transaction;
acquiring, by the first database node, an exclusive lock on first-node table metadata data;
acquiring, by the second database node, an all-partition exclusive lock on table data of each of the partitions of the partitioned table;
executing, by the first database node, operations associated with the DDL statement; and
in response to determining that the operations associated with the DDL statement have successfully completed, committing the first transaction.