CN102890679A - Method and system for processing data version - Google Patents

Method and system for processing data version Download PDF

Info

Publication number
CN102890679A
CN102890679A CN 201110203404 CN201110203404A CN102890679A CN 102890679 A CN102890679 A CN 102890679A CN 201110203404 CN201110203404 CN 201110203404 CN 201110203404 A CN201110203404 A CN 201110203404A CN 102890679 A CN102890679 A CN 102890679A
Authority
CN
China
Prior art keywords
time
data
balance
module
unfavourable balance
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
CN 201110203404
Other languages
Chinese (zh)
Other versions
CN102890679B (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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201110203404.7A priority Critical patent/CN102890679B/en
Publication of CN102890679A publication Critical patent/CN102890679A/en
Application granted granted Critical
Publication of CN102890679B publication Critical patent/CN102890679B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method for processing a data version, and the method comprises the following steps of beginning to recover data, reading a redolog file, and acquiring data time and data file timestamp in the redolog file; recovering the data in the redolog file if the timestamp of the data file is in adverse balance with the data time in the redolog file and the adverse balance time does not exceed a tolerant parameter or the timestamp of the data file is in favorable balance with the data time in the redolog file; and refusing to recover the data if the timestamp of the data file is in adverse balance with the data time in the redolog file and the adverse balance time exceeds the tolerant parameter. The invention also discloses a system for processing the data version. By adopting the method and the system, accuracy for updating the data, inquiring the data and loading the data version of a data file can be improved.

Description

A kind of disposal route of versions of data and system
Technical field
The present invention relates to field of data storage, refer to especially a kind of disposal route and system of versions of data.
Background technology
Along with 3G network is ripe gradually, the development of cloud computing and Internet of Things, telecommunication system also is faced with transition and larger challenge.Telecommunication system is more paid close attention to the performance of the aspects such as high availability, expansibility and mass memory at present.Requirement to high availability is in infrastructure, and storage and server are also deposited, in case server breaks down, the user can normally access the storage data, namely requires server in the situation that the data in the assurance storage system that breaks down can be used; In addition, require system's operation to have very strong fault-tolerant ability, to keep high reliability.The requirement of expansibility is can automatic or simple manual configuration additions and deletions memory node, reduces system pressure, improves the handling property of system, reduce the risk.Mass memory is rapidly structural data storage of requirement, can intactly safeguard mass data, and data query rapidly.Just because of the requirement of telecommunication system to above three aspects, so that in the telecommunication system, the characteristics of database are also more and clearer and more definite, for example, distributed, load balancing, failover and the management of little table etc.
Distributed data base must possess the functions such as storage and data query, also is varied to the version disposal route that records in the data file, and the modes such as release label, timestamp are arranged.Described record also can be referred to as data.Each time to the processing of data, corresponding a new version of data, described processing comprises Data Update, deletion, increase etc.In distributed memory system, a plurality of memory nodes are distributed on the different machines, during the version of each memory node data in the deal with data file, mostly be that the employing time is as version number, but since time of each memory node can not guarantee absolute synchronously, so version number is very inaccurate.If common data file version number is inaccurate, can cause the data that inquire wrong, still, if the version number of metadata is inaccurate, can badly influence systemic-function, may cause system to work.
In distributed memory system, need to safeguard the data of magnanimity, and high-intensity data manipulation language (DML) (DML) operation, also need to realize the functions such as load balancing, failover, this all relates to data, therefore, handle the version problem take timestamp as data file well, very important meaning is arranged.
Summary of the invention
In view of this, fundamental purpose of the present invention is to provide a kind of disposal route and system of versions of data, has improved the accuracy of the versions of data of system update data, data query, loading data file.
For achieving the above object, technical scheme of the present invention is achieved in that
A kind of disposal route of versions of data comprises: begin to recover data, read retry daily record redolog file, obtain data time and data file timestamp in the redolog file; If the data time in data file timestamp and the redolog file is the time unfavourable balance, and the unfavourable balance time surpass the tolerance parameter, perhaps, the data time in data file timestamp and the redolog file is the time favorable balance, the data in the recovery redolog file; If the data time in data file timestamp and the redolog file is the time unfavourable balance, and the unfavourable balance time is above tolerating parameter, refusal recovery data.
Describedly begin to recover before the data, the method further comprises: taken over node stop work, the control node assigns the adapter node to carry out failover, take over node according to the nodename of being taken over node, obtain in the metadata table final updating time of the little table corresponding with the described nodename of being taken over node, current time with self is compared, if the final updating time of current time and little table is the time favorable balance, then normally takes over; Otherwise refusal is taken over.
A kind of disposal route of versions of data comprises: memory node reads the data file of self, obtains the data file timestamp, with the current time comparison, if current time and data file timestamp are the time favorable balance, then loads data file; If current time and data file timestamp are the time unfavourable balance, and the unfavourable balance time surpass the tolerance parameter, then refusal loads data file; If current time and data file timestamp are the time unfavourable balance, and the unfavourable balance time surpass the tolerance parameter, the mode of wait is eliminated unfavourable balance, loads data file.
A kind of disposal route of versions of data, comprise: memory node corresponding to data that the control node determination will upgrade, memory node obtains the final updating time of the affiliated little table of data that will upgrade, with the current time comparison, if the final updating time of current time and little table is the time favorable balance, perhaps, the final updating time of current time and little table is the time unfavourable balance, and the unfavourable balance time surpasses the tolerance parameter, normally new data more; If the final updating time of current time and little table is the time unfavourable balance, and the unfavourable balance time surpass the tolerance parameter, then refuse more new data.
A kind of disposal route of versions of data comprises: the control node creates large table and the notice memory node creates little table; Memory node with the creation-time of large table in self current time and the control node relatively, if the time favorable balance then creates little table, if the time unfavourable balance, and the unfavourable balance time surpass the tolerance parameter, the mode of wait is eliminated unfavourable balance, creates little table; If the time unfavourable balance, and the unfavourable balance time is above tolerating parameter, the little table of refusal establishment.
A kind of disposal system of versions of data comprises: data recovery module and contrast module;
Data recovery module is used for reading the redolog file, obtains data time and data file timestamp in the redolog file, sends to the contrast module; If the data time in data file timestamp and the redolog file is the time favorable balance, perhaps, the data time in data file timestamp and the redolog file is the time unfavourable balance, and the unfavourable balance time surpasses the tolerance parameter, the recovery data; If the data time in data file timestamp and the redolog file is the time unfavourable balance, and the unfavourable balance time is above tolerating parameter, refusal recovery data;
The contrast module for the data time of comparing data document time stamp and redolog file, is determined the time favorable balance, and notification data recovers module; Determine the time unfavourable balance, further the unfavourable balance time is compared with the tolerance parameter, if surpass the tolerance parameter, notification data recovers module; Do not surpass the tolerance parameter, notification data recovers module.
Described system further comprises: update notification module and metadata updates module;
The update notification module is taken over node stop work, is used for assigning the adapter node to carry out the result, and notice metadata updates module;
The metadata updates module is used for reading metadata table, with the described final updating time of being taken over little table corresponding to nodename, sends to the contrast module; If the final updating time of current time and little table is the time unfavourable balance, refusal update metadata table; If the final updating time of current time and little table is the time favorable balance, the update metadata table;
Accordingly, the contrast module is used for the final updating time of smaller table and the current time that node is taken at self place, if the current time is later than the final updating time of little table, then is the time favorable balance, notice metadata updates module; Otherwise, be the time unfavourable balance, notice metadata updates module.
A kind of disposal system of versions of data comprises: data file load-on module and contrast module;
The data file load-on module is used for reading data file corresponding to self place memory node, obtains the data file timestamp, sends to the contrast module; If data file timestamp and current time are the time favorable balance, load data file; If data file timestamp and current time are the time unfavourable balance, and the unfavourable balance time surpass the tolerance parameter, the mode of wait is eliminated unfavourable balance, loads data file; If data file timestamp and current time are the time unfavourable balance, and the unfavourable balance time is above tolerating parameter, refusal loading data file;
The contrast module is used for current time and data file timestamp are compared, if determine that current time and data file timestamp are the time favorable balance, the notification data file load module; Otherwise, be the time unfavourable balance, surpass tolerance parameter, notification data file load module if further determine the unfavourable balance time; Do not surpass tolerance parameter, notification data file load module if determine the unfavourable balance time.
A kind of disposal system of versions of data comprises: Data Update notification module, data update module and contrast module;
The Data Update notification module is used for definite corresponding memory node of data that will upgrade, and notifies the data update module of described memory node;
Data update module, sends to the contrast module at the final updating time that is used for obtaining the affiliated little table of data that will upgrade; If the final updating time of current time and little table is the time favorable balance, perhaps time unfavourable balance and unfavourable balance time surpass the tolerance parameter, normally new data more; If time unfavourable balance and unfavourable balance time surpass the tolerance parameter, refuse more new data;
The contrast module is used for the current time of self place memory node and the final updating time of little table are compared, if the time favorable balance, the notification data update module; If the time unfavourable balance, and the unfavourable balance time is above tolerance parameter, notification data update module; If the time unfavourable balance, and the unfavourable balance time is above tolerance parameter, notification data update module.
A kind of disposal system of versions of data comprises: show greatly creation module, little table creation module and contrast module;
Large table creation module is used for creating large table, notifies little table creation module after large table creates;
Little table creation module, the large table creation-time for reading large table creation module sends to the contrast module; If the current time is the time favorable balance with large table creation-time, normally create little table; If the time unfavourable balance, and the unfavourable balance time is above tolerating parameter, the little table of refusal establishment; If the time unfavourable balance, and the unfavourable balance time surpass the tolerance parameter, the mode of wait is eliminated unfavourable balance, creates little table;
The contrast module is used for the current time of self place memory node is shown creation-time relatively with large, if the time favorable balance is notified little table creation module; If the time unfavourable balance, and the unfavourable balance time surpass the tolerance parameter, notify little table creation module; If the time unfavourable balance, and the unfavourable balance time surpass the tolerance parameter, notify little table creation module.
This shows, adopt method and system of the present invention, when recovering the data in the redolog file, the data file timestamp, with the redolog file in data time be the time favorable balance, when perhaps time unfavourable balance and unfavourable balance time do not surpass the tolerance parameter, just the data in the redolog file are recovered, when guaranteeing data integrity, to the time unfavourable balance, and the data in the redolog file when the unfavourable balance time surpasses the tolerance parameter are not recovered, and avoid system to recover a large amount of repeating datas; Simultaneously, when data are taken over, to the final updating time of the data that will take over node, the final updating time of namely little table was compared with the current time, the taking over of time favorable balance, improved take over after, the correctness of query metadata version, thus guarantee that systemic-function is normal; When loading data file, with current time and data file timestamp relatively, the data file that time favorable balance or time unfavourable balance and unfavourable balance time is surpassed the tolerance parameter loads, and improves the accuracy of loading data file; During Data Update, with final updating time of current time and little table relatively, when time favorable balance or time unfavourable balance and unfavourable balance time surpassed the tolerance parameter, just new data had more improved the correctness of upgrading rear versions of data; When building table, be the time favorable balance in the current time with the large creation-time of showing, perhaps, time unfavourable balance and unfavourable balance time is not when surpassing the tolerance parameter, just set up little table, guarantee little the correct of Time Created of showing, be convenient to subsequent user is carried out data query by large table correctness.
Description of drawings
Fig. 1 is that the embodiment of the invention realizes the method flow schematic diagram that data are recovered;
Fig. 2 is that the embodiment of the invention realizes the method flow schematic diagram that data file loads;
Fig. 3 is the method flow schematic diagram that the embodiment of the invention realizes Data Update;
Fig. 4 is the method flow schematic diagram that the embodiment of the invention realizes building table;
Fig. 5 is that the embodiment of the invention realizes that the system that data are recovered forms schematic diagram;
Fig. 6 is that the embodiment of the invention realizes that the system that data file loads forms schematic diagram;
Fig. 7 is that the embodiment of the invention realizes that the system of Data Update forms schematic diagram;
Fig. 8 is that the embodiment of the invention realizes that the system that builds table forms schematic diagram.
Embodiment
Basic thought of the present invention is: begin to recover data, read retry daily record (redolog) file, obtain data time and data file timestamp in the redolog file; Data time in comparing data document time stamp and the redolog file, if both are the time unfavourable balance, and the unfavourable balance time surpass the tolerance parameter, perhaps, both be the time favorable balance, the recovery data.
The present invention is described in detail below by specific embodiment and accompanying drawing.
A kind of disposal route of versions of data, as shown in Figure 1, concrete steps are as follows:
Step 101, beginning data are recovered, and read the redolog file, obtain data time and data file timestamp in the redolog file; Described redolog file is saved in storage space by memory node, comprising: the data of distributed memory system, versions of data, the time data time when namely data being operated; Distributed memory system is saved in data first the redolog file, and the record version, then data are saved in the data file, and the record version;
Distributed memory system is unusual, and memory node is restarted or carried out in the failover process, and data need to be recovered by system, and at this moment, the record in the data file may be incomplete, and memory node will load the data in the redolog file, is used for recovering data.Memory node reads the redolog file, obtains the versions of data in the redolog file, chooses the versions of data nearest with the current time, namely data time.
Memory node is according to the path of the data file of self correspondence in the metadata table, the creation-time of data file in the read data files, namely data file timestamp.Described metadata table comprises: the creation-time of the large table identification number (ID) of the scope of the data in the data file that the memory node under memory node title, the little table data area corresponding with described memory node title, namely little table is preserved, data file path, the final updating time of little table, little table correspondence, large table.Wherein, the final updating time of described little table is to carry out final updating by the data that the memory node under the little table is preserved, and perhaps, little table self information carries out the time of final updating; Described little table self information comprises the data area of the described memory node of little table, little table etc.; All memory nodes and the corresponding metadata table of control node; Memory node is saved in data in the data file of storage space, and by metadata table recording data files path; Described data file is created by memory node, wherein comprise creation-time, namely data file timestamp, data and versions of data, data in the data file are preserved according to size order, the storage space of setting data file, if the data in the data file surpass the storage space of setting, then newdata file save data.Described little table comprises memory node title, the large Table I D that little table data area, data file path, the little table corresponding with described memory node title is corresponding, the creation-time of large table and the final updating time of little table in internal memory.Described large epi-position is used for opening to the user in certain node, is convenient to user's inquiry, comprises creation-time, self ID; Described ID is generated by the memory node that creates large table.Wherein, when showing greatly to be created by user selection, memory node creates; After creating large table, memory node can create little table, and sets the data area of little table, and inputs large Table I D in little table, determines the corresponding relation of little table and large table, and little table at this moment is blank little table; Simultaneously the data area of little table and the large Table I D of little table correspondence are updated in the metadata table.
Data time in step 102, comparing data document time stamp and the redolog file, if between the two be the time unfavourable balance, and the unfavourable balance time surpass the tolerance parameter, then mistake may appear in the versions of data in the redolog file, execution in step 103; If the unfavourable balance time does not between the two surpass the tolerance parameter, it is useful then partial data being arranged in the redolog file, should recover to data execution in step 104; If be the time favorable balance between the two, the preservation of data sequentially is normal in data file and the redolog file, and the data corresponding with described data file are to need to recover execution in step 104 in the redolog file;
The data time that data file timestamp and the data time middle distance current time of redolog file is nearest is compared, if the data file timestamp early than the data time of redolog file, then is the time unfavourable balance between the two; Otherwise, be the time unfavourable balance between the two, the time interval is the unfavourable balance time.The large I of described tolerance parameter arranges as required.
Step 103, refusal recover the data in the redolog file;
Step 104, recovery data;
Described recovery data are the data that read in the redolog file, are loaded in the internal memory.
The flow process of more than recovering data in the redolog file can be triggered by multiple situation, failover is one of them, particular content comprises: memory node quits work, the memory node here can be referred to as to be taken over node, the control node is specified another memory node, namely take over node and take over by the adapter node, the nodename that namely will be taken over node send to the adapter node.Taking over node reads in the metadata table and the described final updating time of being taken over little table corresponding to nodename according to the nodename of being taken over node, current time with self is compared, if take over the current time of node early than the final updating time of little table, then taking over the current time of node and the final updating time of little table is the time unfavourable balance, be not inconsistent with logic, if take over this moment, still take over the final updating time of node as the up-to-date time take quilt in the metadata table, namely as final updating time of little table, at this moment, if will inquire about memory node corresponding to little table, because the time is more Zao than the final updating time of little table, therefore, in can only the query metadata table, the memory node under the record before the final updating time of little table, little table still be by the adapter node, inquiry error affects systemic-function; Taking over the node refusal takes over; Be later than the final updating time of being taken over the medium and small table of node if take over the current time of node, then both are the time favorable balance, normal adapter, update metadata table.Described normal adapter, the update metadata table comprises: the nodename of being taken over node in the metadata table is revised as the nodename of taking over node.After the adapter, carry out the redolog file data and recover.
In addition, in the process that data file loads, also relate to versions of data, multiple situation all can the trigger data file load in the distributed memory system, comprise that memory node restarts, failover and load balancing etc., wherein, when memory node is restarted, advanced row data file load is carried out data again and is recovered, namely the described flow process of Fig. 1; When loading for data, to the processing procedure of data version as shown in Figure 2, concrete steps are as follows:
Step 201, memory node read the data file of self correspondence, obtain the data file timestamp, with current time and data file timestamp relatively, if the time favorable balance, execution in step 202; If the time unfavourable balance, and the unfavourable balance time is above tolerance parameter, execution in step 203; If the unfavourable balance time does not surpass tolerance parameter, execution in step 204;
Memory node reads data file path corresponding to the title of memory node described in the metadata table according to self nodename, according to the data file path read data files, obtain the data file timestamp in the data file, the data file timestamp that obtains was compared with the current time of memory node, if the current time is later than the data file timestamp, time favorable balance then; Otherwise, the time unfavourable balance, the time interval between the two is the unfavourable balance time.
Step 202, loading data file.
Described loading data file is: memory node reads in the metadata table, little table corresponding to self memory node, read final updating time and data file path in the little table, data area according to little table, with final updating time and the data file path of little table, add in the little table corresponding with described data area in the internal memory.
Step 203, refusal load data file, and by the alarm notification user.
Step 204, the mode of waiting for are eliminated unfavourable balance, load data file.
The mode of described wait is eliminated unfavourable balance, loads data file and comprises: memory node is waited for the time identical with the tolerance parameter, and the node current time to be stored loads data file when identical with the data file timestamp.Here, load time of occurrence unfavourable balance in the data file process, unreasonable in logic, but because data file might be created by different memory nodes, life period is nonsynchronous between the memory node may, if the data file of all time of occurrence unfavourable balances is all refused to load, reduce system availability, although the mode of waiting for is eliminated the response speed that the process of unfavourable balance has reduced system, improved the availability of system.
In distributed memory system, when the data in the data file are upgraded, also relate to versions of data, a plurality of processes comprise Data Update, load balancing for example, wherein, in the load balancing process, advanced row data are upgraded, and carry out data again and recover; Described Data Update comprises data increase, deletion and modification etc., and during Data Update, to the treatment scheme of data version as shown in Figure 3, idiographic flow is as follows:
Step 301, definite corresponding memory node of data that will upgrade;
The control node receives the data that the user will upgrade, according to the data area of data query metadata table, namely the data area of the medium and small table of metadata table is determined the little table corresponding to data that will upgrade, according to the memory node under the little table, determine the memory node corresponding to data that will upgrade.The control node notifies described memory node to carry out Data Update, comprises the data that will upgrade in the described notice, the data that namely will add or delete, the data that maybe will revise and amended data.
Step 302, memory node obtain the final updating time of the little table under the data that will upgrade, the current time of memory node compared with the final updating time of little table, if the time favorable balance, execution in step 303; If the time unfavourable balance, and the unfavourable balance time is above tolerance parameter, execution in step 304; If the unfavourable balance time does not surpass tolerance parameter, execution in step 303;
Memory node reads in the metadata table, the final updating time of the little table that the data of upgrading are corresponding, the current time of memory node was compared with the final updating time of little table, if the current time of memory node is later than the final updating time of little table, then was the time favorable balance; Otherwise, being the time unfavourable balance, the time interval between the two is the unfavourable balance time.
Step 303, normal new data more.
Described renewal comprises: during the storage data, memory node is according to the data file path in little table corresponding to data, and read data files is saved in the data order in the data file, and writing time, and the version after namely upgrading is the latest edition of this data file; Revise or during the deletion data, according to the data file path in little table corresponding to data, read data files, data corresponding with the data that will revise or delete in the data query file are made amendment or are deleted described data.
Step 304, refuse more new data, and by the alarm notification user.
Distributed memory system also relates to the versions of data problem in building the process of table, when building table, to the treatment scheme of data version, as shown in Figure 4, concrete steps are as follows:
Step 401, control node create large table and the notice memory node creates little table;
The control node is indicated according to the user and is created large table, and the large table of described establishment comprises the large Table I D of generation, and the large table of record creation-time; Described large Table I D adds 1 by the control node at existing large Table I D, and for example existing large Table I D is 1, and then the new large Table I D that creates is 2, and the initial value of large Table I D can be set as required; Described notice memory node creates little table and comprises: the control node is according to the load balancing of memory node, creates little table by the memory node of least-loaded.
Step 402, memory node are compared the current time of self with the creation-time of large table in the control node, if the time favorable balance, execution in step 403; If time unfavourable balance and unfavourable balance time do not surpass tolerance parameter, execution in step 404; If the time unfavourable balance, and the unfavourable balance time is above tolerance parameter, execution in step 405; According to normally building the surface low journey, the control node is set up first large table, then set up little table by memory node, if be later than little table the Time Created of large table, follow-up when carrying out Data Update by little table, the time of Data Update might be irrational early than the Time Created of large table in logic, also may cause the functional fault of system.
Step 403, memory node create little table;
The little table of described establishment comprises: memory node is set up little table, sets the data area of little table, and little table is corresponding with large Table I D.
Step 404, the mode of waiting for are eliminated unfavourable balance, create little table.
After memory node was waited for the time identical with described tolerance parameter, the current time of memory node was later than the creation-time of large table, and memory node normally creates little table.
Step 405, memory node refusal create little table, and by the alarm notification user.
The present invention also provides a kind of disposal system of versions of data, and as shown in Figure 5, this system comprises: data recovery module 501 and contrast module 502, wherein data recovery module 501 is positioned at memory node with contrast module 502.
Data recovery module 501 is used for reading the redolog file; Obtain data time and data file timestamp in the redolog file, send to contrast module 502; If the data time in data file timestamp and the redolog file is the time unfavourable balance, and the unfavourable balance time is above tolerating parameter, refusal recovery data; If the unfavourable balance time does not surpass the tolerance parameter, recover data; If the data time in data file timestamp and the redolog file is the time favorable balance, recover data;
Contrast module 502 for the data time of comparing data document time stamp and redolog file, is determined the time favorable balance, and notification data recovers module 501; Determine the time unfavourable balance, in the time interval that further will be between the two, namely the unfavourable balance time is compared with the tolerance parameter, and the unfavourable balance time surpasses the tolerance parameter, and notification data recovers module 501; The unfavourable balance time surpasses the tolerance parameter, and notification data recovers module 501.
This system further comprises: update notification module 503 is positioned at the control node; Metadata updates module 504 is positioned at memory node;
Update notification module 503 is taken over node stop work, and be used to specify the adapter node and take over, and notice metadata updates module 504; Comprise in the described notice and taken over nodename;
Metadata updates module 504 is used for reading metadata table and described final updating time of being taken over little table corresponding to nodename, sends to contrast module 502; If the final updating time of current time and little table is the time unfavourable balance, refusal update metadata table; If the final updating time of current time and little table is the time favorable balance, normal update metadata table;
Accordingly, contrast module 502 is used for the final updating time of smaller table and the current time of self place memory node, if take over the current time of node early than the final updating time of little table, then be the time unfavourable balance between the two, notice metadata updates module 504; Otherwise, be the time favorable balance, notice metadata updates module 504.
A kind of disposal system of versions of data, as shown in Figure 6, this system comprises: data file load-on module 601 and contrast module 602; Wherein, data file load-on module 601 is positioned at memory node with contrast module 602;
Data file load-on module 601 is used for reading data file corresponding to self place memory node, obtains the data file timestamp, sends to contrast module 602; If data file timestamp and current time are the time favorable balance, load data file; If data file timestamp and current time are the time unfavourable balance, and the unfavourable balance time is greater than tolerating parameter, refusal loading data file; If data file timestamp and current time are the time unfavourable balance, and the unfavourable balance time surpass the tolerance parameter, the mode of wait is eliminated unfavourable balance, loads data file;
Contrast module 602 is used for the current time is compared with the data file timestamp, and the current time is later than the data file timestamp, then determines current time and data file timestamp time favorable balance, notification data file load module 601; Otherwise both time unfavourable balances determine that the unfavourable balance time surpasses tolerance parameter, notification data file load module 601; Determine that the unfavourable balance time does not surpass tolerance parameter, notification data file load module 601; Described definite current time and data file timestamp time favorable balance comprise: if the current time be later than the data file timestamp, time favorable balance then, otherwise, the time unfavourable balance; Described definite unfavourable balance time surpasses the tolerance parameter and comprises: obtain the time interval of current time and data file timestamp, compare with the tolerance parameter as the unfavourable balance time, determine that the unfavourable balance time surpasses and tolerate parameter.
A kind of disposal system of versions of data, as shown in Figure 7, this system comprises: Data Update notification module 701, data update module 702 and contrast module 703; Wherein, Data Update notification module 701 is positioned at the control node, and data update module 702 and contrast module 703 are positioned at memory node;
Data Update notification module 701 be used for to receive the data that the user will upgrade, and determines the corresponding memory node of data that will upgrade, and notifies the data update module 702 of described memory node; Described definite corresponding memory node of data that will upgrade comprises: according to the data area of data query metadata table, the data area of the medium and small table of metadata table namely, the definite little table corresponding to data that will upgrade; the memory node under the little table is the memory node corresponding to data that will upgrade; Comprise the data that to upgrade in the described notice, the data that namely will add or delete, the data that maybe will revise and amended data;
Data update module 702, sends to contrast module 703 at the final updating time that is used for obtaining the little table under the data that will upgrade; If the final updating time of current time and little table is the time favorable balance, perhaps the final updating time of current time and little table is time unfavourable balance and unfavourable balance time to surpass the tolerance parameter, normally new data more; If time unfavourable balance and unfavourable balance time surpass the tolerance parameter, refuse more new data;
Contrast module 703, be used for current time of self place memory node with final updating time of little table relatively, definite then time favorable balance, notification data update module 702; Otherwise the time unfavourable balance determines that the unfavourable balance time surpasses tolerance parameter, notification data update module 702; Determine that time unfavourable balance and unfavourable balance time do not surpass tolerance parameter, notification data update module 702; Described definite time favorable balance comprises: the current time is later than the final updating time of little table, then determines the time favorable balance; Described definite unfavourable balance time comprises greater than the tolerance parameter: with the time interval of final updating time of current time and little table, as the unfavourable balance time, compare with the tolerance parameter, if the unfavourable balance time is greater than the tolerance parameter, determine that then the unfavourable balance time surpasses the tolerance parameter, otherwise the unfavourable balance time does not surpass the tolerance parameter.
A kind of disposal system of versions of data, as shown in Figure 8, this system comprises: show greatly creation module 801, little table creation module 802 and contrast module 803; Wherein, show greatly creation module 801 and be positioned at the control node, little table creation module 802 and contrast module 803 are positioned at memory node;
Large table creation module 801 be used for creating large table according to user's order, and the little table creation module 802 of notice memory node is set up little table after large table creates; The large table of described establishment comprises: generate large Table I D, and the large table of record creation-time;
Little table creation module 802 for the large table creation-time that reads large table creation module 801, sends to contrast module 803; If the time favorable balance normally creates little table; If time unfavourable balance and unfavourable balance time surpass the tolerance parameter, refusal creates little table; If time unfavourable balance and unfavourable balance time do not surpass the tolerance parameter, the mode of wait is eliminated unfavourable balance, normally creates little table;
Contrast module 803 is used for the current time of self place memory node is shown creation-time relatively with large, determines the time favorable balance, notifies little table creation module 802; Determine the time unfavourable balance, and the unfavourable balance time surpass the tolerance parameter, notify little table creation module 802; Determine the time unfavourable balance, and the unfavourable balance time surpass the tolerance parameter, notify little table creation module 802; Described definite time favorable balance comprises: if the current time be later than large table creation-time, then time favorable balance; Described definite time unfavourable balance, and the unfavourable balance time surpasses the tolerance parameter and comprises: if the current time is early than large table creation-time, time unfavourable balance then, current time is shown the time interval of creation-time as the unfavourable balance time with large, compare with the tolerance parameter, can determine the unfavourable balance time above the tolerance parameter, perhaps the unfavourable balance time surpasses the tolerance parameter.
The above is preferred embodiment of the present invention only, is not for limiting protection scope of the present invention.

Claims (10)

1. the disposal route of a versions of data is characterized in that, the method comprises:
Begin to recover data, read retry daily record redolog file, obtain data time and data file timestamp in the redolog file; If the data time in data file timestamp and the redolog file is the time unfavourable balance, and the unfavourable balance time surpass the tolerance parameter, perhaps, the data time in data file timestamp and the redolog file is the time favorable balance, the data in the recovery redolog file; If the data time in data file timestamp and the redolog file is the time unfavourable balance, and the unfavourable balance time is above tolerating parameter, refusal recovery data.
2. method according to claim 1 is characterized in that, describedly begins to recover before the data, and the method further comprises:
Taken over node stop work, the control node assigns the adapter node to carry out failover, take over node according to the nodename of being taken over node, obtain in the metadata table final updating time of the little table corresponding with the described nodename of being taken over node, current time with self is compared, if the final updating time of current time and little table is the time favorable balance, then normally take over; Otherwise refusal is taken over.
3. the disposal route of a versions of data is characterized in that, the method comprises:
Memory node reads the data file of self, obtains the data file timestamp, with the current time comparison, if current time and data file timestamp are the time favorable balance, then loads data file; If current time and data file timestamp are the time unfavourable balance, and the unfavourable balance time surpass the tolerance parameter, then refusal loads data file; If current time and data file timestamp are the time unfavourable balance, and the unfavourable balance time surpass the tolerance parameter, the mode of wait is eliminated unfavourable balance, loads data file.
4. the disposal route of a versions of data is characterized in that, the method comprises:
Memory node corresponding to data that the control node determination will upgrade, memory node obtains the final updating time of the affiliated little table of data that will upgrade, with the current time comparison, if the final updating time of current time and little table is the time favorable balance, perhaps, the final updating time of current time and little table is the time unfavourable balance, and the unfavourable balance time surpasses the tolerance parameter, normal new data more; If the final updating time of current time and little table is the time unfavourable balance, and the unfavourable balance time surpass the tolerance parameter, then refuse more new data.
5. the disposal route of a versions of data is characterized in that, the method comprises:
The control node creates large table and the notice memory node creates little table; Memory node with the creation-time of large table in self current time and the control node relatively, if the time favorable balance then creates little table, if the time unfavourable balance, and the unfavourable balance time surpass the tolerance parameter, the mode of wait is eliminated unfavourable balance, creates little table; If the time unfavourable balance, and the unfavourable balance time is above tolerating parameter, the little table of refusal establishment.
6. the disposal system of a versions of data is characterized in that, this system comprises: data recovery module and contrast module;
Data recovery module is used for reading the redolog file, obtains data time and data file timestamp in the redolog file, sends to the contrast module; If the data time in data file timestamp and the redolog file is the time favorable balance, perhaps, the data time in data file timestamp and the redolog file is the time unfavourable balance, and the unfavourable balance time surpasses the tolerance parameter, the recovery data; If the data time in data file timestamp and the redolog file is the time unfavourable balance, and the unfavourable balance time is above tolerating parameter, refusal recovery data;
The contrast module for the data time of comparing data document time stamp and redolog file, is determined the time favorable balance, and notification data recovers module; Determine the time unfavourable balance, further the unfavourable balance time is compared with the tolerance parameter, if surpass the tolerance parameter, notification data recovers module; Do not surpass the tolerance parameter, notification data recovers module.
7. system according to claim 6 is characterized in that, this system further comprises: update notification module and metadata updates module;
The update notification module is taken over node stop work, is used for assigning the adapter node to carry out the result, and notice metadata updates module;
The metadata updates module is used for reading metadata table, with the described final updating time of being taken over little table corresponding to nodename, sends to the contrast module; If the final updating time of current time and little table is the time unfavourable balance, refusal update metadata table; If the final updating time of current time and little table is the time favorable balance, the update metadata table;
Accordingly, the contrast module is used for the final updating time of smaller table and the current time that node is taken at self place, if the current time is later than the final updating time of little table, then is the time favorable balance, notice metadata updates module; Otherwise, be the time unfavourable balance, notice metadata updates module.
8. the disposal system of a versions of data is characterized in that, this system comprises: data file load-on module and contrast module;
The data file load-on module is used for reading data file corresponding to self place memory node, obtains the data file timestamp, sends to the contrast module; If data file timestamp and current time are the time favorable balance, load data file; If data file timestamp and current time are the time unfavourable balance, and the unfavourable balance time surpass the tolerance parameter, the mode of wait is eliminated unfavourable balance, loads data file; If data file timestamp and current time are the time unfavourable balance, and the unfavourable balance time is above tolerating parameter, refusal loading data file;
The contrast module is used for current time and data file timestamp are compared, if determine that current time and data file timestamp are the time favorable balance, the notification data file load module; Otherwise, be the time unfavourable balance, surpass tolerance parameter, notification data file load module if further determine the unfavourable balance time; Do not surpass tolerance parameter, notification data file load module if determine the unfavourable balance time.
9. the disposal system of a versions of data is characterized in that, this system comprises: Data Update notification module, data update module and contrast module;
The Data Update notification module is used for definite corresponding memory node of data that will upgrade, and notifies the data update module of described memory node;
Data update module, sends to the contrast module at the final updating time that is used for obtaining the affiliated little table of data that will upgrade; If the final updating time of current time and little table is the time favorable balance, perhaps time unfavourable balance and unfavourable balance time surpass the tolerance parameter, normally new data more; If time unfavourable balance and unfavourable balance time surpass the tolerance parameter, refuse more new data;
The contrast module is used for the current time of self place memory node and the final updating time of little table are compared, if the time favorable balance, the notification data update module; If the time unfavourable balance, and the unfavourable balance time is above tolerance parameter, notification data update module; If the time unfavourable balance, and the unfavourable balance time is above tolerance parameter, notification data update module.
10. the disposal system of a versions of data is characterized in that, this system comprises: show greatly creation module, little table creation module and contrast module;
Large table creation module is used for creating large table, notifies little table creation module after large table creates;
Little table creation module, the large table creation-time for reading large table creation module sends to the contrast module; If the current time is the time favorable balance with large table creation-time, normally create little table; If the time unfavourable balance, and the unfavourable balance time is above tolerating parameter, the little table of refusal establishment; If the time unfavourable balance, and the unfavourable balance time surpass the tolerance parameter, the mode of wait is eliminated unfavourable balance, creates little table;
The contrast module is used for the current time of self place memory node is shown creation-time relatively with large, if the time favorable balance is notified little table creation module; If the time unfavourable balance, and the unfavourable balance time surpass the tolerance parameter, notify little table creation module; If the time unfavourable balance, and the unfavourable balance time surpass the tolerance parameter, notify little table creation module.
CN201110203404.7A 2011-07-20 2011-07-20 The processing method and system of a kind of versions of data Active CN102890679B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110203404.7A CN102890679B (en) 2011-07-20 2011-07-20 The processing method and system of a kind of versions of data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110203404.7A CN102890679B (en) 2011-07-20 2011-07-20 The processing method and system of a kind of versions of data

Publications (2)

Publication Number Publication Date
CN102890679A true CN102890679A (en) 2013-01-23
CN102890679B CN102890679B (en) 2017-05-31

Family

ID=47534186

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110203404.7A Active CN102890679B (en) 2011-07-20 2011-07-20 The processing method and system of a kind of versions of data

Country Status (1)

Country Link
CN (1) CN102890679B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106708825A (en) * 2015-07-29 2017-05-24 腾讯科技(深圳)有限公司 Data file processing method and system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5261069A (en) * 1990-08-13 1993-11-09 Hewlett-Packard Company Method of maintaining consistency of cached data in a database system
US6871271B2 (en) * 2000-12-21 2005-03-22 Emc Corporation Incrementally restoring a mass storage device to a prior state

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106708825A (en) * 2015-07-29 2017-05-24 腾讯科技(深圳)有限公司 Data file processing method and system
CN106708825B (en) * 2015-07-29 2019-09-27 腾讯科技(深圳)有限公司 A kind of data file processing method and system

Also Published As

Publication number Publication date
CN102890679B (en) 2017-05-31

Similar Documents

Publication Publication Date Title
US11429641B2 (en) Copying data changes to a target database
US7840539B2 (en) Method and system for building a database from backup data images
US7257690B1 (en) Log-structured temporal shadow store
US8250033B1 (en) Replication of a data set using differential snapshots
CN108369601B (en) Promoting attributes in relational structured data
US11321291B2 (en) Persistent version control for data transfer between heterogeneous data stores
US9223797B2 (en) Reparse point replication
CN102142024A (en) Logical data backup and rollback using incremental capture in a distributed database
CN108431807B (en) Replication of structured data records in partitioned data storage spaces
CN104657382A (en) Method and device for detecting consistency of data of MySQL master and slave servers
US20170169087A1 (en) Replication control among redundant data centers
US20210165573A1 (en) Managing Replication State for Deleted Objects
CN109298978B (en) Recovery method and system for database cluster of specified position
CN109902127B (en) Historical state data processing method and device, computer equipment and storage medium
CN114490677A (en) Data synchronization in a data analysis system
CN114968966A (en) Distributed metadata remote asynchronous replication method, device and equipment
CN110543485B (en) Block chain reservation filing method based on snapshot
WO2016117007A1 (en) Database system and database management method
CN102890679A (en) Method and system for processing data version
CN115658391A (en) Backup recovery method of WAL mechanism based on QianBase MPP database
CN111209138A (en) Operation and maintenance method and device of data storage system
US20230385304A1 (en) Snapshots for distributed object-based datastores
CN117171266B (en) Data synchronization method, device, equipment and storage medium
US20210248108A1 (en) Asynchronous data synchronization and reconciliation
JP2006285576A (en) Distributed processing system, and distributed processing method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant