CN110134735A - The storage method and device of distributed transaction log - Google Patents

The storage method and device of distributed transaction log Download PDF

Info

Publication number
CN110134735A
CN110134735A CN201910283679.2A CN201910283679A CN110134735A CN 110134735 A CN110134735 A CN 110134735A CN 201910283679 A CN201910283679 A CN 201910283679A CN 110134735 A CN110134735 A CN 110134735A
Authority
CN
China
Prior art keywords
transaction
node
issued
distributed
master
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910283679.2A
Other languages
Chinese (zh)
Inventor
张森
尹博学
王光树
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Advanced New Technologies Co Ltd
Advantageous New Technologies Co Ltd
Original Assignee
Alibaba Group Holding Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201910283679.2A priority Critical patent/CN110134735A/en
Publication of CN110134735A publication Critical patent/CN110134735A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Abstract

This specification embodiment provides the storage method and device of a kind of distributed transaction log, this method comprises: issued transaction node obtains transaction journal information corresponding to the distributed transaction of its processing;Issued transaction node will be in the service database of the transaction journal information write-in distributed transaction system corresponding to it;Wherein, above-mentioned issued transaction node is the node in distributed transaction system;Above-mentioned business datum lab setting is in issued transaction node.

Description

The storage method and device of distributed transaction log
Technical field
This application involves distributed transaction technical field more particularly to a kind of storage methods and dress of distributed transaction log It sets.
Background technique
So-called distributed transaction refers to the participant of affairs, supports server, Resource Server and the affairs pipe of affairs Reason device is located on the different nodes of distributed transaction system, i.e., by multiple issued transaction nodes of distributed transaction system The common processing for completing affairs.In general, each issued transaction node can record transaction journal when handling distributed transaction Information goes forward side by side and acts the storage of business log information.
The storage of transaction journal also belongs to the process content of distributed transaction, when carrying out distributing real time system, generally In order to reduce period of reservation of number, user experience is improved, then needs to shorten as far as possible the processing time of entire distributed transaction. Therefore, the storage for how reducing transaction journal information is time-consuming, becomes and currently needs so as to shorten the processing time of distributed transaction The technical issues of solution.
Summary of the invention
The purpose of this specification embodiment is to provide the storage method and device of a kind of distributed transaction log, is carrying out thing When the storage of business log, thing corresponding to the distributed transaction of its processing is obtained as the issued transaction node of distributed transaction system Business log information, and will be in the service database of transaction journal information write-in distributed transaction system.This way it is not necessary to by thing It is engaged in remote service client database corresponding to log write-in distributed transaction system, it is only necessary to distributed transaction system be written In service database, due to, distributed transaction system business datum lab setting distributed transaction system office Node is managed, when carrying out the storage of transaction journal information, is stored in service database than being stored in remote server data library Network link is shorter, therefore, it is possible to reduce the storage of transaction journal information is time-consuming, improves the storage efficiency of transaction journal, contracts The short processing time of entire distributed transaction, so that the performance of distributed transaction system is more preferable, to improve user experience.
In order to solve the above technical problems, this specification embodiment is achieved in that
This specification embodiment provides a kind of storage method of distributed transaction log, comprising:
Issued transaction node obtains transaction journal information corresponding to the distributed transaction of its processing;Wherein, the affairs Handling node is the node in distributed transaction system;
The distributed transaction system is written in the transaction journal information corresponding to it by the issued transaction node In service database;Wherein, the business datum lab setting is in the issued transaction node.
This specification embodiment additionally provides a kind of storage device of distributed transaction log, comprising:
Module is obtained, for obtaining transaction journal information corresponding to the distributed transaction of issued transaction node processing;Its In, the issued transaction node is the node in distributed transaction system;
Writing module, for the corresponding transaction journal information to be written to the business number of the distributed transaction system According in library;Wherein, the business datum lab setting is in the issued transaction node.
This specification embodiment additionally provides a kind of storage equipment of distributed transaction log, comprising:
Processor;And
It is arranged to the memory of storage computer executable instructions, the executable instruction makes the place when executed Manage device:
Obtain transaction journal information corresponding to the distributed transaction of issued transaction node processing;Wherein, the office Managing node is the node in distributed transaction system;
The corresponding transaction journal information is written in the service database of the distributed transaction system;Wherein, The business datum lab setting is in the issued transaction node.
This specification embodiment additionally provides a kind of storage medium, described to hold for storing computer executable instructions Following below scheme is realized in row instruction when executed:
Obtain transaction journal information corresponding to the distributed transaction of issued transaction node processing;Wherein, the office Managing node is the node in distributed transaction system;
The corresponding transaction journal information is written in the service database of the distributed transaction system;Wherein, The business datum lab setting is in the issued transaction node.
Technical solution in the present embodiment, when carrying out the storage of transaction journal, by the office of distributed transaction system Reason node obtains transaction journal information corresponding to the distributed transaction of its processing, and distribution is written in the transaction journal information In the service database of transaction system.This way it is not necessary to which long-range clothes corresponding to distributed transaction system are written in transaction journal In client database of being engaged in, it is only necessary to be written in the service database of distributed transaction system, due to distributed transaction system Business datum lab setting is stored in the issued transaction node of distributed transaction system when carrying out the storage of transaction journal information It is shorter than the network link for being stored in remote server data library in service database, therefore, it is possible to reduce transaction journal information Storage it is time-consuming, improve the storage efficiency of transaction journal, the processing time of entire distributed transaction shortened, so that distributed The performance of transaction system is more preferable, to improve user experience.
Detailed description of the invention
In order to illustrate more clearly of this specification embodiment or technical solution in the prior art, below will to embodiment or Attached drawing needed to be used in the description of the prior art is briefly described, it should be apparent that, the accompanying drawings in the following description is only Some embodiments as described in this application, for those of ordinary skill in the art, in the premise not made the creative labor Under, it is also possible to obtain other drawings based on these drawings.
Fig. 1 is one of the method flow diagram of storage method for the distributed transaction log that this specification embodiment provides;
Fig. 2 is the two of the method flow diagram of the storage method for the distributed transaction log that this specification embodiment provides;
Fig. 3 is the three of the method flow diagram of the storage method for the distributed transaction log that this specification embodiment provides;
Fig. 4 is the four of the method flow diagram of the storage method for the distributed transaction log that this specification embodiment provides;
Fig. 5 is one of the flow diagram of storage method for the distributed transaction log that this specification embodiment provides;
Fig. 6 is the two of the flow diagram of the storage method for the distributed transaction log that this specification embodiment provides;
Fig. 7 is the module composition schematic diagram of the storage device for the distributed transaction log that this specification embodiment provides;
Fig. 8 is the structural schematic diagram of the storage equipment for the distributed transaction log that this specification embodiment provides.
Specific embodiment
In order to make those skilled in the art better understand the technical solutions in the application, below in conjunction with this specification Attached drawing in embodiment is clearly and completely described the technical solution in this specification embodiment, it is clear that described Embodiment is merely a part but not all of the embodiments of the present application.Based on the embodiment in the application, this field Those of ordinary skill's every other embodiment obtained without creative efforts, all should belong to the application The range of protection.
In general, distributed transaction system includes multiple issued transaction nodes, distributed transaction system passes through each office The processing that node carries out distributed transaction is managed, issued transaction node can both generate business when handling corresponding distributed transaction Data can also generate transaction journal information.The thought of this specification embodiment is, when handling distributed transaction, office Node is managed by the service database of write-in distributed transaction system of transaction journal information caused by it, in this way, avoiding tune With the log database for being set to remote service end, network link when store transaction log information is shortened, to reduce The storage of transaction journal information is time-consuming, improves the storage efficiency of transaction journal information.Based on this, this specification embodiment is provided A kind of storage method, device, equipment and the storage medium of distributed transaction log, it is following to be introduced in detail one by one.
It should be noted that the storage method for the distributed transaction log that this specification embodiment provides is applied to distribution Issued transaction node in transaction system, the i.e. executing subject of this method are issued transaction node, specifically, can be to be set to The storage device of the distributed transaction log of issued transaction node.
Fig. 1 is one of the method flow diagram of storage method for the distributed transaction log that this specification embodiment provides, Fig. 1 Shown in method include at least following steps:
Step 102, issued transaction node obtains transaction journal information corresponding to the distributed transaction of its processing;Wherein, Above-mentioned issued transaction node is the node in distributed transaction system.
In general, the processing of distributed transaction can be divided into two stages, respectively preparation stage and operational phase, In, the preparation stage is that the execution of operational phase is laid the groundwork.In this specification embodiment, it is mentioned to transaction journal information then produce The raw preparation stage in distributed transaction.
For example, being transferred accounts to Li Si for 20 yuan by Zhang San, which can be divided into preparation stage and operational phase, Operation corresponding to preparation stage is then whether the account for inquiring Zhang San has 20 yuan, and freezes the account of Zhang San, and inquiry Lee Four account whether there is, and lock the account of Li Si, if the preparation stage prepares to operate, then execute the transfer operation stage. For this distributed transaction, then transaction journal information is then generated " whether the account of inquiry Zhang San has 20 yuan, and freezes Zhang San's Account, the account for inquiring Li Si whether there is, and lock the account of Li Si " during this.
In general, each stage of each distributed transaction can be divided into multiple subtransactions, an issued transaction node For handling one of subtransaction.
For example, continuing to use the example above, Zhang San transfers accounts 20 yuan to Li Si, wherein for operation performed by the preparation stage, " whether the account of inquiry Zhang San has 20 yuan, and freezes the account of Zhang San " then belongs to a subtransaction, by an issued transaction Node executes, and " account of inquiry Li Si whether there is, and lock the account of Li Si " belongs to a subtransaction, by an office Node is managed to execute.
Therefore, in above-mentioned steps 102, distributed transaction handled by issued transaction node can be understood as the issued transaction Subtransaction in distributed transaction to be processed needed for node.Each issued transaction node is handling corresponding distributed transaction When, corresponding transaction journal information can be generated, the transaction journal information is for recording distribution handled by the issued transaction node Formula affair related information and the issued transaction node related information.I.e. in the specific implementation, above-mentioned transaction journal information can be with For the information of which affairs of which issued transaction node processing.For example, above-mentioned transaction journal information, which can be, executes the distribution Transaction identification information handled by the identification information of the issued transaction node of affairs, the issued transaction node etc..
In this specification embodiment, above-mentioned issued transaction node obtains thing corresponding to the distributed transaction handled by it Business log information, can be the process for reading transaction journal information from the issued transaction node, is also possible to the issued transaction section Point generate transaction journal information process, this specification embodiment not to the detailed process of above-mentioned acquisition transaction journal information into Row limits.
Step 104, issued transaction node is by the business of the transaction journal information write-in distributed transaction system corresponding to it In database;Wherein, above-mentioned business datum lab setting is in issued transaction node.
Service database is generally used for store transaction processing node generated industry when handling corresponding distributed transaction Business data, when each issued transaction node belongs to different application programs, then each issued transaction node is set in own node It is equipped with corresponding service database, for storing transaction journal caused by the service processing node;Belong to same application domain Issued transaction node correspond to the same service database.In this specification embodiment, in order to reduce transaction journal information Storage is time-consuming, then transaction journal information caused by it also is stored in service database by issued transaction node.
In addition, it is necessary to explanation, each issued transaction section in this specification embodiment, in distributed transaction system Point the transaction journal information corresponding to it can be written in the service database corresponding to it, be also possible at partial transaction Transaction journal information corresponding to it is written in the service database corresponding to it reason node.
In the specific implementation, if each issued transaction node is provided with corresponding service database in own node, then In above-mentioned steps 104, issued transaction node is by the business number of the transaction journal information write-in distributed transaction system corresponding to it According in library, specifically include:
Transaction journal information corresponding to it is written in the service database corresponding to it issued transaction node;Wherein, Business datum lab setting corresponding to issued transaction node is in the issued transaction node.
It i.e. in this embodiment, then is that its corresponding transaction journal information write-in is arranged each issued transaction node In the service database on own node.
For example, distributed transaction system includes issued transaction node 1, issued transaction node 2 and issued transaction node 3 three Issued transaction node, transaction journal information corresponding to issued transaction node 1 are denoted as transaction journal information 1, issued transaction node 2 Corresponding transaction journal information is denoted as transaction journal information 2, and transaction journal information corresponding to issued transaction node 3 is denoted as thing Business log information 3, when carrying out the storage of transaction journal information, the write-in of transaction journal information 1 is set to by issued transaction node 1 In the service database 1 of issued transaction node 1, the write-in of transaction journal information 2 is set to issued transaction section by issued transaction node 2 In the service database 2 of point 2, the business for being set to issued transaction node 3 is written in transaction journal information 3 by issued transaction node 3 In database 3.In this way, each issued transaction node is when carrying out the storage of corresponding transaction journal information, it is only necessary to which calling is set It is placed in the service database of the issued transaction node, avoids the transaction journal data called and be set to remote service end Library shortens the network link of store transaction log information, and the write-in for reducing transaction journal information is time-consuming, improves affairs day The write efficiency of will information, and then improve the new energy of distributed transaction system.
It certainly, is then that each issued transaction node in a distributed manner in transaction system is corresponding by its in the example above Transaction journal information is written for its corresponding service database, in addition to this, can be issued transaction node 1, issued transaction Node 2 writes its corresponding transaction journal information with any one or the two issued transaction nodes in issued transaction node 3 Enter service database, remaining issued transaction node then continues the issued transaction node write-in corresponding to it being set to long-range clothes It is engaged in the transaction journal database at end.Service database is not written to by transaction journal information in this specification embodiment The quantity of issued transaction node is defined.
In general, above-mentioned issued transaction node includes master transaction processing node and subtransaction processing node;Master transaction processing Node is generally the initiation node of the affairs.
Therefore, in some embodiments, in above-mentioned steps 104, issued transaction node is by the transaction journal corresponding to it Information is written in the service database of distributed transaction system, can also be realized by following process:
Issued transaction node is by business number corresponding to the transaction journal information write-in master transaction processing node corresponding to it According in library;Wherein, business datum lab setting corresponding to master transaction processing node handles node in master transaction.
It in this embodiment, then is each issued transaction node all by the transaction journal information write-in master corresponding to it In service database corresponding to issued transaction node.
Certainly, in addition to this, certain height can also be written in the transaction journal information corresponding to it by each issued transaction node In service database corresponding to issued transaction node, no longer repeat one by one herein.
In the specific implementation, mentioned in this specification embodiment to issued transaction node include master transaction processing node and Subtransaction handles node;
Transaction journal information corresponding to above-mentioned master transaction processing node includes the master transaction relevant information of distributed transaction And transaction state information;Wherein, master transaction relevant information includes master transaction identification information and master transaction processing node identification information;
Transaction journal information corresponding to above-mentioned subtransaction processing node includes the subtransaction relevant information of distributed transaction; Wherein, subtransaction relevant information includes subtransaction identification information and subtransaction processing node identification information.
In general, above-mentioned master transaction then refers to that the distributed transaction, a distributed transaction can split into multiple sons Affairs, a subtransaction needs are handled by a sub- issued transaction node, therefore, in this specification embodiment, one Distributed transaction system may include multiple subtransaction processing nodes.
For distributed transaction, in general, receiving the issued transaction of the distributed transaction by master transaction processing node Request, and determine that the subtransaction for needing to call handles node by master transaction processing node, and call corresponding subtransaction processing section Point executes corresponding subtransaction operation.
For ease of understanding, following to be illustrated citing.
For example, continuing to use the example above, Zhang San transfers accounts 20 yuan to Li Si, then executes the distributed system packet of the distributed transaction Master transaction processing node, subtransaction processing node 1 and subtransaction processing node 2 are included, master transaction processing node receives the business After request, subtransaction processing node 1 and subtransaction is called to handle node 2, makes whether subtransaction processing node 1 checks Zhang San's account There are 20 yuan, and freeze the account of Zhang San, subtransaction handles node 1 and determining that Zhang San's account there are 20 yuan, and performs and freeze Zhang San Account operation after, so that subtransaction processing node 2 is checked that the account of Li Si whether there is, and lock the account of Li Si, sub- thing Business processing node 2 is after the account for determining Li Si exists and locked the account of Li Si, to master transaction processing node feeding back processing As a result.For the distributed transaction, master transaction identification information is then the mark letter of " Zhang San transfers accounts 20 yuan to Li Si " this affairs Breath, it is then " to check whether Zhang San's account has 20 yuan, and freeze to open that subtransaction, which handles subtransaction identification information corresponding to node 1, The identification information of this subtransaction of three account ", it is then " to check that subtransaction, which handles subtransaction identification information corresponding to node 2, The account of Li Si whether there is, and lock the account of Li Si " identification information of this subtransaction.
Above-mentioned transaction state information is then understood that be handled locating for node 2 according to subtransaction processing node 1 and subtransaction The current status information of distributed transaction determined by the subtransaction relevant information of reason.Such as, which can be point Cloth affairs prepare successfully or fail.
Certainly, in the specific implementation, above-mentioned master transaction relevant information can also include required for handling the distributed transaction The identification information of each subtransaction processing node called.
In the specific implementation, the master transaction processing node in above-mentioned issued transaction node is it can be appreciated that distributed transaction Promoter, subtransaction processing node can be understood as the participant of distributed transaction, i.e., when the promoter of distributed transaction connects After the transaction request for receiving distributed transaction, then each participant is called, so that each participant has cooperateed with distributed transaction Processing.
In this specification embodiment, in above-mentioned steps 102, issued transaction node obtains the distributed transaction institute of its processing Corresponding transaction journal information, specifically includes:
Master transaction handles node when receiving transaction request, creates master transaction relevant information, subtransaction processing section Point creates the subtransaction relevant information of its corresponding subtransaction when receiving the call request of master transaction node;Wherein, sub- thing Business is a part of distributed transaction;
And when subtransaction processing node completes the issued transaction of the subtransaction corresponding to it, master transaction handles node The transaction processing results that node is handled according to subtransaction, generate above-mentioned transaction state information.
In the specific implementation, it when master transaction processing node receives the transaction request of distributed transaction, then creates For the master transaction relevant information of the distributed transaction, each subtransaction processing node for needing to call then is determined, and to corresponding Subtransaction processing node send call request so that subtransaction handle the corresponding subtransaction of node processing, at each subtransaction After reason node receives the call request that master transaction processing node is sent, respectively corresponding subtransaction correlation letter is generated respectively Breath.
In addition, handling node feeding back to master transaction after each subtransaction processing node completes its corresponding subtransaction processing The processing result of subtransaction handled by it, master transaction handle the feedback result that node handles node according to each subtransaction, determine The current transaction state information of the distributed transaction, such as preparation stage prepare successfully or unsuccessfully, by the transaction state information A part as transaction journal information.
In the specific implementation, in above-mentioned steps 104, issued transaction node is by the transaction journal information write-in point corresponding to it In the service database of cloth transaction system, comprising:
Master transaction handles node after creating master transaction relevant information, by master transaction relevant information write-in master transaction processing section In the corresponding service database of point;And master transaction handles node after generating transaction state information, by transaction state information It is written in service database corresponding to master transaction processing node.
In above-mentioned steps 104, distributed transaction system is written in its transaction journal information generated by issued transaction node Service database in, further includes:
Subtransaction handles node after creating subtransaction relevant information, by subtransaction relevant information write-in subtransaction processing section In the corresponding service database of point.
In this specification embodiment, master transaction handles node after generating its corresponding transaction journal information, then should Transaction journal information is written in service database corresponding to master transaction processing node, and subtransaction handles node and generating its correspondence Subtransaction log information after, then will be corresponding to transaction journal information write-in subtransaction processing node in service database.
In the specific implementation, after master transaction processing node receives the transaction request of distributed transaction, creation master Affair related information, using the master transaction relevant information as transaction journal information write on master transaction node corresponding to business datum In library, and each subtransaction processing node called to needs sends call request, and each subtransaction processing node is taken charge receiving After the call request of business processing node, its corresponding subtransaction relevant information is created, using subtransaction relevant information as affairs day Will information writes in the service database corresponding to it, and completes the processing of corresponding subtransaction, and processing result is fed back to master Issued transaction node, master transaction handle the transaction processing results that node handles node feeding back according to each subtransaction, generate the distribution The transaction state information of formula affairs, and transaction state information write-in master transaction is handled into service database corresponding to node In.
Fig. 2 is two, Fig. 2 of the method flow diagram of the storage method for the distributed transaction log that this specification embodiment provides Shown in method include at least following steps:
Step 202, when master transaction processing node receives the processing request of distributed transaction, the master of distributed transaction is created Affair related information, and using the master transaction relevant information as industry corresponding to transaction journal information write-in master transaction processing node It is engaged in database.
Step 204, master transaction handles node and asks to each subtransaction processing node transmission calling for handling the distributed transaction It asks.
Step 206, after each subtransaction processing node receives the call request that master transaction processing node is sent, the son is created Subtransaction relevant information corresponding to issued transaction node, and it is written using the subtransaction relevant information as transaction journal information In corresponding service database.
Step 208, each subtransaction processing node is anti-to master transaction processing node after the processing for completing corresponding subtransaction Present the processing result of subtransaction.
Step 210, master transaction processing node handles the processing result of node feeding back according to each subtransaction, determines the distribution The current transaction state information of affairs, and node institute is handled using the transaction state information as transaction journal information write-in master transaction In corresponding service database.
In another embodiment, master transaction handles node and subtransaction processing node by the affairs corresponding to it Log information is written in service database corresponding to master transaction processing node.Fig. 3 is the distribution that this specification embodiment provides The three of the method flow diagram of the storage method of formula transaction journal, method shown in Fig. 3 include at least following steps:
Step 302, when master transaction processing node receives the processing request of distributed transaction, the master of distributed transaction is created Affair related information, and using the master transaction relevant information as industry corresponding to transaction journal information write-in master transaction processing node It is engaged in database.
Step 304, master transaction handles node and asks to each subtransaction processing node transmission calling for handling the distributed transaction It asks.
Step 306, after each subtransaction processing node receives the call request that master transaction processing node is sent, the son is created Subtransaction relevant information corresponding to issued transaction node, and the subtransaction relevant information is written as transaction journal information and is led In service database corresponding to issued transaction node.
Step 308, each subtransaction processing node is anti-to master transaction processing node after the processing for completing corresponding subtransaction Present the processing result of subtransaction.
Step 310, master transaction processing node handles the processing result of node feeding back according to each subtransaction, determines the distribution The current transaction state information of affairs, and node institute is handled using the transaction state information as transaction journal information write-in master transaction In corresponding service database.
In addition, in this specification embodiment, the transaction journal information corresponding to it is written above-mentioned issued transaction node In the service database of distributed transaction system, it can be realized by following process:
Issued transaction node generates structuralized query (Structured corresponding to the transaction journal information acquired in it Query Language, SQL) sentence, and the corresponding write operation of the SQL statement is executed in above-mentioned service database.
It is illustrated so that master transaction handles node as an example, when master transaction processing node is creating master transaction relevant information Afterwards, when needing master transaction relevant information that its corresponding service database is written, then it is right to need to generate the master transaction relevant information institute The SQL statement answered, and the SQL statement is executed in the service database corresponding to master transaction processing node.
For ease of understanding this specification embodiment provide distributed transaction log storage method, it is following will in a distributed manner Transaction system includes transaction initiator and affairs participant 1, affairs participant 2, and transaction initiator, affairs participant 1 and thing Business participant 2 is provided with oneself service database, and the transaction journal information corresponding to it is written corresponding to itself respectively Service database for, introduce this specification embodiment offer method.Wherein, above-mentioned transaction initiator is equivalent to this explanation Master transaction in book embodiment handles node, and affairs participant is then equivalent to the processing section of the subtransaction in this specification embodiment Point.
Fig. 4 is four, Fig. 4 of the method flow diagram of the storage method for the distributed transaction log that this specification embodiment provides Shown in method, include at least following steps:
Step 402, when transaction initiator receives the processing request of distributed transaction, the master transaction of distributed transaction is created Relevant information, and using the master transaction relevant information as service database corresponding to transaction journal information write-in transaction initiator In.
Step 404, transaction initiator sends call request to affairs participant 1 and affairs participant 2.
Step 406, affairs participant 1 and affairs participant 2 are in the call request for receiving master transaction processing node transmission Afterwards, the subtransaction relevant information corresponding to it is created, and itself is written using the subtransaction relevant information as transaction journal information In corresponding service database.
Under normal circumstances, each affairs participant belongs to different application programs, and therefore, different participants corresponds to different Service database.
Certainly, if transaction initiator and some affairs participant belong to same application, then transaction initiator and should Affairs participant corresponds to same service database.
Step 408, affairs participant 1 and affairs participant 2 initiate after the processing for completing corresponding subtransaction to affairs The processing result of person's feedback subtransaction.
Step 410, the processing result that transaction initiator is fed back according to affairs participant 1 and affairs participant 2, determines this point The current transaction state information of cloth affairs, and transaction initiator institute is written using the transaction state information as transaction journal information In corresponding service database.
For still transaction system includes transaction initiator, affairs participant 1 and affairs participant 2 in a distributed manner, Fig. 5 is shown One of the flow diagram of storage method for the distributed transaction log that this specification embodiment provides, signal shown in fig. 5 In figure, the transaction journal information corresponding to it is stored in affairs by transaction initiator, affairs participant 1 and affairs participant 2 In service database corresponding to promoter.
Fig. 6 show this specification embodiment offer distributed transaction log storage method flow diagram it Two, in flow diagram shown in fig. 6, transaction initiator, affairs participant 1 and affairs participant 2 are respectively by its corresponding thing Business log information is stored in the service database corresponding to itself.
The storage method for the distributed transaction log that this specification embodiment provides, when carrying out the storage of transaction journal, Transaction journal information corresponding to the distributed transaction of its processing is obtained as the issued transaction node of distributed transaction system, and will The transaction journal information is written in the service database of distributed transaction system.It is distributed this way it is not necessary to which transaction journal is written In remote service client database corresponding to formula transaction system, it is only necessary to be written in the service database of distributed transaction system i.e. Can, since the business datum lab setting of distributed transaction system is carrying out thing in the issued transaction node of distributed transaction system Be engaged in log information storage when, it is shorter than the network link for being stored in remote server data library to be stored in service database, because This, it is possible to reduce the storage of transaction journal information is time-consuming, improves the storage efficiency of transaction journal, shortens entire distributed thing The processing time of business, so that the performance of distributed transaction system is more preferable, to improve user experience.
Corresponding to the storage method for the distributed transaction log that this specification embodiment provides, it is based on identical thinking, this Specification embodiment additionally provides a kind of storage device of distributed transaction log, for executing the offer of this specification embodiment The storage method of distributed transaction log, Fig. 7 are the storage device for the distributed transaction log that this specification embodiment provides Module composition schematic diagram, Fig. 7 shown device, comprising:
Module 702 is obtained, for obtaining transaction journal information corresponding to the distributed transaction of issued transaction node processing; Wherein, issued transaction node is the node in distributed transaction system;
Writing module 704, for corresponding transaction journal information to be written to the service database of distributed transaction system In;Wherein, business datum lab setting is in issued transaction node.
Optionally, above-mentioned writing module 704, comprising:
First writing unit, for transaction journal information corresponding to issued transaction node to be written to the business corresponding to it In database;Wherein, business datum lab setting corresponding to issued transaction node is in the issued transaction node.
Optionally, above-mentioned issued transaction node includes master transaction processing node and subtransaction processing node;
Correspondingly, above-mentioned writing module 704, comprising:
Second writing unit, for the write-in master transaction of transaction journal information corresponding to issued transaction node to be handled node In corresponding service database;Wherein, business datum lab setting corresponding to master transaction processing node is saved in master transaction processing Point.
Optionally, above-mentioned issued transaction node includes master transaction processing node and subtransaction processing node;
Transaction journal information corresponding to master transaction processing node includes the master transaction relevant information and thing of distributed transaction Business status information;Wherein, master transaction relevant information includes master transaction identification information and master transaction processing node identification information;
Transaction journal information corresponding to subtransaction processing node includes the subtransaction relevant information of distributed transaction;Its In, subtransaction relevant information includes subtransaction identification information and subtransaction processing node identification information.
Optionally, above-mentioned acquisition module 702, comprising:
Creating unit creates master transaction relevant information for when receiving transaction request, and, it is receiving When the call request of master transaction node, the subtransaction relevant information of its corresponding subtransaction is created;Wherein, subtransaction is distribution A part of affairs;
First generation unit, for when subtransaction processing node completes the issued transaction of the subtransaction corresponding to it, root According to the transaction processing results of subtransaction processing node, transaction state information is generated.
Optionally, above-mentioned writing module 704, comprising:
Third writing unit, for after creating master transaction relevant information, master transaction relevant information to be written at master transaction It manages in service database corresponding to node;And after generating transaction state information, master transaction is written into transaction state information It handles in service database corresponding to node.
Optionally, above-mentioned writing module 704, further includes:
4th writing unit, for after creating subtransaction relevant information, subtransaction relevant information to be written at subtransaction It manages in service database corresponding to node.
Optionally, above-mentioned writing module 704, further includes:
Second generation unit, for generating structured query language SQL language corresponding to the transaction journal information of its acquisition Sentence;
5th writing unit, for executing the corresponding write operation of SQL statement in service database.
The storage device of the distributed transaction log of this specification embodiment can also carry out distributed transaction day in Fig. 1-Fig. 6 The method that the storage device of will executes, and realize the storage device of distributed transaction log in Fig. 1-embodiment illustrated in fig. 6 function Can, details are not described herein.
The storage device for the distributed transaction log that this specification embodiment provides, when carrying out the storage of transaction journal, Transaction journal information corresponding to the distributed transaction of its processing is obtained as the issued transaction node of distributed transaction system, and will The transaction journal information is written in the service database of distributed transaction system.It is distributed this way it is not necessary to which transaction journal is written In remote service client database corresponding to formula transaction system, it is only necessary to be written in the service database of distributed transaction system i.e. Can, since the business datum lab setting of distributed transaction system is carrying out thing in the issued transaction node of distributed transaction system Be engaged in log information storage when, it is shorter than the network link for being stored in remote server data library to be stored in service database, because This, it is possible to reduce the storage of transaction journal information is time-consuming, improves the storage efficiency of transaction journal, shortens entire distributed thing The processing time of business, so that the performance of distributed transaction system is more preferable, to improve user experience.
Further, based on above-mentioned Fig. 1 to method shown in fig. 6, this specification embodiment additionally provides a kind of distribution The storage equipment of transaction journal, as shown in Figure 8.
The storage equipment of distributed transaction log can generate bigger difference because configuration or performance are different, may include One or more processor 801 and memory 802 can store one or more storages in memory 802 Application program or data.Wherein, memory 802 can be of short duration storage or persistent storage.It is stored in the application journey of memory 802 Sequence may include one or more modules (diagram is not shown), and each module may include depositing to distributed transaction log Store up the series of computation machine executable instruction information in equipment.Further, processor 801 can be set to and memory 802 communications execute the series of computation machine executable instruction letter in memory 802 in the storage equipment of distributed transaction log Breath.The storage equipment of distributed transaction log can also include one or more power supplys 803, one or more are wired Or radio network interface 804, one or more input/output interfaces 805, one or more keyboards 806 etc..
In a specific embodiment, the storage equipment of distributed transaction log include memory and one or More than one program, perhaps more than one program is stored in memory and one or more than one program for one of them It may include one or more modules, and each module may include one in storage equipment to distributed transaction log Family computer executable instruction information, and be configured to execute this or one by one or more than one processor Procedure above includes for carrying out following computer executable instructions information:
Issued transaction node obtains transaction journal information corresponding to the distributed transaction of its processing;Wherein, issued transaction Node is the node in distributed transaction system;
Issued transaction node will be in the service database of the transaction journal information write-in distributed transaction system corresponding to it; Wherein, business datum lab setting is in issued transaction node.
Optionally, when executed, issued transaction node is by the affairs day corresponding to it for computer executable instructions information Will information is written in the service database of distributed transaction system, comprising:
Transaction journal information corresponding to it is written in the service database corresponding to it issued transaction node;Wherein, Business datum lab setting corresponding to issued transaction node is in the issued transaction node.
Optionally, when executed, issued transaction node includes master transaction processing node to computer executable instructions information Node is handled with subtransaction;
Issued transaction node by the service database of the transaction journal information write-in distributed transaction system corresponding to it, Include:
Issued transaction node is by business number corresponding to the transaction journal information write-in master transaction processing node corresponding to it According in library;Wherein, business datum lab setting corresponding to master transaction processing node handles node in master transaction.
Optionally, when executed, issued transaction node includes master transaction processing node to computer executable instructions information Node is handled with subtransaction;
Transaction journal information corresponding to master transaction processing node includes the master transaction relevant information and thing of distributed transaction Business status information;Wherein, master transaction relevant information includes master transaction identification information and master transaction processing node identification information;
Transaction journal information corresponding to subtransaction processing node includes the subtransaction relevant information of distributed transaction;Its In, subtransaction relevant information includes subtransaction identification information and subtransaction processing node identification information.
Optionally, when executed, issued transaction node obtains the distribution of its processing to computer executable instructions information The corresponding transaction journal information of office, comprising:
Master transaction handles node when receiving transaction request, creates master transaction relevant information, subtransaction processing section Point creates the subtransaction relevant information of its corresponding subtransaction when receiving the call request of master transaction node;Wherein, sub- thing Business is a part of distributed transaction;
And when subtransaction processing node completes the issued transaction of the subtransaction corresponding to it, master transaction handles node The transaction processing results of node are handled according to subtransaction, generate transaction state information.
Optionally, when executed, issued transaction node is by the affairs day corresponding to it for computer executable instructions information Will information is written in the service database of distributed transaction system, comprising:
Master transaction handles node after creating master transaction relevant information, by master transaction relevant information write-in master transaction processing section In the corresponding service database of point;
And master transaction processing node is handled transaction state information write-in master transaction after generating transaction state information In service database corresponding to node.
Optionally, when executed, issued transaction node is by the affairs day acquired in it for computer executable instructions information Will information is written in the service database of distributed transaction system, comprising:
Subtransaction handles node after creating subtransaction relevant information, by subtransaction relevant information write-in subtransaction processing section In the corresponding service database of point.
Optionally, when executed, issued transaction node is by the affairs day corresponding to it for computer executable instructions information Will information is written in the service database of distributed transaction system, comprising:
Issued transaction node generates structured query language SQL statement corresponding to the transaction journal information of its acquisition, and The corresponding write operation of SQL statement is executed in service database.
The storage equipment for the distributed transaction log that this specification embodiment provides, when carrying out the storage of transaction journal, Transaction journal information corresponding to the distributed transaction of its processing is obtained as the issued transaction node of distributed transaction system, and will The transaction journal information is written in the service database of distributed transaction system.It is distributed this way it is not necessary to which transaction journal is written In remote service client database corresponding to formula transaction system, it is only necessary to be written in the service database of distributed transaction system i.e. Can, since the business datum lab setting of distributed transaction system is carrying out thing in the issued transaction node of distributed transaction system Be engaged in log information storage when, it is shorter than the network link for being stored in remote server data library to be stored in service database, because This, it is possible to reduce the storage of transaction journal information is time-consuming, improves the storage efficiency of transaction journal, shortens entire distributed thing The processing time of business, so that the performance of distributed transaction system is more preferable, to improve user experience.
Further, based on above-mentioned Fig. 1 to method shown in fig. 6, this specification embodiment additionally provides a kind of storage Jie Matter, for storing computer executable instructions information, in a kind of specific embodiment, the storage medium can for USB flash disk, CD, Hard disk etc., the computer executable instructions information of storage medium storage are able to achieve following below scheme when being executed by processor:
Issued transaction node obtains transaction journal information corresponding to the distributed transaction of its processing;Wherein, issued transaction Node is the node in distributed transaction system;
Issued transaction node will be in the service database of the transaction journal information write-in distributed transaction system corresponding to it; Wherein, business datum lab setting is in issued transaction node.
Optionally, the computer executable instructions information of storage medium storage is when being executed by processor, issued transaction Node will be in the service database of the transaction journal information write-in distributed transaction system corresponding to it, comprising:
Transaction journal information corresponding to it is written in the service database corresponding to it issued transaction node;Wherein, Business datum lab setting corresponding to issued transaction node is in the issued transaction node.
Optionally, the computer executable instructions information of storage medium storage is when being executed by processor, issued transaction Node includes master transaction processing node and subtransaction processing node;
Issued transaction node by the service database of the transaction journal information write-in distributed transaction system corresponding to it, Include:
Issued transaction node is by business number corresponding to the transaction journal information write-in master transaction processing node corresponding to it According in library;Wherein, business datum lab setting corresponding to the master transaction processing node handles node in the master transaction.
Optionally, the computer executable instructions information of storage medium storage is when being executed by processor, issued transaction Node includes master transaction processing node and subtransaction processing node;
Transaction journal information corresponding to master transaction processing node includes the master transaction relevant information and thing of distributed transaction Business status information;Wherein, master transaction relevant information includes master transaction identification information and master transaction processing node identification information;
Transaction journal information corresponding to subtransaction processing node includes the subtransaction relevant information of distributed transaction;Its In, subtransaction relevant information includes subtransaction identification information and subtransaction processing node identification information.
Optionally, the computer executable instructions information of storage medium storage is when being executed by processor, issued transaction Node obtains transaction journal information corresponding to the distributed transaction of its processing, comprising:
Master transaction handles node when receiving transaction request, creates master transaction relevant information, subtransaction processing section Point creates the subtransaction relevant information of its corresponding subtransaction when receiving the call request of master transaction node;Wherein, sub- thing Business is a part of distributed transaction;
And when subtransaction processing node completes the issued transaction of the subtransaction corresponding to it, master transaction handles node The transaction processing results of node are handled according to subtransaction, generate transaction state information.
Optionally, the computer executable instructions information of storage medium storage is when being executed by processor, issued transaction Node will be in the service database of the transaction journal information write-in distributed transaction system corresponding to it, comprising:
Master transaction handles node after creating master transaction relevant information, by master transaction relevant information write-in master transaction processing section In the corresponding service database of point;
And master transaction processing node is handled transaction state information write-in master transaction after generating transaction state information In service database corresponding to node.
Optionally, the computer executable instructions information of storage medium storage is when being executed by processor, issued transaction Node will be in the service database of the transaction journal information write-in distributed transaction system acquired in it, comprising:
Subtransaction handles node after creating subtransaction relevant information, by subtransaction relevant information write-in subtransaction processing section In the corresponding service database of point.
Optionally, the computer executable instructions information of storage medium storage is when being executed by processor, issued transaction Node will be in the service database of the transaction journal information write-in distributed transaction system corresponding to it, comprising:
Issued transaction node generates structured query language SQL statement corresponding to the transaction journal information of its acquisition, and The corresponding write operation of SQL statement is executed in service database.
The computer executable instructions information for the storage medium storage that this specification embodiment provides is being executed by processor When, when carrying out the storage of transaction journal, the distributed thing of its processing is obtained by the issued transaction node of distributed transaction system The corresponding transaction journal information of business, and will be in the service database of transaction journal information write-in distributed transaction system.This Sample does not need transaction journal to be written in remote service client database corresponding to distributed transaction system, it is only necessary to write-in point In the service database of cloth transaction system, since the business datum lab setting of distributed transaction system is in distributed thing The issued transaction node of business system, carry out transaction journal information storage when, be stored in service database ratio be stored in it is long-range The network link of server database is shorter, therefore, it is possible to reduce the storage of transaction journal information is time-consuming, improves transaction journal Storage efficiency, the processing time of entire distributed transaction is shortened, so that the performance of distributed transaction system is more preferable, to mention High user experience.
In the 1990s, the improvement of a technology can be distinguished clearly be on hardware improvement (for example, Improvement to circuit structures such as diode, transistor, switches) or software on improvement (improvement for method flow).So And with the development of technology, the improvement of current many method flows can be considered as directly improving for hardware circuit. Designer nearly all obtains corresponding hardware circuit by the way that improved method flow to be programmed into hardware circuit.Cause This, it cannot be said that the improvement of a method flow cannot be realized with hardware entities module.For example, programmable logic device (Programmable Logic Device, PLD) (such as field programmable gate array (Field Programmable Gate Array, FPGA)) it is exactly such a integrated circuit, logic function determines device programming by user.By designer Voluntarily programming comes a digital display circuit " integrated " on a piece of PLD, designs and makes without asking chip maker Dedicated IC chip.Moreover, nowadays, substitution manually makes IC chip, this programming is also used instead mostly " is patrolled Volume compiler (logic compiler) " software realizes that software compiler used is similar when it writes with program development, And the source code before compiling also write by handy specific programming language, this is referred to as hardware description language (Hardware Description Language, HDL), and HDL is also not only a kind of, but there are many kind, such as ABEL (Advanced Boolean Expression Language)、AHDL(Altera Hardware Description Language)、Confluence、CUPL(Cornell University Programming Language)、HDCal、JHDL (Java Hardware Description Language)、Lava、Lola、MyHDL、PALASM、RHDL(Ruby Hardware Description Language) etc., VHDL (Very-High-Speed is most generally used at present Integrated Circuit Hardware Description Language) and Verilog.Those skilled in the art also answer This understands, it is only necessary to method flow slightly programming in logic and is programmed into integrated circuit with above-mentioned several hardware description languages, The hardware circuit for realizing the logical method process can be readily available.
Controller can be implemented in any suitable manner, for example, controller can take such as microprocessor or processing The computer for the computer readable program code (such as software or firmware) that device and storage can be executed by (micro-) processor can Read medium, logic gate, switch, specific integrated circuit (Application Specific Integrated Circuit, ASIC), the form of programmable logic controller (PLC) and insertion microcontroller, the example of controller includes but is not limited to following microcontroller Device: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicone Labs C8051F320 are deposited Memory controller is also implemented as a part of the control logic of memory.It is also known in the art that in addition to Pure computer readable program code mode is realized other than controller, can be made completely by the way that method and step is carried out programming in logic Controller is obtained to come in fact in the form of logic gate, switch, specific integrated circuit, programmable logic controller (PLC) and insertion microcontroller etc. Existing identical function.Therefore this controller is considered a kind of hardware component, and to including for realizing various in it The device of function can also be considered as the structure in hardware component.Or even, it can will be regarded for realizing the device of various functions For either the software module of implementation method can be the structure in hardware component again.
System, device, module or the unit that above-described embodiment illustrates can specifically realize by computer chip or entity, Or it is realized by the product with certain function.It is a kind of typically to realize that equipment is computer.Specifically, computer for example may be used Think personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media play It is any in device, navigation equipment, electronic mail equipment, game console, tablet computer, wearable device or these equipment The combination of equipment.
For convenience of description, it is divided into various units when description apparatus above with function to describe respectively.Certainly, implementing this The function of each unit can be realized in the same or multiple software and or hardware when application.
It should be understood by those skilled in the art that, embodiments herein can provide as method, system or computer program Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the application Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the application, which can be used in one or more, The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces The form of product.
The application is reference according to the method for this specification embodiment, the stream of equipment (system) and computer program product Journey figure and/or block diagram describe.It should be understood that can be by computer program instructions information realization flowchart and/or the block diagram The combination of process and/or box in each flow and/or block and flowchart and/or the block diagram.It can provide these calculating Machine program instruction information is to general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices Processor is to generate a machine, so that the instruction executed by computer or the processor of other programmable data processing devices Information generates specifies for realizing in one or more flows of the flowchart and/or one or more blocks of the block diagram Function device.
These computer program instructions information, which may also be stored in, is able to guide computer or other programmable data processing devices In computer-readable memory operate in a specific manner, so that command information stored in the computer readable memory produces Raw includes the manufacture of command information device, the command information device realize in one or more flows of the flowchart and/or The function of being specified in one or more blocks of the block diagram.
These computer program instructions information also can be loaded onto a computer or other programmable data processing device, so that Series of operation steps are executed on a computer or other programmable device to generate computer implemented processing, thus calculating The command information that is executed on machine or other programmable devices provide for realizing in one or more flows of the flowchart and/or The step of function of being specified in one or more blocks of the block diagram.
In a typical configuration, calculating equipment includes one or more processors (CPU), input/output interface, net Network interface and memory.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/or The forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable medium Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method Or technology come realize information store.Information can be computer-readable instruction information, data structure, the module of program or other numbers According to.The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory techniques, CD-ROM are read-only Memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or Other magnetic storage devices or any other non-transmission medium, can be used for storage can be accessed by a computing device information.According to Herein defines, and computer-readable medium does not include temporary computer readable media (transitory media), such as modulation Data-signal and carrier wave.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability It include so that the process, method, commodity or the equipment that include a series of elements not only include those elements, but also to wrap Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including described want There is also other identical elements in the process, method of element, commodity or equipment.
It will be understood by those skilled in the art that embodiments herein can provide as method, system or computer program product. Therefore, complete hardware embodiment, complete software embodiment or embodiment combining software and hardware aspects can be used in the application Form.It is deposited moreover, the application can be used to can be used in the computer that one or more wherein includes computer usable program code The shape for the computer program product implemented on storage media (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) Formula.
The application can computer executable instructions information it is general up and down described in the text, such as Program module.Generally, program module include routines performing specific tasks or implementing specific abstract data types, it is program, right As, component, data structure etc..The application can also be practiced in a distributed computing environment, in these distributed computing environment In, by executing task by the connected remote processing devices of communication network.In a distributed computing environment, program module It can be located in the local and remote computer storage media including storage equipment.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for system reality For applying example, since it is substantially similar to the method embodiment, so being described relatively simple, related place is referring to embodiment of the method Part explanation.
The above description is only an example of the present application, is not intended to limit this application.For those skilled in the art For, various changes and changes are possible in this application.All any modifications made within the spirit and principles of the present application are equal Replacement, improvement etc., should be included within the scope of the claims of this application.

