Distributed transaction node information storage method, device, equipment and medium

文档序号:7125 发布日期:2021-09-17 浏览:27次 中文

1. A distributed transaction node information storage method is characterized by comprising the following steps:

acquiring branch transaction information associated with the distributed transaction, and constructing a distributed transaction node list;

determining storage nodes corresponding to all data nodes in the distributed transaction node list, wherein the storage nodes are selected from other data nodes except the corresponding data nodes in the distributed transaction node list;

and when the distributed transaction is submitted, storing the node information of each data node into the corresponding storage node.

2. The method according to claim 1, wherein the determining storage nodes corresponding to the data nodes in the distributed transaction node list includes:

sequencing all data nodes contained in the distributed transaction node list, and determining a head end data node, a middle data node and a tail end data node;

taking the tail end data node as a storage node corresponding to the head end data node;

for each intermediate data node, taking a previous data node adjacent to the intermediate data node as a storage node corresponding to the intermediate data node;

and taking the previous data node adjacent to the tail end data node as a storage node corresponding to the tail end data node.

3. The distributed transaction node information storage method according to claim 1, wherein the storing node information of each data node into a corresponding storage node includes:

for each data node, determining data node information of the data node and storage node information of a corresponding storage node;

acquiring a transaction number of the distributed transaction, and forming node storage information of the data node based on the transaction number, the data node information and the storage node information;

and sending the node storage information to a corresponding storage node for storage.

4. The distributed transaction node information storage method of claim 1, wherein the method further comprises:

receiving check node storage information sent by a data node;

and when the target distributed transaction related to the check node storage information does not exist, constructing a target distributed transaction node list according to the check node storage information.

5. The distributed transaction node information storage method of claim 4, wherein the building of the target distributed transaction node list according to the check node storage information comprises:

determining a check data node and a check storage node contained in the check node storage information;

taking the check storage node as a target data node, acquiring target node storage information stored by the target data node, and determining a target storage node in the target node storage information;

determining the target storage node as a next target data node, and continuously determining the next target storage node until the newly determined target storage node is the check data node;

and forming a target distributed transaction node list according to all the searched target storage nodes.

6. A distributed transactional node information storage apparatus, comprising:

the transaction node list building module is used for obtaining branch transaction information related to the distributed transaction and building a distributed transaction node list;

a storage node determining module, configured to determine storage nodes corresponding to the data nodes in the distributed transaction node list, where a storage node is selected from other data nodes in the distributed transaction node list except the corresponding data node;

and the node information storage module is used for storing the node information of each data node into the corresponding storage node when the distributed transaction is submitted.

7. The distributed transaction node information storage apparatus of claim 6, wherein the node information storage module is specifically configured to:

when the distributed transaction is submitted, determining data node information of the data nodes and storage node information of corresponding storage nodes for each data node;

acquiring a transaction number of the distributed transaction, and forming node storage information of the data node based on the transaction number, the data node information and the storage node information;

and sending the node storage information to a corresponding storage node for storage.

8. The distributed transaction node information storage apparatus of claim 6, further comprising a transaction node list reconstruction module, wherein the transaction node list reconstruction module is configured to:

receiving check node storage information sent by a data node;

and when the target distributed transaction related to the check node storage information does not exist, constructing a target distributed transaction node list according to the check node storage information.

9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the distributed transaction node information storage method according to any one of claims 1 to 5 when executing the program.

10. A storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform the distributed transactional node information storage method of any of claims 1-5.

Background

In the distributed database system, a node for receiving and processing various requests of a client and not storing any data by itself is called a Compute Node (CN), and a data modification request node for providing data to the compute node and processing the compute node is called a Data Node (DN). One transaction of the computing node corresponds to the branch transaction of the data nodes, and the computing node and the data nodes cooperate through a network, and the jointly completed transactions form a distributed transaction.

When the transaction of the computing node is submitted or rolled back, the branch transaction of each data node is also synchronously submitted or rolled back, so that the transaction consistency among different nodes, namely distributed transaction consistency, is ensured. Data modifications corresponding to related nodes of a transaction are all submitted or all rolled back, so that the consistency of the transaction can be ensured.

To address the issue of distributed transaction consistency, the transaction commit operation of a compute node may be divided into one phase and two phases. The transaction in a certain data node can still execute rollback after completing a phase of commit, and the transaction information can not be lost after the fault is restarted. When one-stage submission is carried out, as long as one data node fails to submit in one stage, the system is in failure, and all operations in one stage need to be rolled back. The data node may continue to be notified to perform a two-phase commit only if all branch transactions complete the one-phase commit. All data nodes in the first stage are successfully submitted, which means that the first stage is successfully submitted, and two-stage submission can be entered, wherein the two-stage submission success means that the distributed transaction is successfully submitted.

In order to ensure the consistency of the transactions during fault processing of the distributed database, the computing node needs to collect the states of all branch transactions and determine subsequent operations based on the collected states, such as: when a data node does not complete the one-stage submission, the one-stage submission fails, and at this time, the computing node needs to inform all data nodes of executing rollback; when all the data nodes complete the one-phase commit, indicating that the one-phase commit is successful, the compute node needs to continue to notify the data nodes to perform the two-phase commit. One premise of the operation is to have an explicit distributed transaction node list, which needs to contain all data node information related to the distributed transaction, so as to determine the branch transaction state in the corresponding data node, the transaction state of the distributed transaction as a whole, and subsequent commit or rollback operations.

Because the computing node does not store any data, in order to avoid the loss of the transaction information after the failure restart, the computing node needs to send a list containing all the distributed transaction nodes to each data node and perform data grounding, and when the computing node is failed and restarted, the data node can inform the computing node to reconstruct the distributed transaction according to the node list. However, the above operations have problems that when a distributed transaction involves many data nodes, messages sent by the computing nodes to the distributed transaction node list are expanded, and the operation of saving the node list by the data nodes also affects the write performance due to a large amount of data.

Disclosure of Invention

The invention provides a method, a device, equipment and a medium for storing distributed transaction node information, which are used for rapidly and accurately acquiring node information from related data nodes when a computing node fails and is restarted, and finally constructing a complete distributed transaction node list.

In a first aspect, an embodiment of the present invention provides a distributed transaction node information storage method, including:

acquiring branch transaction information associated with the distributed transaction, and constructing a distributed transaction node list;

determining storage nodes corresponding to all data nodes in the distributed transaction node list, wherein the storage nodes are selected from other data nodes except the corresponding data nodes in the distributed transaction node list;

and when the distributed transaction is submitted, storing the node information of each data node into the corresponding storage node.

Optionally, the determining storage nodes corresponding to the data nodes in the distributed transaction node list respectively includes:

sequencing all data nodes contained in the distributed transaction node list, and determining a head end data node, a middle data node and a tail end data node;

taking the tail end data node as a storage node corresponding to the head end data node;

for each intermediate data node, taking a previous data node adjacent to the intermediate data node as a storage node corresponding to the intermediate data node;

and taking the previous data node adjacent to the tail end data node as a storage node corresponding to the tail end data node.

Optionally, the storing the node information of each data node into a corresponding storage node includes:

for each data node, determining data node information of the data node and storage node information of a corresponding storage node;

acquiring a transaction number of the distributed transaction, and forming node storage information of the data node based on the transaction number, the data node information and the storage node information;

and sending the node storage information to a corresponding storage node for storage.

Optionally, the method further includes:

receiving check node storage information sent by a data node;

and when the target distributed transaction related to the check node storage information does not exist, constructing a target distributed transaction node list according to the check node storage information.

Optionally, the constructing a target distributed transaction node list according to the check node storage information includes:

determining a check data node and a check storage node contained in the check node storage information;

taking the check storage node as a target data node, acquiring target node storage information stored by the target data node, and determining a target storage node in the target node storage information;

determining the target storage node as a next target data node, and continuously determining the next target storage node until the newly determined target storage node is the check data node;

and forming a target distributed transaction node list according to all the searched target storage nodes.

In a second aspect, an embodiment of the present invention further provides a distributed transaction node information storage apparatus, where the apparatus includes:

the transaction node list building module is used for obtaining branch transaction information related to the distributed transaction and building a distributed transaction node list;

a storage node determining module, configured to determine storage nodes corresponding to the data nodes in the distributed transaction node list, where a storage node is selected from other data nodes in the distributed transaction node list except the corresponding data node;

and the node information storage module is used for storing the node information of each data node into the corresponding storage node when the distributed transaction is submitted.

In a third aspect, an embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor, when executing the program, implements the distributed transaction node information storage method according to any embodiment of the present invention.

In a fourth aspect, embodiments of the present invention further provide a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform the distributed transaction node information storage method according to any of the embodiments of the present invention.

The method comprises the steps of obtaining branch transaction information associated with the distributed transaction, constructing a distributed transaction node list, and determining storage nodes corresponding to all data nodes in the distributed transaction node list, wherein the storage nodes are selected from other data nodes except the corresponding data nodes in the distributed transaction node list, when the distributed transaction is submitted, the node information of all the data nodes is stored in the corresponding storage nodes, when a computing node is in fault and restarted, the node information can be quickly and accurately obtained from the related data nodes, and finally, a complete distributed transaction node list is constructed, so that the data volume of node information transmission and storage is reduced under the condition that the node list information is not lost.

Drawings

Fig. 1 is a flowchart of a distributed transaction node information storage method according to an embodiment of the present invention;

fig. 2 is a flowchart of a distributed transaction node information storage method according to a second embodiment of the present invention;

fig. 3 is a block diagram of a distributed transaction node information storage apparatus according to a third embodiment of the present invention;

fig. 4 is a block diagram of a computer device according to a fourth embodiment of the present invention.

Detailed Description

The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be noted that, for convenience of description, only a part of the structures related to the present invention, not all of the structures, are shown in the drawings, and furthermore, embodiments of the present invention and features of the embodiments may be combined with each other without conflict.

Example one

Fig. 1 is a flowchart of a distributed transaction node information storage method according to an embodiment of the present invention, where the embodiment is applicable, and the method may be executed by a distributed transaction node information storage apparatus, and the apparatus may be implemented by software and/or hardware.

As shown in fig. 1, the method specifically includes the following steps:

and step 110, acquiring branch transaction information associated with the distributed transaction, and constructing a distributed transaction node list.

A transaction may be understood as a set of sequences of operations that record an application to achieve overall operational consistency. In a distributed database system, one transaction of a computing node corresponds to branch transactions of a plurality of data nodes, and the computing node and the data nodes cooperate through a network to jointly complete the transactions to form a distributed transaction. A distributed transaction node manifest may be understood as a list of data nodes that document a transaction of a computing node.

In practical applications, the compute node may be denoted as CN and the data node may be denoted as DN, and then a LIST of distributed transaction nodes may be denoted as LIST (DN1, DN 2...., DNn), indicating that there are branch transactions in all n data nodes in the distributed transaction. The information about the branch transaction of the data node may become branch transaction information.

After obtaining all the branch transaction information associated with a certain distributed transaction, the computing node searches data nodes involved in the distributed transaction by traversing all the branch transaction information, and then can construct a distributed transaction node list of the distributed transaction.

And step 120, determining storage nodes corresponding to the data nodes in the distributed transaction node list.

The storage node can be selected from other data nodes except the corresponding data node in the distributed transaction node list.

Specifically, for each data node in the distributed transaction node list, a non-self data node in the distributed transaction node list may be used as its corresponding storage node, so as to store node information of the data node.

Optionally, step 120 may be implemented by:

step 1201, ordering all data nodes contained in the distributed transaction node list, and determining a head end data node, an intermediate data node, and a tail end data node.

The head-end data node may be understood as a first data node after sequencing each data node, the tail-end data node may be understood as a last data node after sequencing each data node, and the middle data node may be understood as the rest of the data nodes except for the head-end data node and the tail-end data node.

Specifically, the data nodes in the distributed transaction node list may be ordered in a front-back order related to the data nodes when the data computation is performed by the computation node. And determining the first sequenced data node as a head end data node, determining the last sequenced data node as a tail end data node, and determining the rest data nodes except the head end data node and the tail end data node as intermediate data nodes.

And step 1202, taking the tail end data node as a storage node corresponding to the head end data node.

Step 1203, regarding each intermediate data node, taking a previous data node adjacent to the intermediate data node as a storage node corresponding to the intermediate data node.

And 1204, taking the previous data node adjacent to the tail end data node as a storage node corresponding to the tail end data node.

Steps 1202 to 1204 are executed without being sequentially executed. Illustratively, a LIST of distributed transaction nodes is denoted as LIST (DN1, DN2, … …, DNn-1, DNn), that is, the distributed transaction involves data nodes DN1, DN2, … …, DNn-1, DNn, and in this implementation, data node DN1 may be determined as the head-end data node, data nodes DN2, … …, DNn-1 may be determined as the middle data node, and data node DNn may be determined as the end data node. For the head-end data node DN1, the end data node DNn may be the storage node corresponding to the head-end data node DN1, for the intermediate data nodes DN2, … …, DNn-1, the previous data node adjacent to the intermediate data node, i.e., DN1, … …, DNn-2, may be the storage node corresponding to the intermediate data node DN2, … …, DNn-1, respectively, for the end data node DNn, the previous data node DNn-1 adjacent to the end data node DNn may be the storage node corresponding to the end data node.

It can be understood that steps 1201 to 1204 only describe a case of selecting a storage node corresponding to a data node, and after all data nodes included in the distributed transaction node list are sorted, a next data node adjacent to the head-end data node may also be used as a storage node corresponding to the head-end data node, a next data node adjacent to the intermediate data node is used as a storage node corresponding to the intermediate data node, and the head-end data node is used as a storage node corresponding to the tail-end data node. In addition, various storage node selection modes can be included, as long as the selected storage node is a non-own data node, and the corresponding relations between all the storage nodes and the data nodes can form a closed loop.

And step 130, when the distributed transaction is submitted, storing the node information of each data node into the corresponding storage node.

Specifically, when the distributed transaction is committed, the node information of each data node may be sent to the corresponding storage node for storage. When the computing node fails and is restarted, the computing node can finally reconstruct a complete distributed transaction node list by acquiring the stored node information of the data nodes one by one from the related data nodes.

Optionally, the node information of each data node is stored in the corresponding storage node by the following steps:

step 1301, determining data node information of the data nodes and storage node information of corresponding storage nodes for each data node.

The data node information may be information that can identify the data node, such as a serial number of the data node, and the storage node information may be information that can identify the storage node, such as a serial number of the storage node.

Step 1302, obtaining a transaction number of the distributed transaction, and forming node storage information of the data node based on the transaction number, the data node information and the storage node information.

In practical applications, a plurality of distributed transactions may exist in a distributed system at the same time, and in order to distinguish different distributed transactions, different distributed transactions are generally identified by sequence numbers, which may be referred to as transaction numbers.

Specifically, for each data node, the transaction number of the distributed transaction, the data node information, and the corresponding storage node information may be associated to form a piece of node storage information.

And step 1303, sending the node storage information to the corresponding storage node for storage.

In one specific example, data node DN1 is a storage node for data node DN2, and the transaction number of the distributed transaction is denoted as ID, then node storage information [ DN1, ID, DN2] may be stored in data node DN1, indicating that data node DN1 holds a list node data node DN2 for the distributed transaction with transaction number ID. After the computing node is restarted, after the computing node receives node storage information [ DN1, ID, DN2] fed back by the data node DN1, the computing node can continue to acquire next node storage information [ DN2, ID, DN3] from the data node DN2 until a list node stored in the node storage information of DNn points back to the data node DN1, and thus, after a closed loop is formed, all data node information is acquired. At this time, a complete distributed transaction node list can be constructed by all data node information.

According to the technical scheme of the embodiment, the distributed transaction node list is constructed by obtaining branch transaction information associated with the distributed transaction, the storage nodes corresponding to all the data nodes in the distributed transaction node list are determined, wherein the storage nodes are selected from other data nodes except the corresponding data nodes in the distributed transaction node list, when the distributed transaction is submitted, the node information of all the data nodes is stored in the corresponding storage nodes, when the computing nodes are failed and restarted, the node information can be quickly and accurately obtained from the related data nodes, the complete distributed transaction node list is finally constructed, and the data volume of node information transmission and storage is reduced under the condition that the node list information is not lost.

Example two

Fig. 2 is a flowchart of a distributed transaction node information storage method according to a second embodiment of the present invention. On the basis of the above embodiments, the present embodiment further optimizes the above distributed transaction node information storage method.

As shown in fig. 2, the method specifically includes:

step 210, obtaining branch transaction information associated with the distributed transaction, and constructing a distributed transaction node list.

