CN102122288A - Method and system for concurrency control - Google Patents
Method and system for concurrency control Download PDFInfo
- Publication number
- CN102122288A CN102122288A CN 201010615058 CN201010615058A CN102122288A CN 102122288 A CN102122288 A CN 102122288A CN 201010615058 CN201010615058 CN 201010615058 CN 201010615058 A CN201010615058 A CN 201010615058A CN 102122288 A CN102122288 A CN 102122288A
- Authority
- CN
- China
- Prior art keywords
- storage server
- subtransaction
- response message
- starts
- request
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a method and system for concurrency control, belonging to the field of computers. The method comprises the following steps: receiving a global transaction by an initial storage server, and dividing the global transaction into a plurality of sub-transactions; if a write-operation sub-transaction exists in the sub-transactions, selecting a first number of copy storage servers by the initial storage server, and sending a locking request to each selected copy storage server; receiving the locking request by each selected copy storage server; if the locking request is permitted, sending a response message to the initial storage server; receiving the response message by the initial storage server; and sending the specific operation information of the write-operation sub-transaction to the copy storage server which sends the response message if the response messages of the second number are received. The system comprises the initial storage server and the copy storage server. According to the invention, the phenomenon of deadlock can be avoided, and the global consistency is guaranteed.
Description
Technical field
The present invention relates to computer realm, particularly a kind of method and system of concurrent control.
Background technology
Under cloud computing environment, distributed data base system adopts the storage mode of many copies to improve the performance of system, improves the stability of system.The storage mode of many copies is divided into start storage server and copy storage server with the storage server of distributed data base system, each storage server that starts comprises a plurality of copy storage servers, wherein, the content in each copy storage server is all consistent with content in the storage server that starts.
For the distributed data base system of many copies storage mode, can allow a plurality of affairs that each the copy storage server in the distributed data base system is carried out read-write operation simultaneously.When a plurality of affairs are carried out read-write operation to the data item of each the copy storage server in the distributed data base system simultaneously, be difficult to guarantee that the data item in each copy storage server still keeps consistency.
Summary of the invention
In order to guarantee the consistance of the data item in each copy storage server, the invention provides a kind of method and system of concurrent control.Described technical scheme is as follows:
A kind of method of concurrent control, described method comprises:
The storage server that starts receives global transaction, and described global transaction is divided into a plurality of subtransactions;
If there is the subtransaction of write operation in the described subtransaction, the described storage server that starts is selected first number copy storage server and is sent the request of locking to each copy storage server of described selection;
Each copy storage server of described selection receives the described request of locking, if agree the request of locking, then sends response message to the described storage server that starts;
The described storage server that starts receives response message, and second number is individual should sign message if receive, and then sends the concrete operations information of the subtransaction of described write operation to the copy storage server that sends response message.
The described storage server that starts receives global transaction, and described global transaction is divided into a plurality of subtransactions, specifically comprises:
Receive the global transaction that described application program is initiated;
According to the character of relevant information in the global dictionary and described global transaction, described global transaction is divided into a plurality of subtransactions;
Wherein, described subtransaction comprises the subtransaction of read operation and/or the subtransaction of write operation.
Each copy storage server of described selection receives the described request of locking, if agree the request of locking, then sends response message to the described storage server that starts, and specifically comprises:
Each copy storage server of described selection receives described locking request, and whether the number of concrete operations information of subtransaction of judging the write operation of self handling is above preset threshold value;
If do not surpass, then agree the request of locking, and send response message to the described storage server that starts.
If described second number that receives should be signed message, then send the concrete operations information of the subtransaction of described write operation to the copy storage server that sends response message, specifically comprise:
If in the default time, receive described second number response message, then send the concrete operations information of the subtransaction of described write operation to the copy storage server that sends response message.
If there is the subtransaction of read operation in the described subtransaction, then described described global transaction is divided into after a plurality of subtransactions, also comprise:
The described storage server that starts sends the concrete operations information of the subtransaction of described read operation to it each copy storage server that comprises.
A kind of system of concurrent control, described system comprise start storage server and copy storage server;
The described storage server that starts comprises divides module, selection module and first sending module;
Described division module is used to receive global transaction, and described global transaction is divided into a plurality of subtransactions;
Described selection module if be used for the subtransaction that there is write operation in described subtransaction, selected first number copy storage server and is sent the request of locking to each copy storage server of described selection;
Described copy storage server is used to receive the described request of locking, if agree the request of locking, then sends response message to the described storage server that starts;
Described first sending module is used to receive response message, and second number is individual should sign message if receive, and then sends the concrete operations information of the subtransaction of described write operation to the copy storage server of replying described response message.
Described division module specifically comprises:
Receiving element is used to receive the global transaction that described application program is initiated;
Division unit is used for according to the relevant information of global dictionary and the character of described global transaction described global transaction being divided into a plurality of subtransactions;
Wherein, described subtransaction comprises the subtransaction of read operation or the subtransaction of write operation.
Described copy storage server specifically comprises
Judge module is used to receive the described request of locking, and judges that whether the number of concrete operations information of the subtransaction of the write operation of self handling surpasses preset threshold value;
Second sending module if be used for not surpassing, is then agreed the request of locking, and is sent response message to the described storage server that starts.
Described sending module specifically is used to receive response message, if receive described second number response message in the default time, then sends the concrete operations information of the subtransaction of described write operation to the copy storage server of replying described response message.
The described storage server that starts also comprises:
The 3rd sending module, each the copy storage server that is used for comprising to the described storage server that starts sends the concrete operations information of the subtransaction of described read operation.
For any one subtransaction, the storage server that starts is selected first number copy storage server, the transmission request of locking is to each copy storage server of selecting, if agree the request of locking for the copy storage server, then echo reply message is given the storage server that starts, storage server receives the response message of second number copy storage server if start, and the storage server that then starts sends the concrete operations message of this subtransaction to the copy storage server.Wherein, for arbitrary subtransaction, at first obtain right that data item is locked, could send concrete operations information to the copy storage server then, data item in the replica server is operated, again because serializable scheduling is consistent, so guarantee the global coherency of the data item of many copies storage server.
Description of drawings
Fig. 1 is the method flow diagram of a kind of concurrent control of providing of the embodiment of the invention 1;
Fig. 2 is the method flow diagram of a kind of concurrent control of providing of the embodiment of the invention 2;
Fig. 3 is the system schematic of a kind of concurrent control of providing of the embodiment of the invention 3.
Embodiment
For making the purpose, technical solutions and advantages of the present invention clearer, embodiment of the present invention is described further in detail below in conjunction with accompanying drawing.
As shown in Figure 1, the embodiment of the invention provides a kind of method of concurrent control, comprising:
Step 101: the storage server that starts receives global transaction, and this global transaction is divided into a plurality of subtransactions;
Step 102: if there is the subtransaction of write operation in the subtransaction of dividing, the storage server that then starts is selected first number copy storage server and is sent the request of locking to each copy storage server of selecting;
Step 103: each copy storage server of selection receives the request of locking, if agree the request of locking, then sends response message to the storage server that starts;
Step 104: the storage server that starts receives response message, and second number is individual should sign message if receive, and then sends the concrete operations information of the subtransaction of write operation to the copy storage server that sends response message.
For any one subtransaction, the storage server that starts is selected first number copy storage server, the transmission request of locking is to each copy storage server of selecting, if agree the request of locking for the copy storage server, then echo reply message is given the storage server that starts, storage server receives the response message of second number copy storage server if start, and the storage server that then starts sends the concrete operations message of this subtransaction to the copy storage server.Wherein, for arbitrary subtransaction, at first obtain right that data item is locked, could send concrete operations information to the copy storage server then, data item in the replica server is operated, again because serializable scheduling is consistent, so guarantee the global coherency of the data item of many copies storage server.
Embodiment 2
The embodiment of the invention provides a kind of method of concurrent control.Wherein, in cloud computing environment, database adopts the storage server that starts to add the form of copy storage server, wherein, each storage server that starts comprises a plurality of copy storage servers, and the content in the storage server that starts that the content in each secondary storage server is corresponding with it is on all four.Referring to Fig. 2, this method comprises:
Step 201: the storage server that starts receives the global transaction that application program is initiated, and this global transaction is divided into a plurality of subtransactions;
Wherein, the relevant information that starts and stored every kind of global transaction in the global dictionary of storage server.Particularly, the storage server that starts receives the global transaction Ti that application program is initiated, start the task manager of storage server according to storage relevant information of global transaction and the character of this global transaction Ti in the global dictionary, this global transaction Ti is divided into a plurality of subtransaction STi, wherein, a plurality of subtransactions of division are formed the subtransaction set.
Wherein, application program is initiated global transaction to the storage server that starts, and by stored data items in this global transaction request operational data storehouse.With a plurality of subtransactions that global transaction is divided into, the subtransaction of division comprises the subtransaction of read operation and/or the subtransaction of write operation.
Step 202: the storage server that starts is at one of them subtransaction, judge that this subtransaction is the subtransaction of read operation or the subtransaction of write operation, if this subtransaction is the subtransaction of read operation, then execution in step 203, if this subtransaction is the subtransaction of write operation, then execution in step 204;
Step 203: the storage server that starts sends the concrete operations information of the subtransaction of this read operation, execution in step 208 to each the copy storage server that self comprises;
Wherein, because the subtransaction of read operation is reading of data from the copy storage server only, and do not need to copy storage server write data, therefore can the consistance of each copy storage server not impacted, storage server can directly send the concrete operations information of the subtransaction of each read operation for the subtransaction of read operation to each copy storage server so start.
Step 204: the storage server that starts is selected first number copy storage server from self comprise each copy storage server, sends the request of locking to each copy storage server of selecting;
Particularly, start storage server from all copy storage servers that self comprise, select first number copy ground storage server arbitrarily, send the request of locking to each copy storage server of selecting.
Wherein, the size of first number is
K represent the to begin sum of all copy storage servers that this storage server comprises, the maximum concurrent operations number of each copy when nr represents system's operation.Wherein, the maximum concurrent operations number that each copy storage server that this storage server that starts comprises is set in advance is nr, and the total k of the copy storage server that storage in advance self has in the global dictionary of storage server that starts and the maximum concurrent operations of each copy storage server are counted nr; Storage server can directly obtain the value that the maximum concurrent operations of the value of total k of all copy storage servers that self comprise and each copy storage server is counted nr from global dictionary so start.
Wherein, when concurrent controlling database, allow a plurality of subtransactions and obtain lock at certain data item, promptly above-mentioned nr simultaneously, for determining of nr initial value, require to formulate as prerequisite with the performance that guarantees the optimistic concurrency control method that algorithm next stage uses.Simultaneously,
This parameter can be adjusted, and promptly can be adjusted into
(m=1,2 ...).When
The time, the traffic of required control message just can obtain certain optimization.
Wherein, the false code of the specific implementation of step 201-204 is as follows:
Send_Request(SSTi,GD)
Wherein, the storage server that starts is divided into a plurality of subtransaction STi according to the character of relevant information of storing among the global dictionary GD and global transaction Ti with global transaction Ti, obtains subtransaction S set STi.
{
U=SSTi;
while(U!=NULL)
{
If (STi=Read) // at one of them affairs STi, judge whether subtransaction STi is the subtransaction of read operation;
Allow to send concrete operations information;
Else // otherwise subtransaction STi is the subtransaction of write operation;
send_lock_request
// send the request of locking to the copy storage server;
U=U-STi; // handle each remaining subtransaction again;
}
}
Step 205: for the copy storage server that receives the request of locking, whether this copy storage server decision agrees the request of locking, if agree, then sends response message to the storage server that starts;
Particularly, this copy storage server judges, counts nr if the number of the concrete operations information of the current subtransaction of self handling write operation surpasses maximum concurrent operations, then agrees locking request, and to the storage server transmission response message that starts;
Wherein,, then refuse this request and lock, promptly do not send response message to the storage server that starts if during the outnumbering maximum concurrent operations and count nr of the subtransaction of the current write operation of handling of copy storage server; Increase the value of the total nr_reject of refusal request simultaneously, when if the value of the total nr_reject of refusal request reaches preset threshold value threshold, the maximum concurrent operations of transmission renewal is counted nr and is instructed to Centroid, when Centroid received and upgrades maximum concurrent operations and count the instruction of nr, the maximum concurrent operations of each copy storage server that the storage server that starts is comprised was counted the value of nr and is upgraded.
Wherein, the copy storage server preferentially sends and upgrades the instruction that maximum concurrent operations is counted nr.There are following two kinds of possibilities in the situation that the refusal sum nr_reject value of copy storage server is increased, comprising: the firstth, and the concurrent operations number in the system rolls up, and has reached the threshold value of systemic presupposition.Suppose that the concurrent operations of system can be handled with optimistic concurrency control method this moment, to improve the efficient of system, therefore strengthens the value of nr.The secondth, because the situation of mutual wait has appearred in the affairs in the system,, allow more affairs obtain lock like this by increasing the value of nr, can remove the deadlock chain, avoided the deadlock problem.When
Leveled off to 0 o'clock, and then directly called the method for optimistic control.
In a period of time, when the concurrent number in the system is fewer, just (be not less than the preset value of system by the value that progressively reduces nr, concrete optimal value can obtain after system moves a period of time), avoid too much affairs to enter optimistic concurrent control scheduling, can reduce possible affairs and restart the performance loss that brings.
Further, if the not refusal request of locking in the default time of copy storage server, the then automatic value that reduces the total nr_reject of refusal request.
Wherein, for the renewal of threshold, a problem that needs to solve is: must avoid system often to carry out the variation of nr.Cause unnecessary system loading because too much nr changes, and caused near nr vibration back and forth standard value easily.For this reason, we have added a factor factor, and for example factor=10% when threshold surpasses nr*factor, just upgrades.Document has also been mentioned a kind of analogue in [7], and has provided the notion of " schmidt trigger device ".
Wherein, receive the request of locking for the copy storage server after, the false code whether decision sends response message is as follows:
(whether the concrete operations of nr_positive<=nr) // the judge subtransaction of the current write operation of the handling value of counting nr_positive surpasses maximum concurrent operations is counted nr to if;
{
nr_positive++;
}
else
{
Output 0; If // surpass maximum concurrent operations number, then refuse the request of locking
Nr_reject++; // * increases the total nr_reject of refusal;
(nr_reject>threshold) // * requires to increase factor factor and avoids vibration if
Send_info (update_nr); // * upgrades nr, and upgrades maximum concurrent operations to the Centroid transmission and count nr;
}
}
Step 206: the storage server that starts receives the response message of the transmission of copy storage server, if when sending the number of the copy storage server of response message in the default time and reaching second number, and execution in step 207;
Wherein, do not reach second number if receive the number of the secondary storage server of response message in the default time, the storage server that then starts resends the request of locking to first number copy storage server of selecting again, and returns step 205.
Wherein, the size of second number is
Wherein, k represent the to begin sum of all copy storage servers that this storage server comprises, the maximum concurrent operations number of each copy when nr represents system's operation.
Step 207: the storage server that starts sends the concrete operations information of the subtransaction of this write operation to each the copy storage server that sends response message;
Wherein, start that to receive the specific algorithm reply as follows for storage server:
Get_Ack(Acks?from?objects)
Input: from the response message of each copy storage server about the request of locking of the subtransaction STi of write operation;
Output: send concrete operations information or hang up affairs
{
for?each?STi?in?SSTi
{
Send_operation_info; // * is for the subtransaction STi of write operation, if start
Response message then sends the concrete operations information of the subtransaction STi of this write operation.
else
Put STi into wait_queue; // * temporarily enters waiting status, prepares to continue to send out
Send the request of locking;
}
while?some?STi?in?wait_queue
{
send_lock_request
} // * poll-interval is according to environment set
}
Step 208:, the concrete operations information of the subtransaction that receives is handled for the copy storage server of the concrete operations information that receives subtransaction.
Wherein, for other each subtransaction, repeatedly carry out the process of above-mentioned steps 202 to 208 respectively.
Wherein, the storage server that starts only needs to obtain second number response message that agreement locks for the subtransaction of any write operation, has just obtained the right that locks.Therefore, may exist a plurality of subtransactions to obtain operating right simultaneously at the copy storage server.For a plurality of possible subtransactions, allow the concrete operations information of the subtransaction (size with operand is weighed) that high (importance by the storage server that starts embodies) of priority and operation can finish rapidly carry out earlier at the copy storage server as far as possible.
At the Qualify Phase of optimistic concurrent scheduling, verify according to following heuristic function:
F=0.8 * storage server the factor+0.2 of the starting * operation lock granularity factor;
Wherein, the storage server factor that starts
Promptly the mark that obtains according to algorithm 1 Init_DDB calculates.Here Xi has been carried out standardization.To carry out aims of standardization and be in order guaranteeing to be unlikely to because the magnitude difference of different factors, and to cause being embodied in proportion imbalance among the f.As for the influence of the operation blockade object granularity factor, we think, for the less operation of lock granularity, should give and pay the utmost attention to.Therefore can suppose as follows: if the operation lock granularity for the table level, then gives 0.6, lock granularity is a tuple set, then gives 0.4.Relevant parameters can be adjusted under the actual motion environment.Like this, the smaller affairs of f value can preferentially be scheduled.
Qualify Phase in the optimistic concurrent control procedure is as follows: suppose the affairs Tik on two k storage servers, and Tjk, and f (Tik)<f (Tjk), then Tjk can enter the section of writing, and and if only if
1) SWO (Tjk) ∩ SWO (Tik)=NULL and SRO (Tjk) ∩ SWO (Tik)=NULL and SRO (Tik) ∩ SWO (Tjk)=NULL
2) Tik finishes the operation of (submit to or the abandon) section of writing;
One of both of these case is set up.Otherwise subtransaction Tjk is restarted in the part.
Specific algorithm when the copy storage server receives the concrete operations information of a plurality of subtransactions is as follows:
Algorithm 5:Schedule_Op (operation info)
Input: from the concrete operations information OP of different subtransactions
Output: a local scheduling
{
if(nr_positive=nr)
{
Send_restart_info; // * has surpassed nr affairs and has entered optimistic scheduling, needs application again
Lock;
return;
}
nr_positive++;
if(OP=Read)
Insert OP into Run_Queue; // * waits for that first is scheduled
else
compute_f(OP.Granularity,Xi)
Schedule (); Each affairs of // * concurrent scheduling
Validate();
// * checking, then restart the part if desired
}
By above-mentioned algorithmic procedure, be not difficult to find out that for read operation, system will preferentially be carried out (as long as current do not have write operation in operation, otherwise needing first write operation of wait to finish); For write operation, according to the heuristic function scheduled for executing.Because all the execution on the copy storage server then can guarantee the serializability of the overall situation all according to such order.
Wherein, in the present embodiment, the concurrent operations of copy storage server is counted the nr value and can be changed with the change of the concurrent operations number of system, therefore just can obtain lock again for a plurality of subtransactions of waiting for mutually in the system, thereby make that the situation of circular wait is destroyed.Therefore the deadlock situation does not exist, and there is not the deadlock problem in the concurrent control algolithm of promptly hybrid many copies.
Wherein, in the present embodiment, for any one subtransaction, at first still therefore the right that requires acquisition that data item is locked is based upon on the locking mechanisms.As long as control the opportunity that locks and discharge lock, just can assist so that the distributed transaction in the system is followed distributed two-phase lock.Again because serializable scheduling is consistent, so guarantee the global coherency of the data item of many copies storage server.Even because the excessive factor of nr makes scheduling directly be based upon on the basis of optimistic concurrent control scheduling, but, still can guarantee serializability because all copy storage servers have used heuristic function.
In embodiments of the present invention, for any one subtransaction, the storage server that starts is selected first number copy storage server, the transmission request of locking is to each copy storage server of selecting, if agree the request of locking for the copy storage server, then echo reply message is given the storage server that starts, storage server receives the response message of second number copy storage server if start, and the storage server that then starts sends the concrete operations message of this subtransaction to the copy storage server.Wherein, for arbitrary subtransaction, at first obtain right that data item is locked, could send concrete operations information to the copy storage server then, data item in the replica server is operated, again because serializable scheduling is consistent, so guarantee the global coherency of the data item of many copies storage server.
Embodiment 3
As shown in Figure 3, the system of a kind of concurrent control of the embodiment of the invention, storage server 301 and copy storage server 302 start;
The storage server 301 that starts comprises divides module 3011, selection module 3012 and first sending module 3013;
Divide module 3011, be used to receive global transaction, and the global transaction that receives is divided into a plurality of subtransactions;
Select module 3012,, select first number copy storage server and send the request of locking to each copy storage server of selecting if there is the subtransaction of write operation in the subtransaction that is used for dividing;
Copy storage server 302 is used for receiving the request of locking, if agree the request of locking, then sends response message to the storage server 301 that starts;
First sending module is used to receive response message, and second number is individual should sign message if receive, and then sends the concrete operations information of the subtransaction of this write operation to the copy storage server of replying described response message.
Wherein, dividing module 3011 specifically comprises:
Receiving element is used to receive the global transaction that application program is initiated;
Division unit is used for the character according to the global transaction of the relevant information of global dictionary and reception, and the global transaction that receives is divided into a plurality of subtransactions;
Wherein, the subtransaction of division comprises the subtransaction of read operation or the subtransaction of write operation.
Copy storage server 302 specifically comprises
Judge module 3021 is used for receiving locking request, and whether the number of concrete operations information of subtransaction of judging the write operation of self handling is above preset threshold value;
Second sending module 3022 if be used for not surpassing, is then agreed the request of locking, and is sent response message to the described storage server that starts.
First sending module 3013 specifically is used to receive response message, if receive described second number response message in the default time, then sends the concrete operations information of the subtransaction of this write operation to the copy storage server that sends response message.
Further, the storage server 301 that starts also comprises:
The 3rd sending module, each the copy storage server 302 that is used for comprising to the storage server 301 that starts sends the concrete operations information of the subtransaction of read operation.
In embodiments of the present invention, for any one subtransaction, the storage server that starts is selected first number copy storage server, the transmission request of locking is to each copy storage server of selecting, if agree the request of locking for the copy storage server, then echo reply message is given the storage server that starts, storage server receives the response message of second number copy storage server if start, and the storage server that then starts sends the concrete operations message of this subtransaction to the copy storage server.Wherein,, at first obtain right that data item is locked, again because serializable scheduling is consistent, so guarantee the global coherency of the data item of many copies storage server for arbitrary subtransaction.
All or part of content in the technical scheme that above embodiment provides can realize that its software program is stored in the storage medium that can read by software programming, storage medium for example: the hard disk in the computing machine, CD or floppy disk.
The above only is preferred embodiment of the present invention, and is in order to restriction the present invention, within the spirit and principles in the present invention not all, any modification of being done, is equal to replacement, improvement etc., all should be included within protection scope of the present invention.
Claims (10)
1. the method for a concurrent control is characterized in that, described method comprises:
The storage server that starts receives global transaction, and described global transaction is divided into a plurality of subtransactions;
If there is the subtransaction of write operation in the described subtransaction, the described storage server that starts is selected first number copy storage server and is sent the request of locking to each copy storage server of described selection;
Each copy storage server of described selection receives the described request of locking, if agree the request of locking, then sends response message to the described storage server that starts;
The described storage server that starts receives response message, and second number is individual should sign message if receive, and then sends the concrete operations information of the subtransaction of described write operation to the copy storage server that sends response message.
2. the method for claim 1 is characterized in that, the described storage server that starts receives global transaction, and described global transaction is divided into a plurality of subtransactions, specifically comprises:
Receive the global transaction that described application program is initiated;
According to the character of relevant information in the global dictionary and described global transaction, described global transaction is divided into a plurality of subtransactions;
Wherein, described subtransaction comprises the subtransaction of read operation and/or the subtransaction of write operation.
3. the method for claim 1 is characterized in that, each copy storage server of described selection receives the described request of locking, if agree the request of locking, then sends response message to the described storage server that starts, and specifically comprises:
Each copy storage server of described selection receives described locking request, and whether the number of concrete operations information of subtransaction of judging the write operation of self handling is above preset threshold value;
If do not surpass, then agree the request of locking, and send response message to the described storage server that starts.
4. the method for claim 1 is characterized in that, if described second number that receives should be signed message, then sends the concrete operations information of the subtransaction of described write operation to the copy storage server that sends response message, specifically comprises:
If in the default time, receive described second number response message, then send the concrete operations information of the subtransaction of described write operation to the copy storage server that sends response message.
5. as the described method of each claim of claim 1-4, it is characterized in that,, then described described global transaction be divided into after a plurality of subtransactions, also comprise if there is the subtransaction of read operation in the described subtransaction:
The described storage server that starts sends the concrete operations information of the subtransaction of described read operation to it each copy storage server that comprises.
6. the system of a concurrent control is characterized in that, described system comprises start storage server and copy storage server;
The described storage server that starts comprises divides module, selection module and first sending module;
Described division module is used to receive global transaction, and described global transaction is divided into a plurality of subtransactions;
Described selection module if be used for the subtransaction that there is write operation in described subtransaction, selected first number copy storage server and is sent the request of locking to each copy storage server of described selection;
Described copy storage server is used to receive the described request of locking, if agree the request of locking, then sends response message to the described storage server that starts;
Described first sending module is used to receive response message, and second number is individual should sign message if receive, and then sends the concrete operations information of the subtransaction of described write operation to the copy storage server of replying described response message.
7. system as claimed in claim 6 is characterized in that, described division module specifically comprises:
Receiving element is used to receive the global transaction that described application program is initiated;
Division unit is used for according to the relevant information of global dictionary and the character of described global transaction described global transaction being divided into a plurality of subtransactions;
Wherein, described subtransaction comprises the subtransaction of read operation or the subtransaction of write operation.
8. system as claimed in claim 6 is characterized in that, described copy storage server specifically comprises
Judge module is used to receive the described request of locking, and judges that whether the number of concrete operations information of the subtransaction of the write operation of self handling surpasses preset threshold value;
Second sending module if be used for not surpassing, is then agreed the request of locking, and is sent response message to the described storage server that starts.
9. system as claimed in claim 6 is characterized in that,
Described sending module specifically is used to receive response message, if receive described second number response message in the default time, then sends the concrete operations information of the subtransaction of described write operation to the copy storage server of replying described response message.
10. as the described system of each claim of claim 6-9, it is characterized in that the described storage server that starts also comprises:
The 3rd sending module, each the copy storage server that is used for comprising to the described storage server that starts sends the concrete operations information of the subtransaction of described read operation.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 201010615058 CN102122288A (en) | 2010-12-21 | 2010-12-21 | Method and system for concurrency control |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 201010615058 CN102122288A (en) | 2010-12-21 | 2010-12-21 | Method and system for concurrency control |
Publications (1)
Publication Number | Publication Date |
---|---|
CN102122288A true CN102122288A (en) | 2011-07-13 |
Family
ID=44250849
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN 201010615058 Pending CN102122288A (en) | 2010-12-21 | 2010-12-21 | Method and system for concurrency control |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102122288A (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102831156A (en) * | 2012-06-29 | 2012-12-19 | 浙江大学 | Distributed transaction processing method on cloud computing platform |
CN102883219A (en) * | 2012-09-17 | 2013-01-16 | 苏州汉辰数字科技有限公司 | Method for playing audios and videos by using uniform interface |
CN103677771A (en) * | 2012-09-06 | 2014-03-26 | 阿里巴巴集团控股有限公司 | Processing method and device for concurrent transactions |
CN105955804A (en) * | 2016-04-22 | 2016-09-21 | 星环信息科技(上海)有限公司 | Method and device for processing distributed transaction |
CN106445644A (en) * | 2016-08-30 | 2017-02-22 | 中国民生银行股份有限公司 | Distributed transaction processing method and device based on improved one-phase commit |
CN107967181A (en) * | 2017-12-19 | 2018-04-27 | 北京小米移动软件有限公司 | The control method and device of critical zone |
CN108829524A (en) * | 2018-06-20 | 2018-11-16 | 中国联合网络通信集团有限公司 | The method and apparatus of deadlock are detected in BPEL process Graphic Design |
WO2019192103A1 (en) * | 2018-04-03 | 2019-10-10 | 平安科技(深圳)有限公司 | Concurrent access control method and apparatus, terminal device, and medium |
CN110399383A (en) * | 2019-07-29 | 2019-11-01 | 中国工商银行股份有限公司 | Applied to the data processing method of server, device, calculate equipment, medium |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101706802A (en) * | 2009-11-24 | 2010-05-12 | 成都市华为赛门铁克科技有限公司 | Method, device and sever for writing, modifying and restoring data |
-
2010
- 2010-12-21 CN CN 201010615058 patent/CN102122288A/en active Pending
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101706802A (en) * | 2009-11-24 | 2010-05-12 | 成都市华为赛门铁克科技有限公司 | Method, device and sever for writing, modifying and restoring data |
Non-Patent Citations (1)
Title |
---|
《计算机工程与科学》 20080531 陈传波等 《一种改进的分布式并行事务处理策略研究》 第30卷, 第5期 * |
Cited By (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102831156A (en) * | 2012-06-29 | 2012-12-19 | 浙江大学 | Distributed transaction processing method on cloud computing platform |
CN103677771A (en) * | 2012-09-06 | 2014-03-26 | 阿里巴巴集团控股有限公司 | Processing method and device for concurrent transactions |
CN103677771B (en) * | 2012-09-06 | 2017-01-18 | 阿里巴巴集团控股有限公司 | Processing method and device for concurrent transactions |
CN102883219A (en) * | 2012-09-17 | 2013-01-16 | 苏州汉辰数字科技有限公司 | Method for playing audios and videos by using uniform interface |
CN102883219B (en) * | 2012-09-17 | 2015-11-25 | 太仓市天合新材料科技有限公司 | A kind of method using unified interface playing audio-video |
CN105955804B (en) * | 2016-04-22 | 2018-06-05 | 星环信息科技(上海)有限公司 | A kind of method and apparatus for handling distributed transaction |
CN105955804A (en) * | 2016-04-22 | 2016-09-21 | 星环信息科技(上海)有限公司 | Method and device for processing distributed transaction |
CN106445644A (en) * | 2016-08-30 | 2017-02-22 | 中国民生银行股份有限公司 | Distributed transaction processing method and device based on improved one-phase commit |
CN106445644B (en) * | 2016-08-30 | 2019-11-05 | 中国民生银行股份有限公司 | Treating method and apparatus based on the distributed transaction that an improved stage submits |
CN107967181A (en) * | 2017-12-19 | 2018-04-27 | 北京小米移动软件有限公司 | The control method and device of critical zone |
WO2019192103A1 (en) * | 2018-04-03 | 2019-10-10 | 平安科技(深圳)有限公司 | Concurrent access control method and apparatus, terminal device, and medium |
CN108829524A (en) * | 2018-06-20 | 2018-11-16 | 中国联合网络通信集团有限公司 | The method and apparatus of deadlock are detected in BPEL process Graphic Design |
CN110399383A (en) * | 2019-07-29 | 2019-11-01 | 中国工商银行股份有限公司 | Applied to the data processing method of server, device, calculate equipment, medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102122288A (en) | Method and system for concurrency control | |
US7716249B2 (en) | Transaction and task scheduler | |
Thomasian | Concurrency control: methods, performance, and analysis | |
US9053003B2 (en) | Memory compaction mechanism for main memory databases | |
EP1675056A1 (en) | Synchronization of runtime and application state via batching of workflow transactions | |
EP2225633B1 (en) | Data parallel production and consumption | |
US20180322158A1 (en) | Changing concurrency control modes | |
Turcu et al. | Be general and don’t give up consistency in geo-replicated transactional systems | |
US11243820B1 (en) | Distributed deadlock detection and resolution in distributed databases | |
US11899648B2 (en) | Concurrency control for transactions in database systems | |
US11468032B2 (en) | Concurrent transaction processing in a database system | |
US8051433B1 (en) | Partially ordered queue for efficient processing of assets | |
US20240232173A1 (en) | Distributed execution of transactional queries | |
WO2019199464A1 (en) | Resumable merge sort | |
CN101145165A (en) | Work stream data persistence processing method, device and work flow system | |
WO2024041191A1 (en) | Data processing method and apparatus | |
US11789922B1 (en) | Admitting for performance ordered operations of atomic transactions across a distributed database | |
CN110222016B (en) | File processing method and device | |
WO2020140623A1 (en) | Electronic device, metadata processing method and computer readable storage medium | |
US7502792B2 (en) | Managing database snapshot storage | |
CN113191704A (en) | Goods delivery control method and device and computer readable storage medium | |
US12093248B1 (en) | Online index creation for multi-version database without table locks | |
US20240176775A1 (en) | Datastore workload isolation | |
US12007990B1 (en) | Deferred constraints support in distributed database systems | |
US11709808B1 (en) | Schema evolution for the serialization of non-primary key columnar data into row-organized byte sequences |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C12 | Rejection of a patent application after its publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20110713 |