Claims (13)

1. a kind of storage method of distributed transaction log, which comprises
Issued transaction node obtains transaction journal information corresponding to the distributed transaction of its processing;Wherein, the issued transaction Node is the node in distributed transaction system;
The business of the distributed transaction system is written in the transaction journal information corresponding to it by the issued transaction node In database;Wherein, the business datum lab setting is in the issued transaction node.
2. the method as described in claim 1, the transaction journal information corresponding to it is written the issued transaction node In the service database of the distributed transaction system, comprising:
The transaction journal information corresponding to it is written in the service database corresponding to it the issued transaction node;Its In, business datum lab setting corresponding to the issued transaction node is in the issued transaction node.
3. the method as described in claim 1, the issued transaction node includes master transaction processing node and subtransaction processing section Point;
The business of the distributed transaction system is written in the transaction journal information corresponding to it by the issued transaction node In database, comprising:
The transaction journal information corresponding to it is written corresponding to the master transaction processing node issued transaction node Service database in;Wherein, business datum lab setting corresponding to the master transaction processing node is handled in the master transaction Node.
4. the method according to claim 1, the issued transaction node includes master transaction processing node and sub- thing Business processing node;
Transaction journal information corresponding to the master transaction processing node includes the master transaction relevant information of the distributed transaction And transaction state information;Wherein, the master transaction relevant information includes master transaction identification information and master transaction processing node identification Information;
Transaction journal information corresponding to the subtransaction processing node includes the subtransaction relevant information of the distributed transaction; Wherein, the subtransaction relevant information includes subtransaction identification information and subtransaction processing node identification information.
5. method as claimed in claim 4, the issued transaction node obtains thing corresponding to the distributed transaction of its processing Business log information, comprising:
The master transaction processing node is when receiving transaction request, creation master transaction relevant information, at the subtransaction Node is managed when receiving the call request of master transaction node, creates the subtransaction relevant information of its corresponding subtransaction;Wherein, The subtransaction is a part of the distributed transaction;
And when subtransaction processing node completes the issued transaction of the subtransaction corresponding to it, the master transaction processing Node handles the transaction processing results of node according to the subtransaction, generates the transaction state information.
6. method as claimed in claim 5, the transaction journal information corresponding to it is written the issued transaction node In the service database of the distributed transaction system, comprising:
The master transaction processing node, will be described in master transaction relevant information write-in after creating the master transaction relevant information Master transaction is handled in service database corresponding to node;
And after generating the transaction state information institute is written in the transaction state information by the master transaction processing node It states in service database corresponding to master transaction processing node.
7. method as claimed in claim 5, the transaction journal information corresponding to it is written the issued transaction node In the service database of the distributed transaction system, comprising:
The subtransaction processing node, will be described in subtransaction relevant information write-in after creating the subtransaction relevant information Subtransaction is handled in service database corresponding to node.
8. the method as described in claim 1, the transaction journal information corresponding to it is written the issued transaction node In the service database of the distributed transaction system, comprising:
The issued transaction node generates structured query language SQL language corresponding to the transaction journal information of its acquisition Sentence, and the corresponding write operation of the SQL statement is executed in the service database.
9. a kind of storage device of distributed transaction log, described device include:
Module is obtained, for obtaining transaction journal information corresponding to the distributed transaction of issued transaction node processing;Wherein, institute Stating issued transaction node is the node in distributed transaction system;
Writing module, for the corresponding transaction journal information to be written to the service database of the distributed transaction system In;Wherein, the business datum lab setting is in the issued transaction node.
10. device as claimed in claim 9, the write module, comprising:
First writing unit, for the transaction journal information corresponding to the issued transaction node to be written corresponding to it In service database;Wherein, business datum lab setting corresponding to the issued transaction node is in the issued transaction node.
11. device as claimed in claim 9, the issued transaction node includes master transaction processing node and subtransaction processing section Point;
The write module, comprising:
Second writing unit, for the master transaction to be written in the transaction journal information corresponding to the issued transaction node It handles in service database corresponding to node;Wherein, business datum lab setting corresponding to the master transaction processing node exists The master transaction handles node.
12. a kind of storage equipment of distributed transaction log, comprising:
Processor;And
It is arranged to the memory of storage computer executable instructions, the executable instruction makes the processing when executed Device:
Obtain transaction journal information corresponding to the distributed transaction of issued transaction node processing;Wherein, the issued transaction section Point is the node in distributed transaction system;
The corresponding transaction journal information is written in service database corresponding to the distributed transaction system;Its In, the business datum lab setting is in the issued transaction node.
13. a kind of storage medium, for storing computer executable instructions, the executable instruction is realized following when executed Process:
Obtain transaction journal information corresponding to the distributed transaction of issued transaction node processing;Wherein, the issued transaction section Point is the node in distributed transaction system;
The corresponding transaction journal information is written in service database corresponding to the distributed transaction system;Its In, the business datum lab setting is in the issued transaction node.
CN201910283679.2A 2019-04-10 2019-04-10 The storage method and device of distributed transaction log Pending CN110134735A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910283679.2A CN110134735A (en) 2019-04-10 2019-04-10 The storage method and device of distributed transaction log

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910283679.2A CN110134735A (en) 2019-04-10 2019-04-10 The storage method and device of distributed transaction log

