Back to results
US 12,754,919 B2Granted
Transaction processing method, distributed database system, cluster, and medium
AssigneeHuawei Cloud Computing Technologies Co., Ltd.
InventorsXiaoqin Xie, Zongquan Zhang, Wenlong Ma
Life of this patent
Estimating the term…
Abstract
A transaction processing method includes the coordinating node receiving a plurality of query statements sent by a client, creating a transaction based on a first query statement in the plurality of query statements, executing the transaction in the global memory based on a second query statement in the plurality of query statements, and submitting the transaction based on a third query statement in the plurality of query statements.
Claims20
A method, comprising:
- receiving, by a coordinating node of a database system, a plurality of query statements, wherein the database system includes the coordinating node and a participating node, and wherein the coordinating node is an access node of a transaction;
- creating, by the coordinating node and based on a first query statement in the plurality of query statements, the transaction;
- executing, by the coordinating node and based on a second query statement in the plurality of query statements, the transaction in a global memory of the database system, wherein the global memory includes a part of memory in the coordinating node and a part of memory in the participating node, wherein either the coordinating node or the participating node can access the part of the other node in the global memory, wherein the remaining part of the memory in the coordinating node or the participating node is visible to the coordinating node or the participating node, and wherein when the second query statement indicates performing an insert operation and the second query statement carries record data, executing the transaction in the global memory comprises:
- applying for global memory space with a specified quantity of copies;
- and
- filling, based on a node list in which the copies are located, the record data in the global memory of the coordinating node when the coordinating node is a node of a first copy;
- and
- submitting, by the coordinating node and based on a third query statement in the plurality of query statements, the transaction by:
- sending a pre-synchronization request message to the participating node to notify the participating node to fill the record data in a copy of a global memory address of the record data in the participating node, wherein the pre-synchronization request message includes an operation type of insert, the global memory address of the record data, and the record data;
- and
- writing a log file and sending a synchronization request to the participating node to notify the participating node to write a log file after the coordinating node gathers pre-synchronization response messages received from all participating nodes and the pre-synchronization response messages all mark that pre-synchronization succeeds.
8 more elements
A database system, comprising:
- a participating node;
- and
- a coordinating node comprising:
- a first storage medium configured to store computer instructions;
- and
- one or more first processors coupled to the first storage medium and configured to execute the computer instructions to cause the coordinating node to:
- receive a plurality of query statements;
- create, based on a first query statement in the plurality of query statements, a transaction;
- execute, based on a second query statement in the plurality of query statements, the transaction in a global memory of the database system, wherein the global memory includes a part of memory in the coordinating node and part of memory in the participating node, wherein either the coordinating node or the participating node can access the part of memory of the other node in the global memory, wherein the remaining part of memory in the coordinating node or the participating node is visible to the coordinating node or the participating node, and wherein when the second query statement indicates performing an insert operation and the second query statement carries record data, executing the transaction in the global memory comprises:
- applying for global memory space with a specified quantity of copies;
- and
- filling, based on a node list in which the copies are located, the record data in the global memory of the coordinating node when the coordinating node is a node of a first copy;
- and
- submit, based on a third query statement in the plurality of query statements, the transaction by:
- sending a pre-synchronization request message to the participating node to notify the participating node to fill the record data in a copy of a global memory address of the record data in the participating node, wherein the pre-synchronization request message includes an operation type of insert, the global memory address of the record data, and the record data;
- and
- writing a log file and sending a synchronization request to the participating node to notify the participating node to write a log file after the coordinating node gathers pre-synchronization response messages received from all participating nodes and the pre-synchronization response messages all mark that pre-synchronization succeeds.
14 more elements
A coordinating node, comprising:
- a first storage medium configured to store computer instructions;
- and
- one or more first processors coupled to the first storage medium and configured to execute the computer instructions to cause the coordinating node to:
- receive a plurality of query statements;
- create, based on a first query statement in the plurality of query statements, a transaction;
- execute, based on a second query statement in the plurality of query statements, the transaction in a global memory of a database system, wherein the global memory includes a part of memory in the coordinating node and a part of memory in a participating node, wherein either the coordinating node or the participating node can access the part of memory of the other node in the global memory, wherein the remaining part of memory in the coordinating node or the participating node is visible to the coordinating node or the participating node, and wherein when the second query statement indicates performing an insert operation and the second query statement carries record data, executing the transaction in the global memory comprises:
- applying for global memory space with a specified quantity of copies;
- and
- filling, based on a node list in which the copies are located, the record data in the global memory of the coordinating node when the coordinating node is a node of a first copy;
- and
- submit, based on a third query statement in the plurality of query statements, the transaction by:
- sending a pre-synchronization request message to the participating node to notify the participating node to fill the record data in a copy of a global memory address of the record data in the participating node, wherein the pre-synchronization request message includes an operation type of insert, the global memory address of the record data, and the record data;
- and
- writing a log file and sending a synchronization request to the participating node to notify the participating node to write a log file after the coordinating node gathers pre-synchronization response messages received from all participating nodes and the pre-synchronization response messages all mark that pre-synchronization succeeds.
11 more elements
Dependencies are inferred from the claim text.