And step 220, determining storage nodes corresponding to the data nodes in the distributed transaction node list.

And step 230, when the distributed transaction is submitted, storing the node information of each data node into the corresponding storage node.

In practical applications, the storage node may store node information of the corresponding data node in the form of node storage information.

And step 240, receiving the storage information of the check node sent by the data node.

Specifically, when a transaction is submitted, the data node may continuously feed back the stored node storage information to the computing node, and in this embodiment, the node storage information that the data node feeds back to the computing node is referred to as check node storage information. When receiving the check node storage information sent by any data node, the computing node performs a judgment, and since the check node storage information records the transaction number of the distributed transaction, the distributed transaction corresponding to the transaction number in the check node storage information can be determined as a target distributed transaction, and the computing node can search whether the target distributed transaction exists, and if not, perform step 250.

And step 250, when the target distributed transaction related to the check node storage information does not exist, constructing a target distributed transaction node list according to the check node storage information.

Specifically, if the target distributed transaction related to the storage information of the check node does not exist, which indicates that the failure of the computing node is restarted, the distributed transaction node list corresponding to the target distributed transaction, that is, the target distributed transaction node list, needs to be reconstructed at this time.

Optionally, step 250 may be implemented by:

step 2501, determine the check data node and check storage node contained in the check node storage information.

In this embodiment, the data node that feeds back the information stored in the check node may be determined as a check data node, and the non-self data node stored in the check data node may be used as a check storage node. For example, if the check node storage information is [ DN1, ID, DN2], then the data node DN1 is the check data node and the data node DN2 is the check storage node.

Step 2502, taking the check storage node as a target data node, obtaining target node storage information stored by the target data node, and determining a target storage node in the target node storage information.

Specifically, the check storage node may be used as a target data node, and the data node related to the target distributed transaction may be continuously searched. Continuing with the example in step 2501, with data node DN2 as the target data node, target node storage information [ DN2, ID, DN3] stored by target data node DN2 is obtained, and data node DN3 is determined to be the target storage node.

Step 2503, determining the target storage node as a next target data node, and continuing to determine the next target storage node until the newly determined target storage node is a check data node.

Specifically, all data nodes related to the target distributed transaction are searched one by one in a circular traversal mode. Continuing with the example in step 2502, the data node DN3 may be used as the next target data node, the target node storage information [ DN3, ID, DN4] stored by the target data node DN3 is obtained, the data node DN4 is determined as the next target storage node, and so on until the newly determined target data node is DNn, and the target node storage information stored by the target data node DNn is [ DNn, ID, DN1], the newly determined target storage node is the check data node DN1, and the search operation is ended.

Step 2504, a target distributed transaction node list is formed according to all the found target storage nodes.

Specifically, a target distributed transaction node LIST (DN1, DN2, … …, DNn) may be formed according to all the found target storage nodes DN1, DN2, … …, DNn.

According to the technical scheme, a distributed transaction node list is established by obtaining branch transaction information associated with distributed transactions, storage nodes corresponding to all data nodes in the distributed transaction node list are determined, when the distributed transactions are submitted, the node information of all the data nodes is stored in the corresponding storage nodes, check node storage information sent by the data nodes is received, and when target distributed transactions associated with the check node storage information do not exist, a target distributed transaction node list is established according to the check node storage information. When the computing node fails and is restarted, the node information can be quickly and accurately acquired from the related data node, and finally, a complete distributed transaction node list is constructed, so that the data volume of node information transmission and storage is reduced under the condition that the node list information is not lost.

EXAMPLE III

The distributed transaction node information storage device provided by the embodiment of the invention can execute the distributed transaction node information storage method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method. Fig. 3 is a block diagram of a distributed transaction node information storage apparatus according to a third embodiment of the present invention, and as shown in fig. 3, the apparatus includes: a transaction node manifest construction module 310, a storage node determination module 320, and a node information storage module 330.

The transaction node list building module 310 is configured to obtain branch transaction information associated with the distributed transaction, and build a distributed transaction node list.

A storage node determining module 320, configured to determine storage nodes corresponding to the data nodes in the distributed transaction node list, where a storage node is selected from other data nodes in the distributed transaction node list except the corresponding data node.

The node information storage module 330 is configured to store the node information of each data node into a corresponding storage node when the distributed transaction is committed.