Publications (1)

Publication Number Publication Date
CN110134735A true CN110134735A (en) 2019-08-16

Family

ID=67569623

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910283679.2A Pending CN110134735A (en) 2019-04-10 2019-04-10 The storage method and device of distributed transaction log

Country Status (1)

Country Link
CN (1) CN110134735A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112596801A (en) * 2019-09-16 2021-04-02 阿里巴巴集团控股有限公司 Transaction processing method, device, equipment, storage medium and database
CN112732414A (en) * 2020-12-29 2021-04-30 北京浪潮数据技术有限公司 Distributed transaction processing method, system and related components in OLTP mode
CN112764888A (en) * 2021-01-21 2021-05-07 中信银行股份有限公司 Distributed transaction checking and judging method and system based on log analysis

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1829988A (en) * 2003-08-01 2006-09-06 甲骨文国际公司 Ownership reassignment in a shared-nothing database system
CN101089857A (en) * 2007-07-24 2007-12-19 中兴通讯股份有限公司 Internal store data base transaction method and system
CN101706811A (en) * 2009-11-24 2010-05-12 中国科学院软件研究所 Transaction commit method of distributed database system
CN105183879A (en) * 2015-09-22 2015-12-23 浪潮集团有限公司 Method for distributed database to keep transactional consistency under cloud computation
CN106874076A (en) * 2017-01-21 2017-06-20 浙江沛宏网络科技有限公司 Distributed transaction processing method
CN107045454A (en) * 2016-02-06 2017-08-15 华为技术有限公司 Striding course distributed transaction control method and related system
US20180322156A1 (en) * 2017-05-08 2018-11-08 Sap Se Atomic processing of compound database transactions that modify a metadata entity
CN108958894A (en) * 2018-06-14 2018-12-07 阿里巴巴集团控股有限公司 A kind of distributed transaction processing method, system, task manager and terminal device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1829988A (en) * 2003-08-01 2006-09-06 甲骨文国际公司 Ownership reassignment in a shared-nothing database system
CN101089857A (en) * 2007-07-24 2007-12-19 中兴通讯股份有限公司 Internal store data base transaction method and system
CN101706811A (en) * 2009-11-24 2010-05-12 中国科学院软件研究所 Transaction commit method of distributed database system
CN105183879A (en) * 2015-09-22 2015-12-23 浪潮集团有限公司 Method for distributed database to keep transactional consistency under cloud computation
CN107045454A (en) * 2016-02-06 2017-08-15 华为技术有限公司 Striding course distributed transaction control method and related system
CN106874076A (en) * 2017-01-21 2017-06-20 浙江沛宏网络科技有限公司 Distributed transaction processing method
US20180322156A1 (en) * 2017-05-08 2018-11-08 Sap Se Atomic processing of compound database transactions that modify a metadata entity
CN108958894A (en) * 2018-06-14 2018-12-07 阿里巴巴集团控股有限公司 A kind of distributed transaction processing method, system, task manager and terminal device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
史蒂芬诺.赛里等: "《分布式数据库:原理与系统》", 宝鸡师范学院计算中心, pages: 139 - 143 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112596801A (en) * 2019-09-16 2021-04-02 阿里巴巴集团控股有限公司 Transaction processing method, device, equipment, storage medium and database
CN112732414A (en) * 2020-12-29 2021-04-30 北京浪潮数据技术有限公司 Distributed transaction processing method, system and related components in OLTP mode
CN112732414B (en) * 2020-12-29 2023-12-08 北京浪潮数据技术有限公司 Distributed transaction processing method and system in OLTP mode and related components
CN112764888A (en) * 2021-01-21 2021-05-07 中信银行股份有限公司 Distributed transaction checking and judging method and system based on log analysis

