CN103514164A - Data migration method and system - Google Patents

Data migration method and system Download PDF

Info

Publication number
CN103514164A
CN103514164A CN201210201198.0A CN201210201198A CN103514164A CN 103514164 A CN103514164 A CN 103514164A CN 201210201198 A CN201210201198 A CN 201210201198A CN 103514164 A CN103514164 A CN 103514164A
Authority
CN
China
Prior art keywords
data migration
internal memory
identifier
lock
database
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
Application number
CN201210201198.0A
Other languages
Chinese (zh)
Other versions
CN103514164B (en
Inventor
李铮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Advanced New Technologies Co Ltd
Original Assignee
Alibaba Group Holding Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201210201198.0A priority Critical patent/CN103514164B/en
Publication of CN103514164A publication Critical patent/CN103514164A/en
Application granted granted Critical
Publication of CN103514164B publication Critical patent/CN103514164B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/0647Migration mechanisms

Abstract

The invention provides a data migration method which includes the following steps: intercepting a data migration request received by an application server, obtaining identification numbers, contained in the data migration request, of two data migration parties, judging whether internal storage locks of the identification numbers of the two data migration parties are contained in an internal storage of the application server or not, if the internal storage locks of the identification numbers of the data migration parties are contained in the internal storage of the application server, respectively applying the internal storage locks for the two identification numbers, if the internal storage locks of the identification numbers of the two data migration parties are not contained in the internal storage of the application server, establishing the internal storage locks of the two identification numbers, using the applied internal storage locks to lock the corresponding identification numbers, enabling the data migration request to be transmitted to a database, waiting for the data migration request to be processed by the database, obtaining the command that processing on the data migration request by the database is completed, relieving locking of the internal storage locks on the identification numbers of the data migration parties, and relieving the internal storage locks. The invention further provides a data migration system for achieving the data migration method. According to the data migration method and system, a large number of concurrent connecting requests can be processed, and the stability of the system and the database can be improved.

Description

Data migration method and system
Technical field
The application relates to microcomputer data processing field, particularly relates to a kind of data migration method and system.
Background technology
Along with the development of network technology, the data of storing in network are conventionally because network operation need to carry out Data Migration.For example, from a database, move to another database.In some cases, while carrying out Data Migration, migration both sides' record needs corresponding modification, for example, certain data is from database is moved out, and this database need to be deleted these data, or revises this data, and receive the database of these data, need to increase these data or revise former data corresponding to these data.For fear of occurring mistake, when the data in certain record are being used, need to lock this record, to only have after this is used to complete, the data of this record just can be used again.
In some network operation, waiting for the operation that wherein data are moved in a large number may appear in a certain record at short notice, and at present, the common Data Migration management of industry is mainly to lock to realize by wide area information server.Before each Data Migration carries out, first need to obtain database and connect, then by the data in locking statement pinning Data Migration both sides' record.When if wall scroll is recorded in and needs to carry out the Data Migration of a large amount of number of times in the short time, this record is locked because be used, this Data Migration request of recording follow-up wait can take a large amount of database connections so, only have to complete one by one in order this and record after all Data Migration requests, could discharge occupied database and connect.Because single record data migration number of times is excessive, may occur waiting for that the queue of Data Migration is more and more longer, the linking number of the database taking also can constantly increase, if whole process duration is longer, may occur that operable database linking number is fewer and feweri, cause database pressure excessive and occur unstablely, finally occur the situations such as system crash.
Summary of the invention
The application provides a kind of data migration method and system, can solve to take database and connect the problem too much cause the unstable and system crash of database.
In order to address the above problem, the application discloses a kind of data migration method, comprises the following steps:
Tackle the Data Migration request that application server receives, and obtain the Data Migration both sides' that comprise in described Data Migration request identifier;
Judge the internal memory lock that whether comprises described Data Migration both sides identifier in application server internal memory, if having, be respectively described two identifier applications internal memory lock separately, otherwise the internal memory that creates described two identifiers is locked;
The corresponding identifier of internal memory lock locking that utilizes application to arrive, sends to database by described Data Migration request, waits for this Data Migration request of database processing;
Obtain the instruction that database is finished dealing with to this Data Migration request, remove the locking of internal memory lock to described Data Migration both sides identifier, releasing memory lock.
Further, described in, being respectively described two identifier applications internal memory lock separately comprises:
Obtain the current use state of the internal memory lock that described identifier is corresponding, if be used, wait for, if be not used, this internal memory lock is obtained in application.
Further, described in, being respectively described two identifier applications internal memory lock separately also comprises:
Add up the stand-by period of internal memory lock corresponding to described identifier application, if surpass stand-by period threshold value, refuse this Data Migration request.
Further, this Data Migration request of described database processing comprises:
Obtain the Database lock of Data Migration both sides identifier in this Data Migration request;
Adopt Database lock to lock described Data Migration both sides identifier;
According to migration numerical value, the data in both sides' identifier are changed and preserved;
Remove the locking of Database lock to Data Migration both sides identifier.
Further, described identifier adopts the form of mapping table to be stored in application server internal memory with corresponding internal memory lock.
Further, after being respectively described two identifier applications internal memory lock separately described in, also comprise:
Whether internal memory lock the Data Migration request quantity in waiting status that the described identifier of judgement application is corresponding surpass application threshold value, otherwise if so, refuse this Data Migration request, continue to wait for until obtain internal memory lock.
In order to address the above problem, disclosed herein as well is a kind of data mover system, comprising:
Blocking module, the Data Migration request receiving for tackling application server, and obtain the Data Migration both sides' that comprise in described Data Migration request identifier;
Internal memory lock acquisition module, for judging whether application server internal memory comprises the internal memory lock of described Data Migration both sides identifier, if having, be respectively described two identifier applications internal memory lock separately, otherwise the internal memory that creates described two identifiers is locked;
Locking module, the corresponding identifier of internal memory lock locking for utilizing application to arrive, sends to database by described Data Migration request, waits for this Data Migration request of database processing;
Release module, the instruction of this Data Migration request being finished dealing with for obtaining database, removes the locking of internal memory lock to described Data Migration both sides identifier, releasing memory lock.
Further, described internal memory lock acquisition module comprises:
Internal memory lock use state acquiring unit, for obtaining the current use state of the internal memory lock that described identifier is corresponding, if be used, waits for, if be not used, this internal memory lock is obtained in application.
Further, described internal memory lock acquisition module also comprises:
Stand-by period statistic unit, for adding up the stand-by period of internal memory lock corresponding to described identifier application, if surpass stand-by period threshold value, refuses this Data Migration request.
Further, described system also comprises:
Mapping table is set up module, for set up mapping table at application server internal memory, stores identifier and corresponding internal memory lock.
Further, described system also comprises:
Data Migration request quantity statistical module, for judging that whether internal memory lock the Data Migration request quantity in waiting status that the described identifier of application is corresponding surpass application threshold value, if so, refuse this Data Migration request.
Compared with prior art, the application comprises following advantage:
The application's data migration method and system, process by the internal memory of the setting up concurrent Data Migration request to same identifier of locking.Because the internal memory of this same identifier lock at every turn can only be for a data migration request, remaining concurrent data migration request needs to wait for that last data migration request uses just can obtain afterwards so.Also, each Data Migration request need to be arranged wait in internal memory, obtains one by one after internal memory lock, can set up and being connected of database by application server.Therefore, even if there are a large amount of concurrent Data Migration requests, also all need in application server internal memory, wait for, be let pass one by one, thereby reduced the occupancy that database is connected, improve the stability of database.In addition, even when occurring that a large amount of concurrent Data Migration requests cause application server internal memory unaffordable, also can solve by increasing the mode of the quantity of application server, can't impact database, thereby greatly improved the stability of system, avoided system crash.
Secondly, the mode that increases application server or application server internal memory except adopting improves the processing power of concurrent data migration request, and the mode that the application also adopts the internal memory lock in direct application server to be configured improves system processing power.The quantity of each internal memory lock concurrent data migration request that allows is set, if surpass setting value, the directly follow-up Data Migration request of refusal, until the Data Migration request of waiting for could be accepted new Data Migration request application internal memory lock after being less than setting value again.By this kind of mode, without increasing application server quantity, or the capacity of application server internal memory, unnecessary cost can be reduced, can guarantee that the connection of database is not taken by a large amount of concurrent data migration request, improve the stability of database and system simultaneously.
In addition, for the incidence relation of internal memory lock and identifier, adopt the form of mapping table to be stored in application server, no matter be the internal memory lock that obtains single identifier, or to operations such as internal memory lock or identifier is modified, deletions, can not affect whole mapping table.In each Data Migration request, increase an internal memory lock, the duration of the extra process time that it increases can shorten to Microsecond grade, and this time is negligible for whole Data Migration treatment scheme.Simultaneously, when single identifier concurrent data migration request quantity is more, because reduced taking that database is connected, can improve the response speed of database, thereby can greatly shorten the time of whole Data Migration treatment scheme, improve the response speed of system.
Certainly, arbitrary product of enforcement the application not necessarily needs to reach above-described all advantages simultaneously.
Accompanying drawing explanation
Fig. 1 is the system architecture diagram that the application's Data Migration is realized;
Fig. 2 is the process flow diagram of the application's data migration method embodiment mono-;
Fig. 3 is the process flow diagram of the application's data migration method embodiment bis-;
Fig. 4 is the application's data migration method effect comparison diagram;
Fig. 5 is the structural representation of the application's data mover system embodiment mono-;
Fig. 6 is the structural representation of the application's data mover system embodiment bis-.
Embodiment
For the application's above-mentioned purpose, feature and advantage can be become apparent more, below in conjunction with the drawings and specific embodiments, the application is described in further detail.
The application's data migration method and system are processed for the Data Migration request that user is submitted to application server by client, the mode that a large amount of concurrent Data Migration requests are locked by internal memory is tackled in application server, avoid taking too much database and connect, thus response speed and the stability of raising system.The application's data mover system can be arranged on application server inside, also can be used as standalone module, adopts with the mode of application server data interaction and realizes Data Migration.
With reference to Fig. 1, the system architecture diagram of the Data Migration of realizing the application is shown.Data mover system is arranged between application server and database as standalone module, and concurrent Data Migration request is processed.Below the application's data migration method and system are described in detail.
With reference to Fig. 2, a kind of data migration method embodiment mono-of the application is shown, comprise the following steps:
Step 101, tackles the Data Migration request that application server receives, and obtains the Data Migration both sides' that comprise in described Data Migration request identifier.
When user submits to by client after Data Migration request, background application server can receive this Data Migration request, and by the mode accessing database being connected with Database, realizes Data Migration in database.Identifier, the data such as migration numerical value etc. that wherein, in Data Migration request, can comprise Data Migration both sides.The application's data mover system is by application server, data migration request being tackled, thereby can obtain Data Migration both sides' identifier.
Step 102, judges the internal memory lock that whether comprises described Data Migration both sides identifier in application server internal memory, if having, be respectively described two identifier applications internal memory lock separately, otherwise the internal memory that creates described two identifiers is locked.
Internal memory lock refers in application server internal memory Data Migration identifier entered to line-locked object, and each identifier is unique corresponding internal memory lock in an application server, and each internal memory lock can only be used by a data migration request at every turn.After getting an identifier, first judge the internal memory lock that whether includes the unique correspondence of this identifier in internal memory, if do not have, need to utilize internal memory lock creation module to lock for this identifier creates an internal memory, if have, it is the internal memory lock of this its unique correspondence of identifier application.In general, if an identifier had carried out Data Migration, in application server internal memory, have so the internal memory lock of its unique correspondence, if an identifier is to carry out for the first time Data Migration, in application server internal memory, in possibility, there is the internal memory lock that this identifier is corresponding so, now, need to create internal memory lock for this identifier.
Because same identifier is may be at one time submitted for Data Migration (being that single identifier concurrent data migration request quantity is more) repeatedly, so, just may occur all including this identifier in a plurality of Data Migration requests.Because internal memory lock only has one, now, just need this identifier in a plurality of Data Migration requests to fight for internal memory lock.That is, need to be locked into row application to internal memory.
Concrete, application process can adopt the form of queue, according to the sequencing of Data Migration request time of origin, waits for one by one.Concrete, internal memory lock status can be set, for example, use and do not use two states, or locking and non-locking, concrete can set according to actual conditions, as long as can represent whether internal memory lock is available.The detailed process of locking for some identifier application internal memories is as follows:
Obtain the current use state of the internal memory lock that described identifier is corresponding, if be used, wait for, if be not used, this internal memory lock is obtained in application.
Be appreciated that for fear of waits for too long, and in not response of client, preferably, stand-by period threshold value can be set, add up the stand-by period of internal memory lock corresponding to described identifier application, if surpass stand-by period threshold value, refuse this Data Migration request.Can be directly to client return to mistake or prompting client end response overtime etc.
In addition, because can comprise Data Migration both sides' identifier in Data Migration request, may occur that an identifier application is to internal memory lock, and another one identifier is not applied for the situation of internal memory lock.For guarantee completing smoothly of Data Migration operation, just need two identifiers all to apply for carrying out subsequent operation after internal memory lock.Therefore, if only have an identifier application to internal memory lock, the waits for too long during application of another one identifier, also can adopt and aforesaidly return to wrong mode and process, that is, the stand-by period while needing only any one application of two identifiers surpasses threshold value, returns to mistake.
Step 103, the corresponding identifier of internal memory lock locking that utilizes application to arrive, sends to database by described Data Migration request, waits for this Data Migration request of database processing.
Both sides' identifier in Data Migration request is all applied for internal memory lock, and by after the locking of internal memory lock, now, can be according to normal flow, application server connects to database request, waits for this Data Migration request of database processing, carries out Data Migration operation.
Now, if database connects just occupied, need to wait for, if do not had, can directly carry out Data Migration operation.The detailed process of this Data Migration request of database processing is:
Obtain the Database lock of Data Migration both sides identifier in this Data Migration request;
Adopt Database lock to lock Data Migration both sides' identifier;
Then according to migration numerical value, the data in both sides' identifier are changed and preserved;
Finally remove the locking of Database lock to Data Migration both sides' identifier.
So far, database finishing dealing with to this Data Migration request.Wherein, Database lock and internal memory lock are similar, corresponding one by one with identifier, if do not had, after creating, re-use.
For example, in actual process, tentation data migration request is transfer request, and identifier refers to the both sides' that transfer accounts account, and migration numerical value refers to the amount of money of transferring accounts, and aforementioned process can be described in the following way so:
If a account need to be transferred accounts 100 yuan to b account, processing procedure is so: first utilize Database lock corresponding to a account to lock a account, and Database lock corresponding to b account locks to b account; Then, the account balance in a account deducts 100 yuan, adds 100 yuan in the account balance of b account, and amended data are preserved; After both sides' account data is revised and is preserved, database can be removed the locking to a account and b account to Database lock, and discharge Database lock separately, if include a account or b account in other transfer request, can after being released, a account or Database lock corresponding to b account use.
Step 104, after database is finished dealing with to this Data Migration request, removes the locking of internal memory lock to described Data Migration both sides identifier, releasing memory lock.
Remove internal memory lock to after the locking of both sides' identifier, can revise the use state of internal memory lock, releasing memory is locked, thereby internal memory lock is distributed to the identifier in the Data Migration request of waiting for.
Be appreciated that in aforementioned data moving method, by the internal memory of the setting up concurrent Data Migration request to same identifier of locking, process.Because the internal memory of this same identifier lock at every turn can only be for a data migration request, remaining concurrent data migration request needs to wait for that last data migration request uses just can obtain afterwards so.Also, each Data Migration request need to be arranged wait in internal memory, obtains one by one after internal memory lock, can set up and being connected of database by application server.Therefore, even if there are a large amount of concurrent Data Migration requests, also all need in application server internal memory, wait for, be let pass one by one, thereby reduced the occupancy that database is connected, improve the stability of database.In addition, even when occurring that a large amount of concurrent Data Migration requests cause application server internal memory unaffordable, also can solve by increasing the mode of the quantity of application server, can't impact database, thereby greatly improved the stability of system, avoided system crash.
Preferably, the mode that increases application server or application server internal memory except adopting improves the processing power of concurrent data migration request, directly the lock of the internal memory in application server is configured, the quantity of each internal memory lock concurrent data migration request that allows is set, if surpass setting value, the directly follow-up Data Migration request of refusal, until the Data Migration request of waiting for could be accepted new Data Migration request application internal memory lock after being less than setting value again.
With reference to Fig. 3, the application's data migration method embodiment bis-is shown, between the step 102 of embodiment mono-and step 103, can also comprise the following steps:
Step 301, whether internal memory lock the Data Migration request quantity in waiting status that the described identifier of judgement application is corresponding surpass application threshold value, if so, refuse this Data Migration request, otherwise, continue to wait for until obtain internal memory lock.
By this kind of mode, without increasing application server quantity, or the capacity of application server internal memory, unnecessary cost can be reduced, can guarantee that the connection of database is not taken by a large amount of concurrent data migration request, improve the stability of database and system simultaneously.
Preferably, for aforesaid data migration method embodiment mono-and two, incidence relation for internal memory lock and identifier, can adopt the form storage of mapping table, for example no matter the internal memory of each identifier lock, with supporting concurrent Hash mapping to preserve, like this, is the internal memory lock that obtains single identifier, or to operations such as internal memory lock or identifier is modified, deletions, can not affect whole mapping table.In mapping table, can only preserve a small amount of identifier that is carrying out Data Migration processing.In each Data Migration request, increase an internal memory lock, the duration of the extra process time that it increases can shorten to Microsecond grade, and this time is negligible for whole Data Migration treatment scheme.Simultaneously, when single identifier concurrent data migration request quantity is more, because reduced taking that database is connected, can improve the response speed of database, thereby can greatly shorten the time of whole Data Migration treatment scheme, improve the response speed of system.
Below, in conjunction with instantiation, preceding method is elaborated.In this example, Data Migration is account for the operation of transferring accounts, identifier herein.Suppose that a certain application has four application servers and a database, by application server, set up with being connected of database transfer request is passed to database, and by the database processing of transferring accounts.
Suppose that certain account (account c) has 40 concurrent transfer request simultaneously, also within very short time or simultaneously, having 40 accounts all needs the operation of transferring accounts with account c.Can be that other account is transferred accounts to account c, can be also that account c transfers accounts to other account, or the two has concurrently.In this example, 40 accounts of take have proposed to carry out transfer request to account c simultaneously and have described as example.If according to the processing mode of transferring accounts before, four application servers may be submitted the requests that connect to database simultaneously so, and send separately from client to transfer request.Because all include account c in 40 transfer request, and for account c, only have a Database lock in database, also can only process a transfer request, remaining transfer request needs to wait for one by one at every turn, and the transfer request of these waits can take database and connect.If follow-up, continue to occur including the concurrent transfer request of account c, will inevitably occur so taking in a large number the situation that database connects, thereby may cause database pressure to increase, even occur collapse.
If adopt the application's data migration method, by internal memory being set in each application server internal memory, lock, suppose that the mode mean allocation of 40 transfer request by load balancing, in four application servers, can receive ten transfer request in each application server so.Suppose to have comprised in each application server the internal memory lock of the both sides' that transfer accounts account.Now, ten transfer request in each application server can apply for obtaining the internal memory lock of both sides' account of transferring accounts, because account c only has an internal memory lock in each application server, in the situation that internal memory lock is not used, in ten transfer request, only have an internal memory lock that can get account c, all the other nine need to wait in line.Now, each application server can only be set up and being connected of database for transfer request, and so, the database linking number taking mostly is four most.Can find out, the application's transfer account method, by the mode of internal memory lock is set in application server, has been transferred to the process of waiting in line in application server internal memory, thus the pressure having brought to database while having greatly reduced single account concurrent request.Utilize application server internal memory to process concurrent request, even if internal memory cannot bear the pressure that concurrent request brings, also can pass through to increase the method for application server internal memory or increase application server, thereby increased stability and the anti-pressure ability of system.
With reference to Fig. 4, show the relation table of single identifier concurrent data migration request quantity and Mean Time of Systemic Response, wherein, ordinate represents Mean Time of Systemic Response, unit is millisecond (ms), and horizontal ordinate represents single identifier concurrent data migration request quantity, and unit is individual.Solid line represents the data that adopt internal memory lock to be combined with Database lock, and dotted line represents only to adopt the data of Database lock.Can find out, when single identifier concurrent data migration request negligible amounts, adopt internal memory lock to be combined with Database lock compared to only adopting Database lock, can increase the response time of system, but the response time difference of the two is less, therefore can think that impact is little.But, increase along with single identifier concurrent data migration request quantity, the response time that the mode that employing internal memory lock is combined with Database lock can reduce system greatly, and concurrent data migration request quantity is more, and its system response time that can reduce is more.Also,, when the application's data migration method is more for single identifier concurrent data migration request quantity, there is comparatively significantly effect.
With reference to Fig. 5, the application's data mover system embodiment mono-is shown, comprise blocking module 10, internal memory lock acquisition module 20, locking module 30 and release module 40.Data mover system can be arranged on application server inside, also can be used as independently module, and employing realizes Data Migration with the mode that application server carries out data interaction.
Blocking module 10, the Data Migration request receiving for tackling application server, and obtain the Data Migration both sides' that comprise in described Data Migration request identifier.
Internal memory lock acquisition module 20, for judging whether application server internal memory comprises the internal memory lock of described Data Migration both sides identifier, if having, be respectively described two identifier applications internal memory lock separately, otherwise the internal memory that creates described two identifiers is locked.
Preferably, internal memory lock acquisition module comprises internal memory lock use state acquiring unit, for obtaining the current use state of the internal memory lock that described identifier is corresponding, if be used, waits for, if be not used, this internal memory lock is obtained in application.
Be appreciated that this internal memory lock acquisition module can also comprise stand-by period statistic unit, for adding up the stand-by period of internal memory lock corresponding to described identifier application, if surpass stand-by period threshold value, refuses this Data Migration request.
Locking module 30, the corresponding identifier of internal memory lock locking for utilizing application to arrive, sends to database by described Data Migration request, waits for this Data Migration request of database processing.
Release module 40, the instruction of this Data Migration request being finished dealing with for obtaining database, removes the locking of internal memory lock to described Data Migration both sides identifier, releasing memory lock.
Preferably, this system also comprises that mapping table sets up module, for set up mapping table at application server internal memory, stores identifier and corresponding internal memory lock.
With reference to Fig. 6, the application's data mover system embodiment bis-is shown, this system also comprises Data Migration request quantity statistical module 60, for judging whether internal memory lock the Data Migration request quantity in waiting status that the described identifier of application is corresponding surpass application threshold value, if, refuse this Data Migration request, otherwise, continue to wait for until obtain internal memory lock.
Each embodiment in this instructions all adopts the mode of going forward one by one to describe, and each embodiment stresses is the difference with other embodiment, between each embodiment identical similar part mutually referring to.For system embodiment, because it is substantially similar to embodiment of the method, so description is fairly simple, relevant part is referring to the part explanation of embodiment of the method.
Those skilled in the art should understand, the application's embodiment can be provided as method, system or computer program.Therefore, the application can adopt complete hardware implementation example, implement software example or in conjunction with the form of the embodiment of software and hardware aspect completely.And the application can adopt the form that wherein includes the upper computer program of implementing of computer-usable storage medium (including but not limited to magnetic disk memory, CD-ROM, optical memory etc.) of computer usable program code one or more.
The data migration method and the system that above the application are provided are described in detail, applied specific case herein the application's principle and embodiment are set forth, the explanation of above embodiment is just for helping to understand the application's method and core concept thereof; Meanwhile, for one of ordinary skill in the art, the thought according to the application, all will change in specific embodiments and applications, and in sum, this description should not be construed as the restriction to the application.

Claims (11)

1. a data migration method, is characterized in that, comprises the following steps:
Tackle the Data Migration request that application server receives, and obtain the Data Migration both sides' that comprise in described Data Migration request identifier;
Judge the internal memory lock that whether comprises described Data Migration both sides identifier in application server internal memory, if having, be respectively described two identifier applications internal memory lock separately, otherwise the internal memory that creates described two identifiers is locked;
The corresponding identifier of internal memory lock locking that utilizes application to arrive, sends to database by described Data Migration request, waits for this Data Migration request of database processing;
Obtain the instruction that database is finished dealing with to this Data Migration request, remove the locking of internal memory lock to described Data Migration both sides identifier, releasing memory lock.
2. data migration method as claimed in claim 1, is characterized in that, described in be respectively internal memory separately of described two identifier applications lock and comprise:
Obtain the current use state of the internal memory lock that described identifier is corresponding, if be used, wait for, if be not used, this internal memory lock is obtained in application.
3. data migration method as claimed in claim 2, is characterized in that, described in be respectively internal memory separately of described two identifier applications lock and also comprise:
Add up the stand-by period of internal memory lock corresponding to described identifier application, if surpass stand-by period threshold value, refuse this Data Migration request.
4. data migration method as claimed in claim 1, is characterized in that, this Data Migration request of described database processing comprises:
Obtain the Database lock of Data Migration both sides identifier in this Data Migration request;
Adopt Database lock to lock described Data Migration both sides identifier;
According to migration numerical value, the data in both sides' identifier are changed and preserved;
Remove the locking of Database lock to Data Migration both sides identifier.
5. data migration method as claimed in claim 1, is characterized in that, described identifier adopts the form of mapping table to be stored in application server internal memory with corresponding internal memory lock.
6. the data migration method as described in claim 1 to 5 any one, is characterized in that, described in also comprise after being respectively internal memory separately of described two identifier applications lock:
Whether internal memory lock the Data Migration request quantity in waiting status that the described identifier of judgement application is corresponding surpass application threshold value, otherwise if so, refuse this Data Migration request, continue to wait for until obtain internal memory lock.
7. a data mover system, is characterized in that, comprising:
Blocking module, the Data Migration request receiving for tackling application server, and obtain the Data Migration both sides' that comprise in described Data Migration request identifier;
Internal memory lock acquisition module, for judging whether application server internal memory comprises the internal memory lock of described Data Migration both sides identifier, if having, be respectively described two identifier applications internal memory lock separately, otherwise the internal memory that creates described two identifiers is locked;
Locking module, the corresponding identifier of internal memory lock locking for utilizing application to arrive, sends to database by described Data Migration request, waits for this Data Migration request of database processing;
Release module, the instruction of this Data Migration request being finished dealing with for obtaining database, removes the locking of internal memory lock to described Data Migration both sides identifier, releasing memory lock.
8. data mover system as claimed in claim 7, is characterized in that, described internal memory lock acquisition module comprises:
Internal memory lock use state acquiring unit, for obtaining the current use state of the internal memory lock that described identifier is corresponding, if be used, waits for, if be not used, this internal memory lock is obtained in application.
9. data mover system as claimed in claim 8, is characterized in that, described internal memory lock acquisition module also comprises:
Stand-by period statistic unit, for adding up the stand-by period of internal memory lock corresponding to described identifier application, if surpass stand-by period threshold value, refuses this Data Migration request.
10. data mover system as claimed in claim 7, is characterized in that, described system also comprises:
Mapping table is set up module, for set up mapping table at application server internal memory, stores identifier and corresponding internal memory lock.
11. data mover systems as described in claim 7 to 10 any one, is characterized in that, described system also comprises:
Data Migration request quantity statistical module, for judging that whether internal memory lock the Data Migration request quantity in waiting status that the described identifier of application is corresponding surpass application threshold value, if so, refuse this Data Migration request.
CN201210201198.0A 2012-06-15 2012-06-15 Data migration method and system Active CN103514164B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210201198.0A CN103514164B (en) 2012-06-15 2012-06-15 Data migration method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210201198.0A CN103514164B (en) 2012-06-15 2012-06-15 Data migration method and system

Publications (2)

Publication Number Publication Date
CN103514164A true CN103514164A (en) 2014-01-15
CN103514164B CN103514164B (en) 2016-12-21

Family

ID=49896905

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210201198.0A Active CN103514164B (en) 2012-06-15 2012-06-15 Data migration method and system

Country Status (1)

Country Link
CN (1) CN103514164B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105183852A (en) * 2015-09-08 2015-12-23 网易(杭州)网络有限公司 Database migration method and device
CN106204217A (en) * 2016-07-08 2016-12-07 腾讯科技(深圳)有限公司 The methods, devices and systems of resource numerical value transfer, the method and apparatus of resource numerical value transfer request
CN106570027A (en) * 2015-10-10 2017-04-19 阿里巴巴集团控股有限公司 Transactional task processing method and device
CN108572870A (en) * 2017-11-23 2018-09-25 北京金山云网络技术有限公司 A kind of data capture method, device, electronic equipment, storage medium and system
CN111026734A (en) * 2019-12-10 2020-04-17 北京北龙云海网络数据科技有限责任公司 Database management method, system, device and storage medium
CN115757345A (en) * 2022-11-17 2023-03-07 天翼数字生活科技有限公司 Mass data smooth migration method and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004030487A (en) * 2002-06-28 2004-01-29 Hitachi Ltd Data base management method and system
CN1740978A (en) * 2004-08-23 2006-03-01 华为技术有限公司 Method for realing sharing internal stored data base and internal stored data base system
CN1858745A (en) * 2006-04-05 2006-11-08 华为技术有限公司 Processing method for realizing consistency of internal storage data and data bank data service
US20100281220A1 (en) * 2009-04-30 2010-11-04 International Business Machines Corporation Predictive ownership control of shared memory computing system data
CN102369518A (en) * 2011-08-31 2012-03-07 华为技术有限公司 Method for managing computer system memory, memory management unit and computer system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004030487A (en) * 2002-06-28 2004-01-29 Hitachi Ltd Data base management method and system
CN1740978A (en) * 2004-08-23 2006-03-01 华为技术有限公司 Method for realing sharing internal stored data base and internal stored data base system
CN1858745A (en) * 2006-04-05 2006-11-08 华为技术有限公司 Processing method for realizing consistency of internal storage data and data bank data service
US20100281220A1 (en) * 2009-04-30 2010-11-04 International Business Machines Corporation Predictive ownership control of shared memory computing system data
CN102369518A (en) * 2011-08-31 2012-03-07 华为技术有限公司 Method for managing computer system memory, memory management unit and computer system

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105183852A (en) * 2015-09-08 2015-12-23 网易(杭州)网络有限公司 Database migration method and device
CN105183852B (en) * 2015-09-08 2018-05-22 网易(杭州)网络有限公司 A kind of database migration method and apparatus
CN106570027A (en) * 2015-10-10 2017-04-19 阿里巴巴集团控股有限公司 Transactional task processing method and device
CN106570027B (en) * 2015-10-10 2020-08-25 阿里巴巴集团控股有限公司 Transactional task processing method and device
CN106204217A (en) * 2016-07-08 2016-12-07 腾讯科技(深圳)有限公司 The methods, devices and systems of resource numerical value transfer, the method and apparatus of resource numerical value transfer request
CN108572870A (en) * 2017-11-23 2018-09-25 北京金山云网络技术有限公司 A kind of data capture method, device, electronic equipment, storage medium and system
CN111026734A (en) * 2019-12-10 2020-04-17 北京北龙云海网络数据科技有限责任公司 Database management method, system, device and storage medium
CN115757345A (en) * 2022-11-17 2023-03-07 天翼数字生活科技有限公司 Mass data smooth migration method and system

Also Published As

Publication number Publication date
CN103514164B (en) 2016-12-21

Similar Documents

Publication Publication Date Title
CN103514164A (en) Data migration method and system
KR100625595B1 (en) Parallel Logging Method of Transaction Processing System
CN107209733B (en) Data writing method and device and system
EP3009930B1 (en) Lock management method and system, and lock management system configuration method and device
CN106302702A (en) Burst storage method, the Apparatus and system of data
CN101650646A (en) Method and device for realizing shared data consistency
CN103634379B (en) Management method for distributed storage space and distributed storage system
CN106204217A (en) The methods, devices and systems of resource numerical value transfer, the method and apparatus of resource numerical value transfer request
KR20170097132A (en) System for efficient processing of transaction requests related to an account in a database
CN103970807B (en) Method and system for managing database connection
CN106874125A (en) Method and device for sharing system resources among multi-container systems
CN110019112A (en) Data transactions method, apparatus and electronic equipment
CN104065636A (en) Data processing method and system
CN105893320A (en) Remote task function calling method oriented at multi-core processor
CN104536834A (en) Method for authorizing lock permission and distributed lock manager
CN103729236A (en) Method for limiting resource using limit of cloud computing users
CN106708608A (en) Distributed lock service method and acquisition method, and corresponding device
CN104793981B (en) A kind of online snapshot management method and device of cluster virtual machine
CN104461705B (en) A kind of method and storage control, cluster storage system of business access
CN101383814A (en) Device and method implementing data access based on connection pool
CN106855788A (en) A kind of Memory Allocation management method of heap space
US6754658B1 (en) Database server processing system, method, program and program storage device
CN100440191C (en) Method and system for processing complexes to access shared devices
CN111176559B (en) Data writing method and device and dual-activity system
CN107122362A (en) Cloud database resource extends the method and system with service extension

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20191209

Address after: P.O. Box 31119, grand exhibition hall, hibiscus street, 802 West Bay Road, Grand Cayman, Cayman Islands

Patentee after: Innovative advanced technology Co., Ltd

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

Patentee before: Alibaba Group Holding Co., Ltd.