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.