Similar Documents

Publication Publication Date Title
CN107453896A (en) Multiple sector chain network data processing method, device and server
CN106970873A (en) Mock method of testings, apparatus and system on line
CN110134735A (en) The storage method and device of distributed transaction log
CN106201481A (en) Assembly management method and apparatus in application development system
CN108628688A (en) A kind of message treatment method, device and equipment
CN107644286A (en) Workflow processing method and device
CN108345977A (en) A kind of method for processing business and device
CN110096528A (en) The method, apparatus and system of formation sequence in a kind of distributed system
CN110008018A (en) A kind of batch tasks processing method, device and equipment
CN111767144B (en) Transaction route determination method, device, equipment and system for transaction data
US10223435B2 (en) Data transfer between multiple databases
CN106201673B (en) A kind of seismic data processing technique and device
CN114827165B (en) Method and block link point for grouping multiple transactions
CN109002357A (en) Resource allocation methods, device and Internet of things system
CN108733546A (en) A kind of log collection method, device and equipment
TW201942843A (en) Account keeping method and device
CN109936642A (en) The method, apparatus and system of machine ID are generated in a kind of distributed system
CN108415792A (en) Disaster tolerance system, method, apparatus and equipment
CN110309034A (en) Work flow link view generation method and device
CN110502415A (en) One kind burying a setting method, device and equipment
CN113256426B (en) Data processing method, device, equipment and medium
CN108334340A (en) A kind of Cross-environment data communications method, device and system
CN111930716A (en) Database capacity expansion method, device and system
CN108390914A (en) A kind of service update method and device, system
CN105991463A (en) Method and system for realizing flow control, message main node, and token server

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20200929

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman, British Islands

Applicant after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman, British Islands

Applicant before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20200929

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman, British Islands

Applicant after: Advanced innovation technology Co.,Ltd.

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Applicant before: Alibaba Group Holding Ltd.