According to the technical scheme of the embodiment, the distributed transaction node list is constructed by obtaining branch transaction information associated with the distributed transaction, the storage nodes corresponding to all the data nodes in the distributed transaction node list are determined, wherein the storage nodes are selected from other data nodes except the corresponding data nodes in the distributed transaction node list, when the distributed transaction is submitted, the node information of all the data nodes is stored in the corresponding storage nodes, when the computing nodes are failed and restarted, the node information can be quickly and accurately obtained from the related data nodes, the complete distributed transaction node list is finally constructed, and the data volume of node information transmission and storage is reduced under the condition that the node list information is not lost.

Optionally, the storage node determining module 320 is specifically configured to:

sequencing all data nodes contained in the distributed transaction node list, and determining a head end data node, a middle data node and a tail end data node;

taking the tail end data node as a storage node corresponding to the head end data node;

for each intermediate data node, taking a previous data node adjacent to the intermediate data node as a storage node corresponding to the intermediate data node;

and taking the previous data node adjacent to the tail end data node as a storage node corresponding to the tail end data node.

Optionally, the node information storage module 330 is specifically configured to:

when the distributed transaction is submitted, determining data node information of the data nodes and storage node information of corresponding storage nodes for each data node;

acquiring a transaction number of the distributed transaction, and forming node storage information of the data node based on the transaction number, the data node information and the storage node information;

and sending the node storage information to a corresponding storage node for storage.

Optionally, the apparatus further includes a transaction node list reconstructing module, where the transaction node list reconstructing module is configured to:

receiving check node storage information sent by a data node;

and when the target distributed transaction related to the check node storage information does not exist, constructing a target distributed transaction node list according to the check node storage information.

Optionally, the constructing a target distributed transaction node list according to the check node storage information includes:

determining a check data node and a check storage node contained in the check node storage information;

taking the check storage node as a target data node, acquiring target node storage information stored by the target data node, and determining a target storage node in the target node storage information;

determining the target storage node as a next target data node, and continuously determining the next target storage node until the newly determined target storage node is the check data node;

and forming a target distributed transaction node list according to all the searched target storage nodes.

Example four

Fig. 4 is a block diagram of a computer apparatus according to a fourth embodiment of the present invention, as shown in fig. 4, the computer apparatus includes a processor 410, a memory 420, an input device 430, and an output device 440; the number of the processors 410 in the computer device may be one or more, and one processor 410 is taken as an example in fig. 4; the processor 410, the memory 420, the input device 430 and the output device 440 in the computer apparatus may be connected by a bus or other means, and the connection by the bus is exemplified in fig. 4.

The memory 420 serves as a computer-readable storage medium, and may be used for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the distributed transaction node information storage method in the embodiment of the present invention (for example, the transaction node list building module 310, the storage node determining module 320, and the node information storage module 330 in the distributed transaction node information storage apparatus). The processor 410 executes various functional applications and data processing of the computer device by executing software programs, instructions and modules stored in the memory 420, that is, implements the distributed transaction node information storage method described above.

The memory 420 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 420 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, memory 420 may further include memory located remotely from processor 410, which may be connected to a computer device through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.

The input device 430 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the computer apparatus. The output device 440 may include a display device such as a display screen.

EXAMPLE five

An embodiment of the present invention further provides a storage medium containing computer-executable instructions, where the computer-executable instructions are executed by a computer processor to perform a distributed transaction node information storage method, where the method includes:

acquiring branch transaction information associated with the distributed transaction, and constructing a distributed transaction node list;

determining storage nodes corresponding to all data nodes in the distributed transaction node list, wherein the storage nodes are selected from other data nodes except the corresponding data nodes in the distributed transaction node list;

and when the distributed transaction is submitted, storing the node information of each data node into the corresponding storage node.

Of course, the storage medium provided by the embodiment of the present invention contains computer-executable instructions, and the computer-executable instructions are not limited to the operations of the method described above, and may also perform related operations in the distributed transaction node information storage method provided by any embodiment of the present invention.

From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.

It should be noted that, in the embodiment of the distributed transaction node information storage apparatus, the included units and modules are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.

It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

完整详细技术资料下载
上一篇:石墨接头机器人自动装卡簧、装栓机
下一篇:一种跨数据源的数据存储装置

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类