CN106033437A - Method and system for processing distributed transaction - Google Patents
Method and system for processing distributed transaction Download PDFInfo
- Publication number
- CN106033437A CN106033437A CN201510111872.XA CN201510111872A CN106033437A CN 106033437 A CN106033437 A CN 106033437A CN 201510111872 A CN201510111872 A CN 201510111872A CN 106033437 A CN106033437 A CN 106033437A
- Authority
- CN
- China
- Prior art keywords
- transaction
- lock
- branch
- transaction branch
- distributed
- 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.)
- Granted
Links
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Provided are a method and a system for processing distributed transaction. The method comprises: after a transaction branch processing unit corresponding to each transaction branch of distributed transaction receives a transaction branch SQL statement, the transaction branch SQL statement being sent to an isolation controller for locking operation; the isolation controller inquiring from a database to obtain each data line corresponding to the transaction branch SQL statement, and after inquiring from a transaction lock table of the database to obtain a locking record corresponding to each data line, through writing the locking records into the transaction lock table, to lock the data lines which are not locked in each data line of the distributed transaction; the locking records including global transaction identifiers of the distributed transaction; after locking operation is successful, the transaction branch processing unit executing the transaction branch SQL statement; and after the transaction branch processing unit receives the a transaction branch submission instruction or a transaction branch rollback instruction, indicating an isolation controller to delete the locking records corresponding to the global transaction identifiers from the transaction lock table according to the global transaction identifiers.
Description
Technical field
The application relates to distributed data processing field, particularly relate to a kind of distributed transaction processing method and
System.
Background technology
Distributed transaction generally comprises multiple local matter branch, and each local matter branch can be to accordingly
Data base operate.Multiple distributed transactions can perform at a database concurrency, each distribution
Formula affairs may need multiple tables of data base are performed insertion (INSERT), delete (DELETE),
The operation such as amendment (UPDATE), inquiry (SELECT).In this case, data base needs
Ensure each distributed transaction before the amendment of data base is operated and to submit to by it, the data corresponding to this amendment
Row is sightless to other distributed transaction;In other words, it is impossible to allow other distributed transaction read this
The intermediateness of distributed transaction, ensures the isolation of distributed transaction.
Such as, for A account to the business of B account transfer 100 yuan, it is achieved this business may need elder generation
Increase by 100 yuan to B account, then deduct 100 yuan from A account;In this case, it is impossible to allow other
Affairs (such as, account inquiries affairs) see that the B account amount of money has increased, but A account is not the most detained
The state of money.Otherwise, action executing failure of once A account being withholdd, 100 increased in B account
Unit may be cut by other affairs, therefore will appear from the situation that the rolling back action for B account is failed.
The technology of the isolation problem solving above-mentioned distributed transaction includes: Database lock, copy-on-write,
Multi version control etc..
Existing distributed relation database system, such as MySQL, generally use XA two benches to carry
Hand over the management of protocol realization distributed transaction, and use unit Database lock to carry out distributed transaction also
Send out and control, to ensure the isolation of distributed transaction.The first stage of XA two-phase commitment protocol is table
In the certainly stage, in this stage, the feedback information that this transaction branch success performs is sent out by all participants
Give coordinator;Second stage is carried out the stage, and in this stage, coordinator sends according to all participants
Feedback information, notify that all participants submit to, or in institute on all transaction branch with acting in agreement
There is rollback on transaction branch.Each participant, when carrying out local operation, can carry out Database lock competition,
The most first obtain lock and can participate in two benches operation, otherwise reporting transactions branch is performed failure.XA
Two-phase commitment protocol requires that data base self realizes this agreement, and the con current control under distributed environment
Performance depends entirely on the Database Systems self realization degree to this agreement.
XA two-phase commitment protocol is a kind of obstruction agreement, and Database Systems realize requiring to exist during this agreement
Each stage of distributed transaction all waits that a slowest transaction branch completes, even if at distributed transaction
Different transaction branch do not operate identical data row, in the case of there is not lock conflict, each transaction branch
Data base connect and still can be suspended, and the resource shared by all of transaction branch is unable to release
Put, in order to carry out the release of the resources such as Database lock in second stage, (complete to prevent at distributed transaction
Office's affairs) submit to before the release data that caused of resource inconsistent, and the intermediateness of distributed transaction
By problems such as other distributed transaction read.For the large-scale internet enterprise that service traffics are high,
It is difficult to accept the huge performance cost that XA two-phase commitment protocol is brought.
If additionally, Database Systems use MySQL, also deposited when realizing XA two-phase commitment protocol
In the risk that data are inconsistent.Specifically, the active and standby synchronization of MySQL database is to pass through Binlog
(journal file of MySQL database) has replicated, and for the consideration of performance, only remembers in Binlog
Record distributed transaction, in the daily record (Commit daily record) of second stage, does not record distributed transaction and exists
The daily record (Prepare daily record) of first stage.If all transaction branch the first rank at distributed transaction
Section completes, and when the most not carrying out the submission of global transaction, a certain MDL (master library) is delayed machine, due to
The Prepare daily record of now corresponding transaction branch is not synchronized to corresponding standby storehouse, therefore at master library and
There occurs the inconsistent of data between standby storehouse, this is the mistake that can not bear in practical business.
Summary of the invention
The purpose of the application is to provide a kind of distributed transaction processing method and system.
In order to achieve the above object, this application discloses a kind of distributed transaction processing method, the method bag
Include:
The transaction branch processing unit corresponding to each transaction branch of distributed transaction receives transaction branch
After SQL statement, send it to isolation controller and carry out adding latching operation;
Isolation controller obtains each number corresponding with described transaction branch SQL statement from data base querying
According to row, and after the locked record obtained corresponding to each data row inquired about by the transactional lock table of data base, pass through
Locked record, the number not yet locked for distributed transaction described in described each data row is write to transactional lock table
Lock according to row;Described locked record comprises the global transaction identifier of described distributed transaction;
After adding latching operation success, transaction branch processing unit performs described transaction branch SQL statement;
After transaction branch processing unit receives transaction branch submission instruction or transaction branch rollback instruction, refer to
Show that isolation controller deletes described global transaction identifier institute according to global transaction identifier from transactional lock table
Corresponding locked record.
Additionally, described locked record also comprises the field of the following unique index as described transactional lock table:
The table name of table belonging to data row, the Major key of data row and mutual exclusion lock labelling;
When data row is added mutual exclusion lock, it is set to set in advance by the mutual exclusion lock tag field in described locked record
Fixed mutual exclusion lock mark value.
Additionally, add shared lock for data row in the following way:
If being that corresponding data row adds shared lock currently without other distributed transaction, then by transactional lock
It is that corresponding data row adds shared lock: the wherein mutual exclusion lock mark of a line locked record that table writes two row locked records
The value of note field is described mutual exclusion lock mark value set in advance, the mutual exclusion lock labelling of another row locked record
The value of field is described global transaction identifier;
If other distributed transaction adds shared lock for corresponding data row, then by writing to transactional lock table
A line locked record is that corresponding data row adds shared lock, and the value of the mutual exclusion lock tag field of this locked record is
Described global transaction identifier.
Additionally, the method also includes:
Transaction branch processing unit receives after reading has been filed on query statement, sends it to isolation controller;
Isolation controller obtains having been filed on, from data base querying, each data that query statement is corresponding with described reading
OK, and after the locked record obtained corresponding to each data row inquired about by the transactional lock table of data base, it is judged that its
Its distributed transaction the most for described reading have been filed on a line in each data row that query statement is corresponding or
Multirow adds mutual exclusion lock;Return if it is not, then described reading to be had been filed on the corresponding each data row of query statement
To transaction branch processing unit;
It is the middle shape comprising and not reading other distributed transaction for statement that described reading has been filed on query statement
The query statement of the annotation information of state.
Additionally, the method also includes:
The submission direction task manager of described distributed transaction registers described distributed transaction, distributed
After affairs registration, send described transaction branch SQL statement to transaction branch processing unit;
After receiving described transaction branch SQL statement, described transaction branch SQL statement is sent extremely
Before isolation controller, transaction branch processing unit registers described transaction branch SQL language to task manager
Transaction branch corresponding to Ju;
After performing described transaction branch SQL statement, transaction branch processing unit is to described distributed transaction
Submission side or report the execution shape of transaction branch to the submission side of described distributed transaction and task manager
State.
Additionally, the method also includes:
The submission side of described distributed transaction submits to instruction to institute by sending global transaction to task manager
State distributed transaction to submit to;The submission side of described distributed transaction is complete by sending to task manager
Office's transaction rollback instruction carries out rollback to described distributed transaction;
Task manager receives after global transaction submits instruction to described to the transmission of each transaction branch processing unit
Transaction branch submits instruction to;Task manager receives after global transaction rollback instructs or is presetting
Time in do not receive described distributed transaction submission side send global transaction submit to instruction time, to respectively
Transaction branch processing unit sends described transaction branch rollback instruction.
In order to achieve the above object, disclosed herein as well is a kind of distributing real time system system, this system
Including: the transaction branch processing unit corresponding to each transaction branch of distributed transaction, isolation controls
Device, data base;Wherein:
Transaction branch processing unit, for after receiving transaction branch SQL statement, send it to every
Carry out adding latching operation from controller;
Isolation controller, for obtain from data base querying corresponding with described transaction branch SQL statement
Each data row, and after the locked record obtained corresponding to each data row inquired about by the transactional lock table of data base,
By writing locked record to transactional lock table, not yet lock for distributed transaction described in described each data row
Data row lock;Described locked record comprises the global transaction identifier of described distributed transaction;
Transaction branch processing unit, is additionally operable to, after adding latching operation success, perform described transaction branch SQL
Statement;
Transaction branch processing unit, is additionally operable to receiving transaction branch submission instruction or transaction branch rollback
After instruction, instruction isolation controller deletes described overall situation thing according to global transaction identifier from transactional lock table
Business locked record corresponding to identifier.
Additionally, described locked record also comprises the field of the following unique index as described transactional lock table:
The table name of table belonging to data row, the Major key of data row and mutual exclusion lock labelling;
When data row is added mutual exclusion lock, isolation controller is by the mutual exclusion lock tag field in described locked record
It is set to mutual exclusion lock mark value set in advance.
Additionally, isolation controller adds shared lock for data row in the following way:
If being that corresponding data row adds shared lock currently without other distributed transaction, then by transactional lock
It is that corresponding data row adds shared lock: the wherein mutual exclusion lock mark of a line locked record that table writes two row locked records
The value of note field is described mutual exclusion lock mark value set in advance, the mutual exclusion lock labelling of another row locked record
The value of field is described global transaction identifier;
If other distributed transaction adds shared lock for corresponding data row, then by writing to transactional lock table
A line locked record is that corresponding data row adds shared lock, and the value of the mutual exclusion lock tag field of this locked record is
Described global transaction identifier.
Additionally, transaction branch processing unit, it is additionally operable to receiving after reading has been filed on query statement, by it
Send to isolation controller;
Isolation controller, is additionally operable to obtain having been filed on query statement with described reading from data base querying relative
The each data row answered, and the locked record obtained corresponding to each data row is inquired about from the transactional lock table of data base
After, it is judged that other distributed transaction has been filed on, for described reading, each data row that query statement is corresponding the most
In a line or multirow add mutual exclusion lock;If it is not, then described reading to be had been filed on corresponding each of query statement
Data row returns to transaction branch processing unit;
It is the middle shape comprising and not reading other distributed transaction for statement that described reading has been filed on query statement
The query statement of the annotation information of state.
Additionally, described system also includes: the submission side of described distributed transaction, task manager;Its
In:
The submission side of described distributed transaction, for registering described distributed transaction to task manager,
After distributed transaction registration, send described transaction branch SQL statement to transaction branch processing unit;
Transaction branch processing unit, is additionally operable to after receiving described transaction branch SQL statement, by institute
State transaction branch SQL statement to send before isolation controller, register described affairs to task manager and divide
Prop up the transaction branch corresponding to SQL statement;
Transaction branch processing unit, is additionally operable to after performing described transaction branch SQL statement, to described point
The submission side of cloth affairs or report affairs to the submission side of described distributed transaction and task manager and divide
The execution state propped up.
Additionally, the submission side of described distributed transaction, it is additionally operable to by sending overall situation thing to task manager
Business submits to instruction to submit described distributed transaction to;
The submission side of described distributed transaction, is additionally operable to by sending global transaction rollback to task manager
Instruction carries out rollback to described distributed transaction;
Task manager, is additionally operable to receiving after global transaction submits instruction to each transaction branch process list
Unit sends described transaction branch and submits instruction to;
Task manager, is additionally operable to after receiving global transaction rollback instruction or time set in advance
In do not receive described distributed transaction submission side send global transaction submit to instruction time, to each affairs
Branch Processing Unit sends described transaction branch rollback instruction.
Compared with prior art, the technique effect that the application can obtain includes:
(1), after each transaction branch at distributed transaction completes first stage process, number can be discharged immediately
According to system resources such as storehouse connections and return, and global transaction identifier is used to carry out data base in second stage
The cleaning of lock, it is not necessary to hang up, wait other transaction branch, decrease the consumption of system resource;
(2) data are performed to add latching operation by the transactional lock table using Service Database, it is not necessary to rely on Prepare
Daily record, improves the safety of the information such as Database lock;
(3) reading by using efficient locking mode to achieve distributed transaction has been filed on (Read
Committed) isolation level, the business demand that satisfied height is concurrent, height is handled up.
Certainly, the arbitrary product implementing the application it is not absolutely required to reach all the above skill simultaneously
Art effect.
Accompanying drawing explanation
Accompanying drawing described herein is used for providing further understanding of the present application, constitutes of the application
Point, the schematic description and description of the application is used for explaining the application, is not intended that the application's
Improper restriction.In the accompanying drawings:
Fig. 1 is the method flow diagram of a kind of distributed transaction processing method of the embodiment of the present application;
Fig. 2 is the method flow diagram of the another kind of distributed transaction processing method of the embodiment of the present application;
Fig. 3 is the method flow diagram of the another kind of distributed transaction processing method of the embodiment of the present application;
Fig. 4 is the method flow diagram of the another kind of distributed transaction processing method of the embodiment of the present application;
Fig. 5 is the system construction drawing of the distributing real time system system of the embodiment of the present application.
Detailed description of the invention
Presently filed embodiment is described in detail, thereby to the application below in conjunction with drawings and Examples
How application technology means solve technical problem and reach the process that realizes of technology effect and can fully understand also
Implement according to this.
In a typical configuration, calculating equipment include one or more processor (CPU), input/
Output interface, network interface and internal memory.
Internal memory potentially includes the volatile memory in computer-readable medium, random access memory
(RAM) and/or the form such as Nonvolatile memory, such as read only memory (ROM) or flash memory (flash RAM).
Internal memory is the example of computer-readable medium.
Computer-readable medium includes that permanent and non-permanent, removable and non-removable media can be by
Any method or technology realize information storage.Information can be computer-readable instruction, data structure, journey
The module of sequence or other data.The example of the storage medium of computer includes, but are not limited to phase transition internal memory
(PRAM), static RAM (SRAM), dynamic random access memory (DRAM),
Other kinds of random access memory (RAM), read only memory (ROM), electrically erasable
Read only memory (EEPROM), fast flash memory bank or other memory techniques, read-only optical disc read only memory
(CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette tape, tape magnetic
Disk storage or other magnetic storage apparatus or any other non-transmission medium, can be used for storage can be counted
The information that calculation equipment accesses.According to defining herein, computer-readable medium does not include non-temporary computer
Readable media (transitory media), such as data signal and the carrier wave of modulation.
Embodiment describes
With an embodiment, the realization of the application method is described further below.The distributed thing of the application
Business processing method is divided into two stages;First stage performs the database manipulation of distributed transaction, second-order
The cleaning of Duan Jinhang Database lock.As it is shown in figure 1, be at a kind of distributed transaction of the embodiment of the present application
The method flow diagram of reason method, the method includes:
Step S100: the transaction branch processing unit corresponding to each transaction branch of distributed transaction receives
After transaction branch SQL statement, send it to isolation controller and carry out adding latching operation;
Step S102: isolation controller obtains and described transaction branch SQL statement phase from data base querying
Corresponding each data row;
Step S104: isolation controller is inquired about from the transactional lock table of data base and obtained corresponding to each data row
Locked record;
Described locked record comprises the global transaction identifier of described distributed transaction.
Step S106: isolation controller is by writing locked record to transactional lock table, for described each data row
Described in the data row that not yet locks of distributed transaction lock;
Step S108: after adding latching operation success, transaction branch processing unit performs described transaction branch SQL
Statement;
Step S110: transaction branch processing unit receives transaction branch and submits instruction or transaction branch rollback to
After instruction, instruction isolation controller deletes described overall situation thing according to global transaction identifier from transactional lock table
Business locked record corresponding to identifier.
With the second embodiment, the realization of the application method is described further below.As in figure 2 it is shown, be
The method flow diagram of the another kind of distributed transaction processing method of the embodiment of the present application, to dividing in the present embodiment
The first stage of cloth transaction methods, the required operation performed was described in detail;The method includes:
Step S200: submission side's (application program) of global transaction is to coordinator's (thing of distributed transaction
Business manager) send global transaction registration request, to carry out the registration of global transaction.
Step S202: after receiving global transaction registration request, task manager is corresponding global transaction
Distribution global transaction identifier, and global transaction identifier is included in transmission in global transaction registration response
To application program;
Global transaction relates to the affairs of multiple explorer (data base), comprises many in global transaction
Individual transaction branch, for an explorer, (data base or the different of data base connect each transaction branch
Connect) perform operation.
In this step, global transaction identifier can be saved in thread belonging to this application program by application program
Context in.
Step S204: application program is by SQL (the Structured Query corresponding to global transaction
Language, SQL) statement (hereinafter referred to as: global transaction SQL statement) is split into
Multiple SQL statement corresponding from different transaction branch respectively are (hereinafter referred to as: transaction branch SQL
Statement), and transaction branch SQL statement is included in transaction branch perform request in be sent respectively to each ginseng
With person (transaction branch processing unit);
Alternatively, in this step, application program can be by global transaction identifier and transaction branch SQL language
Sentence sends jointly to each transaction branch processing unit.
Step S206: after receiving transaction branch execution request, transaction branch processing unit is to transaction management
Device sends transaction branch registration request, to carry out the registration of transaction branch, states a new transaction branch
Beginning;
When transaction branch processing unit carries out the registration of transaction branch, need to provide affairs to task manager
The global transaction identifier of the distributed transaction (alternatively referred to as global transaction) belonging to branch, in order to affairs
Distributed transaction affiliated with it for transaction branch is associated by manager.
If transaction branch processing unit and application program run in same thread, transaction branch processes single
Unit can extract global transaction identifier from the context of current thread and carry out the registration of transaction branch.
If global transaction identifier is sent to transaction branch and processes list by application program in step S204
Unit, transaction branch processing unit can use its global transaction identifier received to carry out transaction branch
Registration.
Step S208: after receiving transaction branch registration request, task manager is corresponding transaction branch
Distribution transaction branch identifier, and transaction branch identifier is returned to transaction branch processing unit;
In this step, transaction branch identifier can be included in transaction branch registration response by task manager
In return to transaction branch processing unit.
Step S210: after receiving transaction branch identifier, transaction branch processing unit preserves transaction branch
Identifier, and send locking request to isolation controller;
Above-mentioned locking request can comprise following information: Database lock type, transaction branch SQL statement.
Above-mentioned Database lock type is divided into: mutual exclusion lock, shared lock.
Database lock in the application is row level lock, and the unit of escapement of the most each Database lock is a data row;
Wherein: mutual exclusion lock allows to have the distributed transaction inquiry of lock, update or delete the data row locked,
Shared lock allows the data row that the distributed transaction inquiry having lock locks.
In order to realize the isolation of distributed transaction, distributed transaction, before reading certain data row, needs
Have the Database lock (mutual exclusion lock or shared lock) of this data row, i.e. arbitrary affairs of this distributed transaction
Branch the most successfully adds Database lock (mutual exclusion lock or shared lock) for this data row;Further, if distributed
Affairs have been that a certain data row has added mutual exclusion lock, the most do not allow any distributed transaction again for this data row
Add in any kind of Database lock, i.e. subsequent step and add latching operation all by mistake for any of this data row
Lose.
Additionally, on the basis of realizing the isolation of distributed transaction, in order to improve distributed transaction also
Send out property, it is contemplated that read operation will not occur data to change, be therefore certain when a distributed transaction
One data row adds shared lock, it is allowed to other distributed transaction adds shared lock for this data row again, but does not permits
Permitted to add mutual exclusion lock for this data row;Subsequent step i.e. adds the operation meeting success of shared lock for this data row,
But the operation adding mutual exclusion lock for this data row can failure.
Additionally, when arbitrary transaction branch of distributed transaction adds Database lock (mutual exclusion for a certain data row
Lock or shared lock), then mean that all transaction branch of this distributed transaction have the data of this data row
Storehouse is locked, and other transaction branch of this distributed transaction is without repeating to lock for this data row, to ensure distribution
The intermediateness of formula affairs is visible in the inside of distributed transaction.
In the present embodiment, can be using transaction branch SQL statement as locking request, by isolation controller root
Database lock type is judged according to the type of SQL statement;Such as:
To inserting (INSERT), amendment (UPDATE), deleting (DELETE), generation patterns
Locking inquiry (SELECT ... FOR UPDATE) operation add mutual exclusion lock;
Locking inquiry (SELECT ... LOCK IN SHARE MODE) operation for shared model adds
Shared lock.
In this step, transaction branch identifier can be saved in thread belonging to it by transaction branch processing unit
Context in.
Additionally, in this step, overall situation things identifier and affairs can also be divided by transaction branch processing unit
Identifier is included in locking request and is sent to isolation controller.
Step S212: its transaction branch SQL statement received is analyzed by isolation controller, root
Generate corresponding data set query statement according to transaction branch SQL statement, data set query statement is sent extremely
Data base, to obtain the data set corresponding to transaction branch SQL statement;
The dissimilar life being respectively described data set query statement below according to transaction branch SQL statement
One-tenth mode:
(1) if transaction branch SQL statement is for inserting (INSERT) statement, the most in the following way
Generation data set query statement:
The table name comprised in transaction branch SQL statement (INSERT statement) is inquired about language as data set
The purpose table name of sentence;
Analyze each field that transaction branch SQL statement (INSERT statement) expectation is inserted, if affairs
Branch's SQL statement (INSERT statement) does not comprise major key, the then all words comprised by this table
Section (arranging) is as the result field (arranging) of data set query statement, and uses transaction branch SQL statement
The all of field that comprises in (INSERT statement) and field value are as the inquiry of data set query statement
Condition;If wherein comprising the major key of table, then using the major key of this table as the result of data set query statement
Field (arranges), and uses major key and corresponding Major key as the querying condition of data set query statement;
Such as, transaction branch SQL statement is:
INSERT INTO table_name(column1,column2)VALUES(v1,v2);
Wherein, table_name is the table name of transaction branch SQL statement;Column1, column2 are thing
The field name of all fields (arranging) that business branch SQL statement is comprised;V1, v2 are respectively above-mentioned each word
The field value of section;Then corresponding data set query statement can be:
SELECT*FROM table_name WHERE ((column1=v1) AND
(column2=v2));
If the major key that column1 is table table_name, then corresponding data set query statement can be:
SELECT column1 FROM table_name WHERE (column1=v1);Or
SELECT*FROM table_name WHERE (column1=v1).
(2) if transaction branch SQL statement is amendment (UPDATE) statement, then use such as lower section
Formula generation data set query statement:
The table name that will comprise in transaction branch SQL statement (UPDATE statement), i.e. expectation update
The table name of table is as the purpose table name of data set query statement;
Analyze each field and the WHERE clause of transaction branch SQL statement (UPDATE statement),
If transaction branch SQL statement (UPDATE statement) does not comprise major key, then this table is wrapped
The all fields (arranging) contained are as the result field (arranging) of data set query statement, and use this affairs
The WHERE clause of branch's SQL statement is as the querying condition of data set query statement;If wherein wrapped
Major key containing table, then using the major key of this table as the result field (arranging) of data set query statement, and make
With major key and corresponding Major key as the querying condition of data set query statement;
Such as, transaction branch SQL statement is:
UPDATE table_name SET column3=v3 WHERE ((column1=v1)
AND (column2=v2));
Wherein, table_name is the table name of transaction branch SQL statement;Column1, column2,
The field name of all fields (arranging) that column3 is comprised by transaction branch SQL statement;V1, v2,
V3 is respectively the field value of above-mentioned each field;Then corresponding data set query statement can be:
SELECT*FROM table_name WHERE ((column1=v1) AND (column2=
v2));
If the major key that column1 is table table_name, then corresponding data set query statement can be:
SELECT column1FROM table_name WHERE (column1=v1);Or
SELECT*FROM table_name WHERE (column1=v1).
(3) if transaction branch SQL statement is for deleting (DELETE) statement, then use such as lower section
Formula generation data set query statement:
The table name that will comprise in transaction branch SQL statement (DELETE statement), i.e. expectation delete data
The table name of table as the purpose table name of data set query statement;
Analyze each field and the WHERE clause of transaction branch SQL statement (DELETE statement), as
Really transaction branch SQL statement (DELETE statement) does not comprise major key, then this table is comprised
All fields (arranging) are as the result field (arranging) of data set query statement, and use this transaction branch
The WHERE clause of SQL statement is as the querying condition of data set query statement;If wherein comprising table
Major key, then using the major key of this table as the result field (arranging) of data set query statement, and use master
Key and accordingly Major key are as the querying condition of data set query statement;
Such as, transaction branch SQL statement is:
DELETE column1,column2,column3 FROM table_name
WHERE ((column1=v1) AND (column2=v2));
Wherein, table_name is the table name of transaction branch SQL statement;Column1, column2,
The field name of all fields (arranging) that column3 is comprised by transaction branch SQL statement;V1, v2 divide
Wei the field value of column1 and column2;Then corresponding data set query statement can be:
SELECT*FROM table_name WHERE ((column1=v1) AND (column2=
v2));
If the major key that column1 is table table_name, then corresponding data set query statement can be:
SELECT column1 FROM table_name WHERE (column1=v1);Or
SELECT*FROM table_name WHERE (column1=v1).
(4) if (SELECT ... FOR is inquired about in the locking that transaction branch SQL statement is generation patterns
UPDATE) statement, the most in the following way generation data set query statement:
The table name that will comprise in transaction branch SQL statement (SELECT ... FOR UPDATE statement),
I.e. expect that the table name of table of inquiry is as the purpose table name of data set query statement;
Analyze transaction branch SQL statement (SELECT ... FOR UPDATE statement) each field and
WHERE clause, if in transaction branch SQL statement (SELECT ... FOR UPDATE statement)
Do not comprise major key, then all fields (arranging) comprised by this table are as the knot of data set query statement
Really field (arranging), and use the WHERE clause of this transaction branch SQL statement to inquire about as data set
The querying condition of statement;If wherein comprising the major key of table, then the major key of this table is inquired about as data set
The result field (arranging) of statement, and use major key and corresponding Major key as data set query statement
Querying condition;
Such as, transaction branch SQL statement is:
SELECT column1,column2,column3 FROM table_name WHERE
((column1=v1) AND (column2=v2)) FOR UPDATE;
Wherein, table_name is the table name of transaction branch SQL statement;Column1, column2,
The field name of all fields (arranging) that column3 is comprised by transaction branch SQL statement;V1, v2,
V3 is respectively the field value of above-mentioned each field;Then corresponding data set query statement can be:
SELECT*FROM table_name WHERE ((column1=v1) AND (column2=
v2));
If the major key that column1 is table table_name, then corresponding data set query statement can be:
SELECT column1FROM table_name WHERE (column1=v1);Or
SELECT*FROM table_name WHERE (column1=v1).
(5) if (SELECT ... LOCK is inquired about in the locking that transaction branch SQL statement is shared model
IN SHARE MODE) statement, the most in the following way generation data set query statement:
By bag in transaction branch SQL statement (SELECT ... LOCK IN SHARE MODE statement)
The table name contained, i.e. expects that the table name of table of inquiry is as the purpose table name of data set query statement;
Analyze transaction branch SQL statement (SELECT ... LOCK IN SHARE MODE statement)
Each field and WHERE clause, if transaction branch SQL statement (SELECT ... LOCK IN
SHARE MODE statement) in do not comprise major key, then all fields (arranging) this table comprised
As the result field (arranging) of data set query statement, and use this transaction branch SQL statement
WHERE clause is as the querying condition of data set query statement;If wherein comprising the major key of table, then
Using the major key of this table as the result field (arranging) of data set query statement, and use major key and corresponding
Major key is as the querying condition of data set query statement;
Such as, transaction branch SQL statement is:
SELECT column1,column2,column3 FROM table_name WHERE
((column1=v1) AND (column2=v2)) LOCK IN SHARE MODE;
Wherein, table_name is the table name of transaction branch SQL statement;Column1, column2,
The field name of all fields (arranging) that column3 is comprised by transaction branch SQL statement;V1, v2,
V3 is respectively the field value of above-mentioned each field;Then corresponding data set query statement can be:
SELECT*FROM table_name WHERE ((column1=v1) AND (column2=
v2));
If the major key that column1 is table table_name, then corresponding data set query statement can be:
SELECT column1FROM table_name WHERE (column1=v1);Or
SELECT*FROM table_name WHERE (column1=v1).
Step S214: data base performs its data set query statement received, and returns to isolation controller
Return the data set (being referred to as query results) corresponding to data set query statement, be denoted as R1.
Step S216: isolation controller is according to the table of tables of data (abbreviation table) belonging to data row each in R1
Name and data row Major key send locked record inquiry request to data base, in order to from the transactional lock of data base
Table is inquired about the locked record of corresponding data row;
Table 1 describes the list structure of the transactional lock table in the application:
Field name | Field type | Field description |
ID | BIGINT UNSIGNED | From increasing major key |
TABLE_NAME | VARchar(100) | Table name |
KEY_VALUE | BIGINT UNSIGNED | Data row Major key |
XID | VARchar(100) | Global transaction identifier |
XLOCK | INT UNSIGNED | Mutual exclusion lock labelling |
SLOCK | INT UNSIGNED | Shared lock labelling |
BRANCH_ID | INT UNSIGNED | Transaction branch identifier |
Table 1
As shown in table 1, transactional lock table comprises following field: transactional lock table major key (ID), table name
(TABLE_NAME), data row Major key (KEY_VALUE), global transaction identifier (XID),
Mutual exclusion lock labelling (XLOCK), shared lock labelling (SLOCK), transaction branch identifier
(BRANCH_ID);Wherein:
Transactional lock table major key (ID) field is the major key of transactional lock table, and this field can be from increasing major key,
Field type can be without the big integer type of symbol (BIGINT UNSIGNED);
Table name (TABLE_NAME) field is for recording the name of tables of data belonging to the data row locked
Claiming, field type can be variable length character type (VARCHAR), and length can be 100 bytes;
Data row Major key (KEY_VALUE) field is for recording corresponding to the data row locked
Major key, field type can be without the big integer type of symbol (BIGINT UNSIGNED);
Global transaction identifier (XID) field is for being recorded as the global transaction of the affairs that data row locks
Identifier, field type can be variable length character type (VARCHAR), and length can be 100
Byte;
Mutual exclusion lock labelling (XLOCK) field is corresponding record (corresponding row) in Identifying transactions lock table
Whether Database lock type is mutual exclusion lock, and field type can be unsigned int (INT
UNSIGNED);
Shared lock labelling (SLOCK) field is corresponding record (corresponding row) in Identifying transactions lock table
Whether Database lock type is shared lock, and field type can be unsigned int (INT
UNSIGNED);
If the Database lock type of corresponding record is mutual exclusion lock, then mutual exclusion lock mark value is nonzero value (example
As, 1), shared lock mark value can be 0;If the Database lock type of corresponding record is shared lock,
Then shared lock mark value is nonzero value (such as, 1).
The affairs that transaction branch identifier (BRANCH_ID) field locks for being recorded as data row are divided
The transaction branch identifier propped up, field type can be unsigned int (INT UNSIGNED).
It is that each data row carries out adding latching operation for the ease of using transactional lock table, counts in transactional lock table
According to the detection of row conflict, by table name (TABLE_NAME), data row Major key (KEY_VALUE)
With mutual exclusion lock labelling (XLOCK) as the unique index of transactional lock table, the most do not allow transactional lock table is deposited
There is a plurality of note of identical table name, identical data row Major key and identical mutual exclusion lock labelling at the same time
Record.
Additionally, in order to accelerate inquiry velocity, it is also possible to by table name (TABLE_NAME) and overall situation thing
Business identifier (XID) is as the simple index of transactional lock table.
Step S218: database root is according to the table name comprised in locked record inquiry request and data row Major key
From transactional lock table, extract the locked record collection of corresponding data row, be denoted as R2, be contained in locked record
Inquiry response returns to isolation controller.
Step S220: isolation controller is according to the locked record collection R2 obtained, from transaction branch SQL language
Query results R1 corresponding to Ju finds out the data set R3 that current distributed transaction not yet locks
(R3=R1-R2), the table name of tables of data, each number belonging to each data row comprised in data set R3 is used
According to data row Major key and the Database lock type of row, each data row in data set R3 is locked,
Each data row write in data set R3 will enter transactional lock table;
When data row is added mutual exclusion lock, the mutual exclusion lock labelling in mutual exclusion lock record is set to set in advance mutually
Scolding lock mark value (such as, 1), shared lock labelling can be set to 0, and together with data belonging to this data row
The table name of table, the Major key of this data row, the global transaction identifier of current distributed transaction, current thing
The transaction branch identifier write transactional lock table of business branch.
Due to table name (TABLE_NAME), data row Major key (KEY_VALUE) and mutual exclusion
Lock labelling (XLOCK) is the unique index in transactional lock table, therefore can ensure once corresponding data row
There is mutual exclusion lock, the operation repeating to add mutual exclusion lock can failure.
Such as, the table name of tables of data belonging to data row is T1, and the Major key of data row is K1, currently divides
The global transaction identifier of cloth affairs is XID1, and the transaction branch identifier of Current transaction branch is
BID1, after this data row is added mutual exclusion lock, the respective record in transactional lock table is as shown in table 2:
ID | TABLE_NAME | KEY_VALUE | XID | XLOCK | SLOCK | BRANCH_ID |
IDn | T1 | K1 | XID1 | 1 | 0 | BID1 |
Table 2
Wherein, the IDn in table 2 is that when writing corresponding locked record, data base automatically generates for this record
Transactional lock table major key (ID) value.
When data row is added shared lock, isolation controller needs to judge whether it according to locked record collection R2
Its distributed transaction has added shared lock for corresponding data row, is corresponding without other distributed transaction
Data row adds shared lock, then by writing two row locked records to transactional lock table, to be that corresponding data row adds shared
Lock;
Wherein a line locked record is properly termed as the implicit expression mutual exclusion lock record of corresponding data row;By in this record
Mutual exclusion lock labelling put mutual exclusion lock mark value set in advance (such as, 1), shared lock labelling can be set to
1, and together with the table name of tables of data, the Major key of this data row, current distributed transaction belonging to this data row
Global transaction identifier, Current transaction branch transaction branch identifier write transactional lock table;
Another row locked record is properly termed as the shared lock record of corresponding data row;By the mutual exclusion in this record
Lock labelling is set to the global transaction identifier of current distributed transaction, and shared lock labelling can be set to set in advance
Fixed shared lock mark value (such as, 1), and together with the table name of tables of data, these data belonging to this data row
The Major key of row, the global transaction identifier of current distributed transaction, the transaction branch of Current transaction branch
Identifier write transactional lock table.
Such as, the table name of tables of data belonging to data row is T1, and the Major key of data row is K1, currently divides
The global transaction identifier of cloth affairs is XID1, and the transaction branch identifier of Current transaction branch is
BID1, if this data row had not previously had the locked record of correspondence in transactional lock table, to this data row the
After once adding shared lock, the respective record in transactional lock table is as shown in table 3:
ID | TABLE_NAME | KEY_VALUE | XID | XLOCK | SLOCK | BRANCH_ID |
IDn | T1 | K1 | XID1 | 1 | 1 | BID1 |
IDn+1 | T1 | K1 | XID1 | XID1 | 1 | BID1 |
Table 3
When data row is added shared lock, if isolation controller judges other point according to locked record collection R2
Cloth affairs have added shared lock for corresponding data row, then by writing a line locked record to transactional lock table
Add shared lock for corresponding data row, the most only need the shared lock record to transactional lock table write correspondence.
Such as, global transaction identifier be XID1 distributed transaction for table name be T1, Major key be
The data row write of K1 enters shared lock as shown in table 3, then global transaction identifier is the distributed of XID2
In affairs transaction branch identifier be the transaction branch of BID2 be that this data row is when adding shared lock, it is only necessary to write
Enter the shared lock record of correspondence, after locking successfully, the record that in transactional lock table, this data row is corresponding such as table 4
Shown in:
ID | TABLE_NAME | KEY_VALUE | XID | XLOCK | SLOCK | BRANCH_ID |
IDn | T1 | K1 | XID1 | 1 | 1 | BID1 |
IDn+1 | T1 | K1 | XID1 | XID1 | 1 | BID1 |
IDm | T1 | K1 | XID2 | XID2 | 1 | BID2 |
Table 4
Due to table name (TABLE_NAME), data row Major key (KEY_VALUE) and mutual exclusion
Lock labelling (XLOCK) is the unique index in transactional lock table, therefore can ensure once corresponding data row
There is mutual exclusion lock, the operation adding shared lock for corresponding data row can failure.
Correspondingly, once there is shared lock in corresponding data row, adds the operation meeting of mutual exclusion lock for corresponding data row
Failure;Simultaneously as allowing different distributed transactions is that same data row repeatedly adds shared lock, therefore
Use the above-mentioned method adding shared lock, make use of the global transaction identifier (XID) of distributed transaction no
Repeat this feature, it is to avoid shared lock conflict.
In other embodiments of the invention, transactional lock table can omit shared lock labelling (SLOCK)
Field, only uses mutual exclusion lock labelling (XLOCK) field to distinguish the Database lock type of each locked record:
If a certain data row only has a line locked record in transactional lock table, then this locked record is corresponding
Database lock type is mutual exclusion lock;
If a certain data row exists multirow locked record in transactional lock table, then this locked record is corresponding
Database lock type is shared lock.
Step S222: data base returns the execution result adding latching operation, isolation controller to isolation controller
It is the most successful, if it succeeds, perform next that the execution result returned according to data base judges to add latching operation
Step;If locking operation failure, then jump to step S216, re-start locked record inquiry and
Add latching operation.
From step 220 and step 222, in the present embodiment, due to the difference of same distributed transaction
Transaction branch is without repeating to lock for same data row, and therefore isolation controller is first from query results R1
In filter out the data set R3 that current distributed transaction not yet locks, to each data row in data set R3
Lock, i.e. write corresponding record to transactional lock table;According to the unique index in transactional lock table, Yi Jishang
State the concrete mode adding mutual exclusion lock and shared lock, when a certain distributed transaction has been that a certain data row adds
Mutual exclusion lock, then adding latching operation for this data row any all will unsuccessfully;When a certain distributed transaction
Added shared lock for a certain data row, then other distributed transaction adds the operation of shared lock for this data row
Can be successful, and the operation meeting failure of mutual exclusion lock is added for this data row.
Step S224: isolation controller returns to transaction branch processing unit and locks response, and notice affairs are divided
Prop up processing unit to have locked successfully.
Step S226: after locking successfully, transaction branch SQL statement is comprised by transaction branch processing unit
It is sent to data base, to perform corresponding transaction branch in transaction branch performs request.
Step S228: after transaction branch SQL statement is finished, data base processes single to transaction branch
Unit returns transaction branch and performs response, to notify the execution state of transaction branch processing unit transaction branch.
Step S230: transaction branch processing unit sends the report of transaction branch state to task manager please
Ask, to report the execution state of transaction branch.
Step S232: after receiving the report request of transaction branch state, the corresponding thing of task manager record
Business bifurcation state information, and return the report response of transaction branch state to transaction branch processing unit;
After receiving the report response of transaction branch state, transaction branch processing unit can discharge corresponding number
According to system resources such as storehouse connections.
Step S234: transaction branch processing unit returns transaction branch to application program and performs response, with logical
Know the execution state of application transaction branch.
So far, the first stage of distributed transaction processing method completes.In this stage, each transaction branch
Processing unit completes the database manipulation of corresponding transaction branch, it is possible to release after database manipulation
Put corresponding system resource.
With the 3rd embodiment, the realization of the application method is described further below.As it is shown on figure 3, be
The method flow diagram of the another kind of distributed transaction processing method of the embodiment of the present application, to dividing in the present embodiment
The required operation performed of the second stage of cloth transaction methods is described in detail;The method includes:
Step S300: submission side's (application program) of global transaction is to coordinator's (thing of distributed transaction
Business manager) send global transaction submission instruction or global transaction rollback instruction, to initiate distributed transaction
Submission or rollback;
Above-mentioned global transaction submits the global transaction identifier comprising distributed transaction in instruction to.
Above-mentioned global transaction rollback instruction comprises the global transaction identifier of distributed transaction.
Application program can be true according to the execution state of each transaction branch of each transaction branch processing unit report
Determine whether to submit global transaction, or rollback global transaction to;
If the execution state of each transaction branch that each transaction branch processing unit is reported is all for running succeeded,
Then carry out the submission of global transaction;
If the execution state of the transaction branch that arbitrary transaction branch processing unit is reported is for performing unsuccessfully or super
Time do not report execution state, then carry out the rollback of global transaction.
Step S302: task manager returns global transaction to application program and submits to response or global transaction to return
Rolling response.
Step S304: if task manager receives global transaction submission instruction in step S300,
Then send transaction branch to each participant (transaction branch processing unit) of distributed transaction and submit instruction to,
To initiate the submission of each transaction branch of distributed transaction;If task manager connects in step S300
Receive global transaction rollback instruction, then to each participant (transaction branch processing unit) of distributed transaction
Send transaction branch rollback instruction, to initiate the rollback of each transaction branch of distributed transaction;
Above-mentioned transaction branch submits the global transaction identifier that can comprise distributed transaction in instruction to.
Above-mentioned transaction branch rollback instruction can comprise the global transaction identifier of distributed transaction.
If additionally, task manager did not received within the time set in advance have registered distributed transaction
The global transaction that application program sends submits instruction to, shows that application program end occurs abnormal;In this situation
Under, even if not receiving the global transaction rollback instruction that application program sends, task manager also can be to this
Each transaction branch processing unit corresponding to global transaction sends transaction branch rollback instruction, to drive each thing
Business Branch Processing Unit carries out the rollback of transaction branch.
Step S306: after receiving transaction branch submission instruction or transaction branch rollback instruction, transaction branch
Processing unit sends lock cleaning request to isolation controller;
The cleaning request of above-mentioned lock comprises the global transaction identifier of distributed transaction.
Step S308: after receiving lock cleaning request, isolation controller is according to the overall situation comprised in this request
Transaction identifiers carries out deleting latching operation, i.e. delete the transactional lock table of data base comprises have correspondence complete
The record of office's transaction identifiers.
Step S310: data base returns the execution result deleting latching operation to isolation controller.
Step S312: isolation controller sends lock cleaning response to transaction branch processing unit, to notify thing
Business Branch Processing Unit deletes the execution result of latching operation.
Step S314: transaction branch processing unit sends the report of transaction branch state to task manager please
Ask, the execution state of submission or rollback to report transaction branch.
As it has been described above, in second stage, each transaction branch processing unit carry out transaction branch submission and
During rollback, global transaction identifier only need to be used can to complete to delete latching operation, and without keeping data base even
Connect, not blocking data base resource.
In above-described embodiment of the application, distributed in order to prevent a certain distributed transaction from reading other
The intermediateness of affairs, it is achieved read to have been filed on the isolation level of (Read Committed), distributed
Affairs need corresponding data row is added shared lock before carrying out inquiry operation.The following embodiment of the application is adopted
Otherwise realize the mesh of intermediateness preventing a certain distributed transaction from reading other distributed transaction
's.
With the 4th embodiment, the realization of the application method is described further below.As shown in Figure 4, for
The method flow diagram of the another kind of distributed transaction processing method of the embodiment of the present application;The method includes:
Step S400: submission side's (application program) of global transaction is to coordinator's (thing of distributed transaction
Business manager) send global transaction registration request, to carry out the registration of global transaction.
Step S402: after receiving global transaction registration request, task manager is corresponding global transaction
Distribution global transaction identifier, and global transaction identifier is included in transmission in global transaction registration response
To application program;
In this step, global transaction identifier can be saved in thread belonging to this application program by application program
Context in.
Step S404: application program is by SQL (the Structured Query corresponding to global transaction
Language, SQL) statement (hereinafter referred to as: global transaction SQL statement) is split into
Multiple SQL statement corresponding from different transaction branch respectively are (hereinafter referred to as: transaction branch SQL
Statement), and transaction branch SQL statement is included in transaction branch perform request in be sent respectively to each ginseng
With person (transaction branch processing unit);
Alternatively, in this step, application program can be by global transaction identifier and transaction branch SQL language
Sentence sends jointly to each transaction branch processing unit.
In the present embodiment, the transaction branch SQL statement that transaction branch processing unit receives is that reading has been filed on
Query statement.
Under normal circumstances, whether inquiry operation (read operation) of most of distributed transactions is not relevant for
Read the intermediateness of other distributed transaction, therefore, in default situations, inquiry is not operated into
Row lock checks, does not the most check that the data row corresponding to inquiry operation is added by other distributed transaction the most
Mutual exclusion lock.It is undesirable that read the intermediateness of other distributed transaction, application program can looked into
Ask and statement (transaction branch SQL statement) adds annotation (HINT), to state this query statement not
Wish to read the intermediateness of other distributed transaction, have been filed on looking into by the referred to as reading of this quasi-sentence herein
Ask statement.Such as:
/*+TXC({'level':'readcommited'})*/SELECT column1 FROM
table_name。
Wherein, "/*+TXC (' level':'readcommited'}) */" for being used for stating that this query statement is not wished
Hope the annotation information of the intermediateness reading other distributed transaction, i.e. wish that realizing reading has been filed on isolation
The inquiry of rank;Table_name is the table name that this query statement wishes the table of inquiry;Column1 is for being somebody's turn to do
Query statement wishes the field name of the field of inquiry.
Step S406: after receiving transaction branch execution request, transaction branch processing unit is to transaction management
Device sends transaction branch registration request, to carry out the registration of transaction branch, states a new transaction branch
Beginning;
When transaction branch processing unit carries out the registration of transaction branch, need to provide affairs to task manager
The global transaction identifier of the distributed transaction (alternatively referred to as global transaction) belonging to branch, in order to affairs
Distributed transaction affiliated with it for transaction branch is associated by manager.
If transaction branch processing unit and application program run in same thread, transaction branch processes single
Unit can extract global transaction identifier from the context of current thread and carry out the registration of transaction branch.
If global transaction identifier is sent to transaction branch and processes list by application program in step s 404
Unit, transaction branch processing unit can use its global transaction identifier received to carry out transaction branch
Registration.
Step S408: after receiving transaction branch registration request, task manager is corresponding transaction branch
Distribution transaction branch identifier, and transaction branch identifier is returned to transaction branch processing unit;
In this step, transaction branch identifier can be included in transaction branch registration response by task manager
In return to transaction branch processing unit.
Step S410: after receiving transaction branch identifier, transaction branch processing unit preserves transaction branch
Identifier, and have been filed on query statement to the isolation controller above-mentioned reading of transmission.
Step S412: isolation controller has been filed on query statement to its reading received and is analyzed, according to
This reading has been filed on query statement and generates corresponding data set query statement, is sent extremely by data set query statement
Data base, to obtain the data set reading to have been filed on corresponding to query statement;
In this step, generation data set query statement in the following way:
Reading is had been filed on the table name comprised in query statement, i.e. expects that the table name of table of inquiry is as data set
The purpose table name of query statement;
Analyze each field and the WHERE clause reading to have been filed on query statement, if reading to have been filed on inquiring about language
Do not comprise major key in Ju, then all fields (arranging) comprised by this table are as data set query statement
Result field (arranging), and use this reading to have been filed on the WHERE clause of query statement as data set
The querying condition of query statement;If wherein comprising the major key of table, then the query statement removing annotation is made
For data set query statement;
Such as, read to have been filed on query statement and be:
/*+TXC({'level':'readcommited'})*/SELECT column1,column2,column3
FROM table_name WHERE ((column1=v1) AND (column2=v2));
Wherein, table_name is the table name reading to have been filed on query statement;Column1, column2,
Column3 has been filed on the field name of all fields (arranging) that query statement is comprised by reading;V1, v2, v3
It is respectively the field value of above-mentioned each field;
If this reading has been filed in query statement not comprising major key, then corresponding data set query statement is permissible
For:
SELECT*FROM table_name WHERE ((column1=v1) AND (column2=
v2));
If the major key that column1 is table table_name, then corresponding data set query statement can be:
SELECT column1,column2,column3 FROM table_name WHERE
((column1=v1) AND (column2=v2)).
Step S414: data base performs its data set query statement received, and returns to isolation controller
Return the data set (being referred to as query results) corresponding to data set query statement, be denoted as R1.
Step S416: isolation controller is according to the table of tables of data (abbreviation table) belonging to data row each in R1
Name and data row Major key send locked record inquiry request to data base, in order to from the transactional lock of data base
Table is inquired about the locked record of corresponding data row;
Preferably, in this step, isolation controller can only be inquired about corresponding data row Database lock type and be
The locked record of mutual exclusion lock.
Step S418: database root is according to the table name comprised in locked record inquiry request and data row Major key
From transactional lock table, extract the locked record collection of corresponding data row, be denoted as R2, be contained in locked record
Inquiry response returns to isolation controller.
Step S420: the most whether isolation controller is according to the locked record collection R2 obtained, it is judged that comprise
The record of mutual exclusion lock has been added by other distributed transaction;If comprised, then show to there is mutual exclusion lock conflict,
Jump to step S416 carry out repeating inquiry;If do not comprised, then show to there is not mutual exclusion lock conflict,
Corresponding query results is returned to transaction branch processing unit.
Step S422: transaction branch processing unit sends the report of transaction branch state to task manager please
Ask, to report the execution state of transaction branch.
Step S424: after receiving the report request of transaction branch state, the corresponding thing of task manager record
Business bifurcation state information, and return the report response of transaction branch state to transaction branch processing unit;
After receiving the report response of transaction branch state, transaction branch processing unit can discharge corresponding number
According to system resources such as storehouse connections.
Step S426: transaction branch processing unit returns transaction branch to application program and performs response, with logical
Know the execution state of application transaction branch.
So far, the first stage of distributed transaction processing method completes.
The concrete steps of the second stage of the distributed transaction processing method corresponding to the present embodiment and Fig. 3 institute
Show that step is identical, repeat no more herein.
With another embodiment, the realization of the application system is described further below.As it is shown in figure 5, be
The system construction drawing of the distributing real time system system of the embodiment of the present application, in distributing real time system system
Including: the transaction branch processing unit 500 corresponding to each transaction branch of distributed transaction;Isolation control
Device 502 processed, data base 504;Wherein:
Transaction branch processing unit, for after receiving transaction branch SQL statement, send it to every
Carry out adding latching operation from controller;
Isolation controller, for obtain from data base querying corresponding with described transaction branch SQL statement
Each data row, and after the locked record obtained corresponding to each data row inquired about by the transactional lock table of data base,
By writing locked record to transactional lock table, not yet lock for distributed transaction described in described each data row
Data row lock;Described locked record comprises the global transaction identifier of described distributed transaction;
Transaction branch processing unit is additionally operable to, after adding latching operation success, perform described transaction branch SQL language
Sentence;
Transaction branch processing unit be additionally operable to receive transaction branch submit to instruction or transaction branch rollback refer to
After order, instruction isolation controller deletes described global transaction according to global transaction identifier from transactional lock table
Locked record corresponding to identifier.
Additionally, described locked record also comprises the field of the following unique index as described transactional lock table:
The table name of table belonging to data row, the Major key of data row and mutual exclusion lock labelling;
When data row is added mutual exclusion lock, isolation controller is by the mutual exclusion lock tag field in described locked record
It is set to mutual exclusion lock mark value set in advance.
Additionally, isolation controller adds shared lock for data row in the following way:
If being that corresponding data row adds shared lock currently without other distributed transaction, then by transactional lock
It is that corresponding data row adds shared lock: the wherein mutual exclusion lock mark of a line locked record that table writes two row locked records
The value of note field is described mutual exclusion lock mark value set in advance, the mutual exclusion lock labelling of another row locked record
The value of field is described global transaction identifier;
If other distributed transaction adds shared lock for corresponding data row, then by writing to transactional lock table
A line locked record is that corresponding data row adds shared lock, and the value of the mutual exclusion lock tag field of this locked record is
Described global transaction identifier.
Additionally, transaction branch processing unit is additionally operable to receiving after reading has been filed on query statement, by it
Deliver to isolation controller;
Isolation controller is additionally operable to obtain having been filed on query statement with described reading from data base querying corresponding
Each data row, and after the locked record obtained corresponding to each data row inquired about by the transactional lock table of data base,
Judge that other distributed transaction has been filed in each data row that query statement is corresponding for described reading the most
A line or multirow add mutual exclusion lock;If it is not, then described reading to be had been filed on each data that query statement is corresponding
Row returns to transaction branch processing unit;
It is the middle shape comprising and not reading other distributed transaction for statement that described reading has been filed on query statement
The query statement of the annotation information of state.
Described system also includes: the submission side 506 of described distributed transaction, task manager 508;Its
In:
The submission side of described distributed transaction, for registering described distributed transaction to task manager,
After distributed transaction registration, send described transaction branch SQL statement to transaction branch processing unit;
Transaction branch processing unit is additionally operable to after receiving described transaction branch SQL statement, by described
Transaction branch SQL statement sent before isolation controller, registered described transaction branch to task manager
Transaction branch corresponding to SQL statement;
Transaction branch processing unit is additionally operable to after performing described transaction branch SQL statement, to described distribution
The submission side of formula affairs or report transaction branch to the submission side of described distributed transaction and task manager
Execution state.
Additionally, the submission side of described distributed transaction is additionally operable to by sending global transaction to task manager
Submit to instruction that described distributed transaction is submitted to;
The submission side of described distributed transaction is additionally operable to by referring to task manager transmission global transaction rollback
Order carries out rollback to described distributed transaction;
Task manager is additionally operable to receiving after global transaction submits instruction to each transaction branch processing unit
Send described transaction branch and submit instruction to;
Task manager is additionally operable to after receiving global transaction rollback instruction or in the time set in advance
When the global transaction of the submission side's transmission inside not receiving described distributed transaction submits instruction to, divide to each affairs
Prop up processing unit and send described transaction branch rollback instruction.
Described above illustrate and describes some preferred embodiments of the application, but as previously mentioned, it should reason
Solve the application and be not limited to form disclosed herein, be not to be taken as the eliminating to other embodiments,
And can be used for various other combination, amendment and environment, and can in invention contemplated scope described herein,
It is modified by above-mentioned teaching or the technology of association area or knowledge.And those skilled in the art are carried out changes
Move and change is without departing from spirit and scope, the most all should be in the protection of the application claims
In the range of.
Claims (12)
1. a distributed transaction processing method, it is characterised in that the method includes:
The transaction branch processing unit corresponding to each transaction branch of distributed transaction receives transaction branch
After SQL statement, send it to isolation controller and carry out adding latching operation;
Isolation controller obtains each number corresponding with described transaction branch SQL statement from data base querying
According to row, and after the locked record obtained corresponding to each data row inquired about by the transactional lock table of data base, pass through
Locked record, the number not yet locked for distributed transaction described in described each data row is write to transactional lock table
Lock according to row;Described locked record comprises the global transaction identifier of described distributed transaction;
After adding latching operation success, transaction branch processing unit performs described transaction branch SQL statement;
After transaction branch processing unit receives transaction branch submission instruction or transaction branch rollback instruction, refer to
Show that isolation controller deletes described global transaction identifier institute according to global transaction identifier from transactional lock table
Corresponding locked record.
Method the most according to claim 1, it is characterised in that
Described locked record also comprises the field of as follows unique index as described transactional lock table: data
The table name of table, the Major key of data row and mutual exclusion lock labelling belonging to row;
When data row is added mutual exclusion lock, it is set to set in advance by the mutual exclusion lock tag field in described locked record
Fixed mutual exclusion lock mark value.
Method the most according to claim 2, it is characterised in that
Shared lock is added in the following way for data row:
If being that corresponding data row adds shared lock currently without other distributed transaction, then by transactional lock
It is that corresponding data row adds shared lock: the wherein mutual exclusion lock mark of a line locked record that table writes two row locked records
The value of note field is described mutual exclusion lock mark value set in advance, the mutual exclusion lock labelling of another row locked record
The value of field is described global transaction identifier;
If other distributed transaction adds shared lock for corresponding data row, then by writing to transactional lock table
A line locked record is that corresponding data row adds shared lock, and the value of the mutual exclusion lock tag field of this locked record is
Described global transaction identifier.
Method the most according to claim 2, it is characterised in that
The method also includes:
Transaction branch processing unit receives after reading has been filed on query statement, sends it to isolation controller;
Isolation controller obtains having been filed on, from data base querying, each data that query statement is corresponding with described reading
OK, and after the locked record obtained corresponding to each data row inquired about by the transactional lock table of data base, it is judged that its
Its distributed transaction the most for described reading have been filed on a line in each data row that query statement is corresponding or
Multirow adds mutual exclusion lock;Return if it is not, then described reading to be had been filed on the corresponding each data row of query statement
To transaction branch processing unit;
It is the middle shape comprising and not reading other distributed transaction for statement that described reading has been filed on query statement
The query statement of the annotation information of state.
Method the most according to claim 1, it is characterised in that
The method also includes:
The submission direction task manager of described distributed transaction registers described distributed transaction, distributed
After affairs registration, send described transaction branch SQL statement to transaction branch processing unit;
After receiving described transaction branch SQL statement, described transaction branch SQL statement is sent extremely
Before isolation controller, transaction branch processing unit registers described transaction branch SQL language to task manager
Transaction branch corresponding to Ju;
After performing described transaction branch SQL statement, transaction branch processing unit is to described distributed transaction
Submission side or report the execution shape of transaction branch to the submission side of described distributed transaction and task manager
State.
Method the most according to claim 5, it is characterised in that
The method also includes:
The submission side of described distributed transaction submits to instruction to institute by sending global transaction to task manager
State distributed transaction to submit to;The submission side of described distributed transaction is complete by sending to task manager
Office's transaction rollback instruction carries out rollback to described distributed transaction;
Task manager receives after global transaction submits instruction to described to the transmission of each transaction branch processing unit
Transaction branch submits instruction to;Task manager receives after global transaction rollback instructs or is presetting
Time in do not receive described distributed transaction submission side send global transaction submit to instruction time, to respectively
Transaction branch processing unit sends described transaction branch rollback instruction.
7. a distributing real time system system, it is characterised in that this system includes: distributed
The transaction branch processing unit corresponding to each transaction branch of affairs, isolation controller, data base;Its
In:
Transaction branch processing unit, for after receiving transaction branch SQL statement, send it to every
Carry out adding latching operation from controller;
Isolation controller, for obtain from data base querying corresponding with described transaction branch SQL statement
Each data row, and after the locked record obtained corresponding to each data row inquired about by the transactional lock table of data base,
By writing locked record to transactional lock table, not yet lock for distributed transaction described in described each data row
Data row lock;Described locked record comprises the global transaction identifier of described distributed transaction;
Transaction branch processing unit, is additionally operable to, after adding latching operation success, perform described transaction branch SQL
Statement;
Transaction branch processing unit, is additionally operable to receiving transaction branch submission instruction or transaction branch rollback
After instruction, instruction isolation controller deletes described overall situation thing according to global transaction identifier from transactional lock table
Business locked record corresponding to identifier.
System the most according to claim 7, it is characterised in that
Described locked record also comprises the field of as follows unique index as described transactional lock table: data
The table name of table, the Major key of data row and mutual exclusion lock labelling belonging to row;
When data row is added mutual exclusion lock, isolation controller is by the mutual exclusion lock tag field in described locked record
It is set to mutual exclusion lock mark value set in advance.
System the most according to claim 8, it is characterised in that
Isolation controller adds shared lock for data row in the following way:
If being that corresponding data row adds shared lock currently without other distributed transaction, then by transactional lock
It is that corresponding data row adds shared lock: the wherein mutual exclusion lock mark of a line locked record that table writes two row locked records
The value of note field is described mutual exclusion lock mark value set in advance, the mutual exclusion lock labelling of another row locked record
The value of field is described global transaction identifier;
If other distributed transaction adds shared lock for corresponding data row, then by writing to transactional lock table
A line locked record is that corresponding data row adds shared lock, and the value of the mutual exclusion lock tag field of this locked record is
Described global transaction identifier.
System the most according to claim 8, it is characterised in that
Transaction branch processing unit, is additionally operable to receiving after reading has been filed on query statement, sends it to
Isolation controller;
Isolation controller, is additionally operable to obtain having been filed on query statement with described reading from data base querying relative
The each data row answered, and the locked record obtained corresponding to each data row is inquired about from the transactional lock table of data base
After, it is judged that other distributed transaction has been filed on, for described reading, each data row that query statement is corresponding the most
In a line or multirow add mutual exclusion lock;If it is not, then described reading to be had been filed on corresponding each of query statement
Data row returns to transaction branch processing unit;
It is the middle shape comprising and not reading other distributed transaction for statement that described reading has been filed on query statement
The query statement of the annotation information of state.
11. systems according to claim 7, it is characterised in that
Described system also includes: the submission side of described distributed transaction, task manager;Wherein:
The submission side of described distributed transaction, for registering described distributed transaction to task manager,
After distributed transaction registration, send described transaction branch SQL statement to transaction branch processing unit;
Transaction branch processing unit, is additionally operable to after receiving described transaction branch SQL statement, by institute
State transaction branch SQL statement to send before isolation controller, register described affairs to task manager and divide
Prop up the transaction branch corresponding to SQL statement;
Transaction branch processing unit, is additionally operable to after performing described transaction branch SQL statement, to described point
The submission side of cloth affairs or report affairs to the submission side of described distributed transaction and task manager and divide
The execution state propped up.
12. systems according to claim 7, it is characterised in that
The submission side of described distributed transaction, is additionally operable to by sending global transaction submission to task manager
Described distributed transaction is submitted to by instruction;
The submission side of described distributed transaction, is additionally operable to by sending global transaction rollback to task manager
Instruction carries out rollback to described distributed transaction;
Task manager, is additionally operable to receiving after global transaction submits instruction to each transaction branch process list
Unit sends described transaction branch and submits instruction to;
Task manager, is additionally operable to after receiving global transaction rollback instruction or time set in advance
In do not receive described distributed transaction submission side send global transaction submit to instruction time, to each affairs
Branch Processing Unit sends described transaction branch rollback instruction.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510111872.XA CN106033437B (en) | 2015-03-13 | 2015-03-13 | Distributed transaction processing method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510111872.XA CN106033437B (en) | 2015-03-13 | 2015-03-13 | Distributed transaction processing method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106033437A true CN106033437A (en) | 2016-10-19 |
CN106033437B CN106033437B (en) | 2020-01-10 |
Family
ID=57150641
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510111872.XA Active CN106033437B (en) | 2015-03-13 | 2015-03-13 | Distributed transaction processing method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106033437B (en) |
Cited By (36)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106372030A (en) * | 2016-10-27 | 2017-02-01 | 郑州云海信息技术有限公司 | Method and device for data synchronization of dual controller storage system |
CN106503257A (en) * | 2016-11-15 | 2017-03-15 | 北京京东金融科技控股有限公司 | Distributed transaction server method and system based on binlog compensation mechanism |
CN106919640A (en) * | 2016-11-16 | 2017-07-04 | 阿里巴巴集团控股有限公司 | A kind of method and device for business processing |
CN107357885A (en) * | 2017-06-30 | 2017-11-17 | 北京奇虎科技有限公司 | Method for writing data and device, electronic equipment, computer-readable storage medium |
CN108089926A (en) * | 2018-01-08 | 2018-05-29 | 马上消费金融股份有限公司 | A kind of method, apparatus, equipment and readable storage medium storing program for executing for obtaining distributed lock |
CN108319496A (en) * | 2017-01-18 | 2018-07-24 | 阿里巴巴集团控股有限公司 | resource access method, service server, distributed system and storage medium |
CN108959403A (en) * | 2018-06-06 | 2018-12-07 | 阿里巴巴集团控股有限公司 | A kind of distributed transaction processing method and device |
CN109165084A (en) * | 2018-08-20 | 2019-01-08 | 四川长虹电器股份有限公司 | Distributed transaction management method based on state stream |
WO2019047752A1 (en) * | 2017-09-08 | 2019-03-14 | 阿里巴巴集团控股有限公司 | Non-relational database transaction processing method, apparatus and electronic device |
CN109710629A (en) * | 2019-01-08 | 2019-05-03 | 上海达梦数据库有限公司 | Data access method, device, server and storage medium |
CN109800062A (en) * | 2018-12-25 | 2019-05-24 | 星环信息科技(上海)有限公司 | A kind of Distributed database transaction processing system |
CN109901914A (en) * | 2018-12-28 | 2019-06-18 | 阿里巴巴集团控股有限公司 | Transaction methods, device and equipment |
CN109923534A (en) * | 2016-11-04 | 2019-06-21 | 易享信息技术有限公司 | To the Multi version concurrency control with the data-base recording for not submitting affairs |
CN109933606A (en) * | 2019-03-19 | 2019-06-25 | 上海达梦数据库有限公司 | A kind of database update method, apparatus, equipment and storage medium |
CN110019530A (en) * | 2017-12-29 | 2019-07-16 | 百度在线网络技术(北京)有限公司 | Transaction methods and device based on distributed data base |
CN110018884A (en) * | 2019-03-19 | 2019-07-16 | 阿里巴巴集团控股有限公司 | Distributed transaction processing method, conditioning unit, database and electronic equipment |
CN110532068A (en) * | 2019-07-18 | 2019-12-03 | 政采云有限公司 | A kind of management method of distributed transaction |
CN110765178A (en) * | 2019-10-18 | 2020-02-07 | 京东数字科技控股有限公司 | Distributed transaction processing method and device and computer storage medium |
CN110888718A (en) * | 2019-11-27 | 2020-03-17 | 武汉虹旭信息技术有限责任公司 | Method and device for realizing distributed transaction |
CN111259083A (en) * | 2020-02-13 | 2020-06-09 | 神州数码融信软件有限公司 | Distributed transaction processing method and device |
CN111324603A (en) * | 2019-12-27 | 2020-06-23 | 湖南星汉数智科技有限公司 | Grouping-based database processing method and device, computer device and computer readable storage medium |
CN111433764A (en) * | 2017-12-06 | 2020-07-17 | 华为技术有限公司 | High-throughput distributed transaction management of global consistency sliced O L TP system and implementation method thereof |
CN111444199A (en) * | 2019-01-17 | 2020-07-24 | 阿里巴巴集团控股有限公司 | Data processing method and device, storage medium and processor |
CN111522631A (en) * | 2020-03-23 | 2020-08-11 | 支付宝(杭州)信息技术有限公司 | Distributed transaction processing method, device, server and medium |
CN111753013A (en) * | 2020-06-24 | 2020-10-09 | 中国银行股份有限公司 | Distributed transaction processing method and device |
CN111984665A (en) * | 2020-09-10 | 2020-11-24 | 上海优扬新媒信息技术有限公司 | Distributed transaction processing method, device and system |
CN112199391A (en) * | 2020-09-30 | 2021-01-08 | 深圳前海微众银行股份有限公司 | Data locking detection method and device and computer readable storage medium |
CN113127211A (en) * | 2019-12-31 | 2021-07-16 | 美光科技公司 | Lock management associated with key-value database systems |
WO2021169243A1 (en) * | 2020-02-29 | 2021-09-02 | 华为技术有限公司 | Method, apparatus and system for processing distributed transaction |
CN113391885A (en) * | 2021-06-18 | 2021-09-14 | 电子科技大学 | Distributed transaction processing system |
CN113485998A (en) * | 2021-07-27 | 2021-10-08 | 中国银行股份有限公司 | Redis transaction processing method and device, electronic device and storage medium |
CN113495872A (en) * | 2020-04-08 | 2021-10-12 | 北京万里开源软件有限公司 | Transaction processing method and system in distributed database |
CN114238353A (en) * | 2021-12-21 | 2022-03-25 | 山东浪潮科学研究院有限公司 | Method and system for realizing distributed transaction |
CN114925084A (en) * | 2022-05-31 | 2022-08-19 | 易保网络技术(上海)有限公司 | Distributed transaction processing method, system, device and readable storage medium |
CN116225724A (en) * | 2023-05-09 | 2023-06-06 | 云筑信息科技(成都)有限公司 | Method for realizing distributed retry scheduling based on memory |
CN117453750A (en) * | 2023-12-21 | 2024-01-26 | 平凯星辰(北京)科技有限公司 | Data processing method, device, electronic equipment and storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH08286964A (en) * | 1995-04-13 | 1996-11-01 | Mitsubishi Electric Corp | Method for processing distributed transaction |
CN102073540A (en) * | 2010-12-15 | 2011-05-25 | 北京新媒传信科技有限公司 | Distributed affair submitting method and device thereof |
CN102546752A (en) * | 2011-12-06 | 2012-07-04 | 华中科技大学 | Distributed transaction processing method and system based on time limit |
CN102831156A (en) * | 2012-06-29 | 2012-12-19 | 浙江大学 | Distributed transaction processing method on cloud computing platform |
US20130036136A1 (en) * | 2011-08-01 | 2013-02-07 | International Business Machines Corporation | Transaction processing system, method and program |
CN103902560A (en) * | 2012-12-25 | 2014-07-02 | 中国移动通信集团福建有限公司 | Distributed transaction processing method and system |
-
2015
- 2015-03-13 CN CN201510111872.XA patent/CN106033437B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH08286964A (en) * | 1995-04-13 | 1996-11-01 | Mitsubishi Electric Corp | Method for processing distributed transaction |
CN102073540A (en) * | 2010-12-15 | 2011-05-25 | 北京新媒传信科技有限公司 | Distributed affair submitting method and device thereof |
US20130036136A1 (en) * | 2011-08-01 | 2013-02-07 | International Business Machines Corporation | Transaction processing system, method and program |
CN102546752A (en) * | 2011-12-06 | 2012-07-04 | 华中科技大学 | Distributed transaction processing method and system based on time limit |
CN102831156A (en) * | 2012-06-29 | 2012-12-19 | 浙江大学 | Distributed transaction processing method on cloud computing platform |
CN103902560A (en) * | 2012-12-25 | 2014-07-02 | 中国移动通信集团福建有限公司 | Distributed transaction processing method and system |
Cited By (55)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106372030A (en) * | 2016-10-27 | 2017-02-01 | 郑州云海信息技术有限公司 | Method and device for data synchronization of dual controller storage system |
CN109923534B (en) * | 2016-11-04 | 2023-09-01 | 硕动力公司 | Multi-version concurrency control for database records with uncommitted transactions |
CN109923534A (en) * | 2016-11-04 | 2019-06-21 | 易享信息技术有限公司 | To the Multi version concurrency control with the data-base recording for not submitting affairs |
CN106503257A (en) * | 2016-11-15 | 2017-03-15 | 北京京东金融科技控股有限公司 | Distributed transaction server method and system based on binlog compensation mechanism |
CN106503257B (en) * | 2016-11-15 | 2019-09-20 | 北京京东金融科技控股有限公司 | Distributed transaction server method and system based on binlog compensation mechanism |
CN106919640A (en) * | 2016-11-16 | 2017-07-04 | 阿里巴巴集团控股有限公司 | A kind of method and device for business processing |
CN108319496B (en) * | 2017-01-18 | 2022-03-04 | 阿里巴巴集团控股有限公司 | Resource access method, service server, distributed system and storage medium |
CN108319496A (en) * | 2017-01-18 | 2018-07-24 | 阿里巴巴集团控股有限公司 | resource access method, service server, distributed system and storage medium |
CN107357885B (en) * | 2017-06-30 | 2020-11-20 | 北京奇虎科技有限公司 | Data writing method and device, electronic equipment and computer storage medium |
CN107357885A (en) * | 2017-06-30 | 2017-11-17 | 北京奇虎科技有限公司 | Method for writing data and device, electronic equipment, computer-readable storage medium |
WO2019047752A1 (en) * | 2017-09-08 | 2019-03-14 | 阿里巴巴集团控股有限公司 | Non-relational database transaction processing method, apparatus and electronic device |
US11620277B2 (en) | 2017-09-08 | 2023-04-04 | Alibaba Group Holding Limited | Transaction processing at non-relational databases |
CN111433764A (en) * | 2017-12-06 | 2020-07-17 | 华为技术有限公司 | High-throughput distributed transaction management of global consistency sliced O L TP system and implementation method thereof |
CN111433764B (en) * | 2017-12-06 | 2023-10-13 | 华为技术有限公司 | High throughput distributed transaction management of globally consistent tiled OLTP system and implementation method thereof |
CN110019530A (en) * | 2017-12-29 | 2019-07-16 | 百度在线网络技术(北京)有限公司 | Transaction methods and device based on distributed data base |
CN108089926A (en) * | 2018-01-08 | 2018-05-29 | 马上消费金融股份有限公司 | A kind of method, apparatus, equipment and readable storage medium storing program for executing for obtaining distributed lock |
CN108959403A (en) * | 2018-06-06 | 2018-12-07 | 阿里巴巴集团控股有限公司 | A kind of distributed transaction processing method and device |
CN109165084A (en) * | 2018-08-20 | 2019-01-08 | 四川长虹电器股份有限公司 | Distributed transaction management method based on state stream |
CN109800062A (en) * | 2018-12-25 | 2019-05-24 | 星环信息科技(上海)有限公司 | A kind of Distributed database transaction processing system |
CN109901914A (en) * | 2018-12-28 | 2019-06-18 | 阿里巴巴集团控股有限公司 | Transaction methods, device and equipment |
CN109710629B (en) * | 2019-01-08 | 2020-12-18 | 上海达梦数据库有限公司 | Data access method, device, server and storage medium |
CN109710629A (en) * | 2019-01-08 | 2019-05-03 | 上海达梦数据库有限公司 | Data access method, device, server and storage medium |
CN111444199B (en) * | 2019-01-17 | 2023-11-14 | 阿里巴巴集团控股有限公司 | Data processing method and device, storage medium and processor |
CN111444199A (en) * | 2019-01-17 | 2020-07-24 | 阿里巴巴集团控股有限公司 | Data processing method and device, storage medium and processor |
CN110018884B (en) * | 2019-03-19 | 2023-06-06 | 创新先进技术有限公司 | Distributed transaction processing method, coordination device, database and electronic equipment |
CN109933606B (en) * | 2019-03-19 | 2021-04-27 | 上海达梦数据库有限公司 | Database modification method, device, equipment and storage medium |
CN109933606A (en) * | 2019-03-19 | 2019-06-25 | 上海达梦数据库有限公司 | A kind of database update method, apparatus, equipment and storage medium |
CN110018884A (en) * | 2019-03-19 | 2019-07-16 | 阿里巴巴集团控股有限公司 | Distributed transaction processing method, conditioning unit, database and electronic equipment |
CN110532068A (en) * | 2019-07-18 | 2019-12-03 | 政采云有限公司 | A kind of management method of distributed transaction |
CN110765178B (en) * | 2019-10-18 | 2021-03-05 | 京东数字科技控股有限公司 | Distributed transaction processing method and device and computer storage medium |
CN110765178A (en) * | 2019-10-18 | 2020-02-07 | 京东数字科技控股有限公司 | Distributed transaction processing method and device and computer storage medium |
CN110888718A (en) * | 2019-11-27 | 2020-03-17 | 武汉虹旭信息技术有限责任公司 | Method and device for realizing distributed transaction |
CN111324603A (en) * | 2019-12-27 | 2020-06-23 | 湖南星汉数智科技有限公司 | Grouping-based database processing method and device, computer device and computer readable storage medium |
CN111324603B (en) * | 2019-12-27 | 2023-04-14 | 湖南星汉数智科技有限公司 | Packet-based database processing method and device, computer device and computer readable storage medium |
CN113127211A (en) * | 2019-12-31 | 2021-07-16 | 美光科技公司 | Lock management associated with key-value database systems |
CN111259083A (en) * | 2020-02-13 | 2020-06-09 | 神州数码融信软件有限公司 | Distributed transaction processing method and device |
WO2021169243A1 (en) * | 2020-02-29 | 2021-09-02 | 华为技术有限公司 | Method, apparatus and system for processing distributed transaction |
CN111522631B (en) * | 2020-03-23 | 2024-02-06 | 支付宝(杭州)信息技术有限公司 | Distributed transaction processing method, device, server and medium |
CN111522631A (en) * | 2020-03-23 | 2020-08-11 | 支付宝(杭州)信息技术有限公司 | Distributed transaction processing method, device, server and medium |
CN113495872A (en) * | 2020-04-08 | 2021-10-12 | 北京万里开源软件有限公司 | Transaction processing method and system in distributed database |
CN111753013A (en) * | 2020-06-24 | 2020-10-09 | 中国银行股份有限公司 | Distributed transaction processing method and device |
CN111753013B (en) * | 2020-06-24 | 2024-04-16 | 中国银行股份有限公司 | Distributed transaction processing method and device |
CN111984665B (en) * | 2020-09-10 | 2023-07-25 | 度小满科技(北京)有限公司 | Distributed transaction processing method, device and system |
CN111984665A (en) * | 2020-09-10 | 2020-11-24 | 上海优扬新媒信息技术有限公司 | Distributed transaction processing method, device and system |
CN112199391A (en) * | 2020-09-30 | 2021-01-08 | 深圳前海微众银行股份有限公司 | Data locking detection method and device and computer readable storage medium |
CN112199391B (en) * | 2020-09-30 | 2024-02-23 | 深圳前海微众银行股份有限公司 | Data locking detection method, equipment and computer readable storage medium |
CN113391885A (en) * | 2021-06-18 | 2021-09-14 | 电子科技大学 | Distributed transaction processing system |
CN113485998A (en) * | 2021-07-27 | 2021-10-08 | 中国银行股份有限公司 | Redis transaction processing method and device, electronic device and storage medium |
CN114238353A (en) * | 2021-12-21 | 2022-03-25 | 山东浪潮科学研究院有限公司 | Method and system for realizing distributed transaction |
CN114925084B (en) * | 2022-05-31 | 2023-07-21 | 易保网络技术(上海)有限公司 | Distributed transaction processing method, system, equipment and readable storage medium |
CN114925084A (en) * | 2022-05-31 | 2022-08-19 | 易保网络技术(上海)有限公司 | Distributed transaction processing method, system, device and readable storage medium |
CN116225724B (en) * | 2023-05-09 | 2023-08-22 | 云筑信息科技(成都)有限公司 | Method for realizing distributed retry scheduling based on memory |
CN116225724A (en) * | 2023-05-09 | 2023-06-06 | 云筑信息科技(成都)有限公司 | Method for realizing distributed retry scheduling based on memory |
CN117453750A (en) * | 2023-12-21 | 2024-01-26 | 平凯星辰(北京)科技有限公司 | Data processing method, device, electronic equipment and storage medium |
CN117453750B (en) * | 2023-12-21 | 2024-03-15 | 平凯星辰(北京)科技有限公司 | Data processing method, device, electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN106033437B (en) | 2020-01-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106033437A (en) | Method and system for processing distributed transaction | |
US8538985B2 (en) | Efficient processing of queries in federated database systems | |
KR101959153B1 (en) | System for efficient processing of transaction requests related to an account in a database | |
US20130110873A1 (en) | Method and system for data storage and management | |
US20130191523A1 (en) | Real-time analytics for large data sets | |
US11048669B2 (en) | Replicated state management using journal-based registers | |
US10331657B1 (en) | Contention analysis for journal-based databases | |
CN105988862A (en) | Distributed transaction processing method and device | |
US20110225121A1 (en) | System for maintaining a distributed database using constraints | |
CN111881223B (en) | Data management method, device, system and storage medium | |
CN104794123A (en) | Method and device for establishing NoSQL database index for semi-structured data | |
US10108658B1 (en) | Deferred assignments in journal-based storage systems | |
US10198346B1 (en) | Test framework for applications using journal-based databases | |
CN105335403A (en) | Database access method and device, and database system | |
CN106569896B (en) | A kind of data distribution and method for parallel processing and system | |
US11553023B2 (en) | Abstraction layer for streaming data sources | |
US10133767B1 (en) | Materialization strategies in journal-based databases | |
JP6975153B2 (en) | Data storage service processing method and equipment | |
US10599614B1 (en) | Intersection-based dynamic blocking | |
US20110225120A1 (en) | System for maintaining a distributed database using leases | |
Podgorelec et al. | A brief review of database solutions used within blockchain platforms | |
GC | A critical comparison of NOSQL databases in the context of ACID and BASE | |
WO2023124242A1 (en) | Transaction execution method and apparatus, device, and storage medium | |
CN113450224B (en) | Transaction processing method, device, equipment and storage medium based on UTXO model | |
CN116974983A (en) | Data processing method, device, computer readable medium and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20211103 Address after: Room 603, room 602, No. 38, Gaopu Road, Tianhe District, Guangzhou, Guangdong Patentee after: Guangzhou Jianyue Information Technology Co.,Ltd. Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands Patentee before: ALIBABA GROUP HOLDING Ltd. |