CN110309224A - A kind of data copy method and device - Google Patents

A kind of data copy method and device Download PDF

Info

Publication number
CN110309224A
CN110309224A CN201810209543.2A CN201810209543A CN110309224A CN 110309224 A CN110309224 A CN 110309224A CN 201810209543 A CN201810209543 A CN 201810209543A CN 110309224 A CN110309224 A CN 110309224A
Authority
CN
China
Prior art keywords
host node
motion
node device
queue
successfully
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
CN201810209543.2A
Other languages
Chinese (zh)
Other versions
CN110309224B (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201810209543.2A priority Critical patent/CN110309224B/en
Publication of CN110309224A publication Critical patent/CN110309224A/en
Application granted granted Critical
Publication of CN110309224B publication Critical patent/CN110309224B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/23Updating
    • G06F16/2365Ensuring data consistency and integrity
    • 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/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • G06F16/275Synchronous replication

Abstract

The application discloses a kind of data copy method and device, is related to data processing field, atom consistency when can complete across the data duplicates between cluster and guarantee that data duplication is submitted.This method comprises: the first host node device creates the first motion;First motion is stored to isochronous queue, wherein the first host node device and the second host node device belong to different clusters;First host node device reads the first motion from isochronous queue and is sent to the second host node device, so that the second host node device creates the second motion according to the first motion;First host node device reads the first motion from isochronous queue and stores to the first aging queue;First host node device receives synchronizing for the second host node device transmission and successfully instructs, wherein the second host node device stores the second motion to the second aging queue, and generates to synchronize and successfully instruct;First host node device according to synchronize successfully instruct by the first aging queue the first motion activation or deposit disk.

Description

A kind of data copy method and device
Technical field
Embodiments herein is related to data processing field more particularly to a kind of data copy method and device.
Background technique
It only can feedback data success or failure two states when atom consistency refers to for data write situation.Currently In the related software of message transmission consistency, it is generally based on Paxos algorithm or the enhancing of its algorithm.It is currently mostly using one After the method that majority is elected in a cluster, realize that unified submit is refreshed to realize the data atom consistency in same cluster. It is directed to multiple message trunkings (or cluster based on Key-value), how to be completed across the data duplicates between cluster simultaneously Guarantee atom consistency when data duplication is submitted, is realized currently without effective scheme.
Summary of the invention
Embodiments herein provides a kind of data copy method and device, can complete multiple across the synchrodata between cluster It makes and guarantees atom consistency when data duplication is submitted.
In a first aspect, a kind of data copy method is provided, this method comprises: the first host node device creates the first motion; When first motion is synchronized to the second host node device by the determination of the first host node device, the first motion is stored to isochronous queue, Wherein the first host node device and second host node device belong to different clusters;First host node device is from isochronous queue It reads the first motion and is sent to the second host node device, so that the second host node device is mentioned according to the first motion creation second Case;First host node device reads the first motion from isochronous queue and stores to the first aging queue;First host node device connects It receives synchronizing for the second host node device transmission successfully to instruct, wherein the second host node device stores the second motion to the second aging Queue, and generate to synchronize and successfully instruct;First host node device is successfully instructed first in the first aging queue according to synchronizing Motion activation or deposit disk.In the above scheme, after the first host node device creates the first motion, the first host node device When the first motion is synchronized to the second host node device by determination, the first motion is stored to isochronous queue first, wherein first Host node device and the second host node device belong to different clusters;First host node device reads the first motion from isochronous queue And it is sent to the second host node device, the second host node device creates the second motion according to the first motion;First host node device The first motion is read from isochronous queue and is stored to the first aging queue;Second host node device stores the second motion to second Aging queue, and generate to synchronize and successfully instruct, the first host node device receives synchronizing for the second host node device transmission and successfully refers to It enables;First host node device only after acquisition synchronizes successfully instruction just can further according to synchronize successfully instruct it is old by first Change the first motion activation in queue or deposit disk;The second host node device mentions second in the second aging queue simultaneously Case activation or deposit disk have been achieved the data duplicates across cluster and ensure that atom when data duplication is submitted Consistency.
In a kind of possible design, after the first host node device activates the first motion, further includes: the first host node is set Standby the first motion by isochronous queue and the first aging queue is deleted.
In a kind of possible design, first motion includes data object;First host node device is by described first Motion is stored to before isochronous queue, method further include: the first host node device is that the data object of the first motion adds first number According to.Wherein, metadata includes ageing parameter;The method also includes: when determining that current time meets the ageing parameter, if It does not receive to synchronize and successfully instruct, then generate timing error information.When the first host node device creates third motion, described in refreshing The corresponding ageing parameter of first motion.Metadata includes synchronization parameter;Second host node is received in the first host node device Before what equipment was sent synchronizes successfully instruction, the synchronization parameter is not synchronize;Described second is received in the first host node device After what host node device was sent synchronizes successfully instruction, the method also includes: synchronization parameter is revised as having synchronized.Metadata Mark including the affiliated cluster of the first motion.First number can be added when storing due to the first motion to isochronous queue to its data object According to, therefore which cluster can be judged according to metadata with latest data, occur between cluster communication failure Shi Zeke with Using the cluster with latest data as the cluster uniquely survived, another cluster terminates operation.In this way, having latest data Aging queue is checked in cluster, deleting is not the cluster and not synchronous data, for deleting in aging queue in another cluster Except not being not synchronous data, data copy operation can be re-started in this way after communication recovery, avoid not replicating successfully Data occupy resource.
Second aspect provides a kind of data copy method, this method comprises: the second host node device receives the first host node The first motion that equipment is sent;Second host node device creates the second motion according to first motion, wherein described the One host node device and second host node device belong to different clusters;Second host node device is mentioned described second Case is stored to the second aging queue, and is generated to synchronize and successfully be instructed;Second host node device successfully instructs described synchronize It is sent to first host node device, so that first host node device synchronizes successfully instruction for described first according to described Motion activation or deposit disk.Its attainable beneficial effect can refer to the beneficial effect in first aspect, herein no longer It repeats.
In a kind of possible design, further includes: the method also includes: second host node devices by described second Second motion activation or deposit disk in aging queue.
In a kind of possible design, further includes: after second host node device activates second motion, also wrap Include: second host node device deletes the second motion in the second aging queue.
The third aspect, the embodiment of the present application provide a kind of data copy device.The data copy device can be used for holding Any method that the above-mentioned first aspect of row provides.The data copy device specifically can be to be described in above-mentioned first and second aspect The first host node device or the data copy device be in implementation on first and second the first host node device for providing of aspect The functional entity of the method for first aspect offer is provided, such as can be chip.
In a kind of possible design, function can be carried out to data copy device according to the method that above-mentioned first aspect provides The division of energy module, for example, each functional module of each function division can be corresponded to, it can also be by two or more function It can be integrated in a functional module.
In alternatively possible design, which may include: processor, and processor is for executing storage Computer program in device, so that either first aspect offer method is performed.
Fourth aspect, the embodiment of the present application provide a kind of data copy device.The data copy device can be used for holding Any method that the above-mentioned second aspect of row provides.The data copy device specifically can be to be described in above-mentioned first and second aspect The second host node device or the data copy device be in implementation on first and second the second host node device for providing of aspect The functional entity for stating the method for second aspect offer for example can be chip.
In a kind of possible design, function can be carried out to data copy device according to the method that above-mentioned second aspect provides The division of energy module, for example, each functional module of each function division can be corresponded to, it can also be by two or more function It can be integrated in a functional module.
In alternatively possible design, which may include: processor, and processor is for executing storage Computer program in device, so that either second aspect offer method is performed.
The embodiment of the present application also provides a kind of computer readable storage mediums, store computer instruction thereon, when this When computer instruction is run on computers so that computer execute above-mentioned first aspect, second aspect it is any possible Method.
The embodiment of the present application also provides a kind of computer program products, when run on a computer, so that first Either aspect, second aspect offer method are performed.
It should be understood that any device or computer storage medium or computer program product of above-mentioned offer are used to Execute corresponding method presented above, therefore, attainable beneficial effect can refer to it is beneficial in corresponding method Effect, details are not described herein again.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, embodiment will be described below Needed in attached drawing be briefly described.
A kind of schematic diagram of the application scenarios for data copy method that Fig. 1 embodiments herein provides;
A kind of structural schematic diagram for data copy device that Fig. 2 embodiments herein provides;
A kind of flow diagram for data copy method that Fig. 3 embodiments herein provides;
A kind of data structure schematic diagram of motion that example offer is provided of Fig. 4 the application;
A kind of structural schematic diagram for data copy device that Fig. 5 embodiments herein provides;
A kind of structural schematic diagram for data copy device that another embodiment of Fig. 6 the application provides.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present application, technical solution in the embodiment of the present invention carries out clear, complete Site preparation description.
In the description of the present application, unless otherwise indicated, "/" indicate or the meaning, for example, A/B can indicate A or B;This "and/or" in text be only it is a kind of describe affiliated partner incidence relation, indicate may exist three kinds of relationships, for example, A and/ Or B, can indicate: individualism A exists simultaneously A and B, these three situations of individualism B.Also, in the description of the present application In, unless otherwise indicated, " multiple " refer to two or more.In addition, for the ease of clearly describing the embodiment of the present application Technical solution, " first " and " second " etc. described in the embodiment of the present application are or to be used for area for distinguishing different objects The other different disposal to same target, rather than it is used for the particular order of description object.For example, the first host node device and second Host node device is the host node device in different clusters.
A kind of data copy method provided by the embodiments of the present application can be applied to the data duplication between different clusters In the process.Fig. 1 is a kind of rough schematic view of system architecture provided by the embodiments of the present application.It include at least two in the system architecture A cluster, wherein including several equipment in each cluster, wherein the cluster can be distributed type assemblies, the equipment in each cluster Host node device (leader) and multiple from node device can be determined by way of electing leader (follower), wherein two clusters are shown in FIG. 1, three are wherein illustratively shown in cluster one from node device Quilt and a host node device (the first host node device 11), illustratively show three from node device quilt in cluster two With a host node device (the second host node device 12), the caching and data write disk of host node device are in addition shown. Wherein, in the same cluster, host node device is responsible for swashing for the creation of motion, the initiation of motion ballot and resolution and motion It is living with it is synchronous.
Based on above-mentioned system architecture, the scheme that embodiments herein provides is executed by data copy device, wherein counting It can be the first host node device itself or its internal functional entity (such as chip) configured according to reproducing unit, at another Data copy device can be the second host node device itself or its internal functional entity (such as chip) configured in example.
Fig. 2 is a kind of composition schematic diagram of data copy device provided by the embodiments of the present application, as shown in Fig. 2, data are multiple Device processed may include at least one processor 21, communication interface 22, bus 23.
It is specifically introduced below with reference to each component parts of the Fig. 2 to data copy device:
Processor 21 is the control centre of data copy device, can be a processor, is also possible to multiple processing elements The general designation of part.For example, processor 21 is a central processing unit (central processing unit, CPU), it is also possible to Specific integrated circuit (application specific integrated circuit, ASIC), or be arranged to implement One or more integrated circuits of the embodiment of the present application, such as: one or more microprocessors (digital signal Processor, DSP), or, one or more field programmable gate array (field programmable gate array, FPGA)。
Wherein, processor 21 can execute the various of data copy device by running or executing software program or instruction Function.
Optionally, which can also include memory 24, for storing above-mentioned software program or instruction, It further, can be with storing data, for example, for generating data required for data replicate.
In concrete implementation, as one embodiment, processor 21 may include one or more CPU, such as in Fig. 2 Shown in CPU0 and CPU1.
In the concrete realization, as one embodiment, data copy device may include multiple processors, such as in Fig. 2 Shown in processor 21 and processor 25.Each of these processors can be a single core processor (single- CPU), it is also possible to a multi-core processor (multi-CPU).Here processor can refer to one or more equipment, circuit, And/or the processing core for handling data (such as computer program instructions).
Memory 24 can be read-only memory (read-only memory, ROM) or can store static information and instruction Other kinds of static storage device, random access memory (random access memory, RAM) or letter can be stored The other kinds of dynamic memory of breath and instruction, is also possible to Electrically Erasable Programmable Read-Only Memory (electrically Erasable programmable read-only memory, EEPROM), CD-ROM (compact dsisc read- Only memory, CD-ROM) or other optical disc storages, optical disc storage (including compression optical disc, laser disc, optical disc, digital universal Optical disc, Blu-ray Disc etc.), magnetic disk storage medium or other magnetic storage apparatus or can be used in carrying or store to have referring to Enable or data structure form desired program code and can by any other medium of computer access, but not limited to this. Memory 24, which can be, to be individually present, and is connected by bus 24 with processor 21.Memory 24 can also collect with processor 21 At together.
Wherein, memory 24 is used to store the software program for executing application scheme, and execution is controlled by processor 21.
Communication interface 22, for being communicated with other equipment.As for communicate with the second host node device, and cluster one or two In other from node device communicate.
It is total to can be industry standard architecture (industry standard architecture, ISA) for bus 23 Line, external equipment interconnection (peripheral component interconnect, PCI) bus or extension Industry Standard Architecture Structure (extended industry standard architecture, EISA) bus etc..It is total that the bus can be divided into address Line, data/address bus, control bus etc..Only to be indicated with a thick line in Fig. 2 convenient for indicating, it is not intended that only one total Line or a type of bus.
The restriction of device structure shown in Figure 2 not structure paired data reproducing unit, may include than illustrate it is more or Less component perhaps combines certain components or different component layouts.Optionally, the software journey in the embodiment of the present application Sequence can also be referred to as computer executed instructions, and the embodiment of the present application is not especially limited this.Optionally, the embodiment of the present application In software program can also be referred to as computer executed instructions, the embodiment of the present application is not especially limited this.It is understood that , above-mentioned data copy device can be applied to the first host node device or the second host node device.
Hereinafter, in conjunction with Fig. 1,3 explanation data copy methods provided by the present application.It should be noted that the following realities of the application The name for applying instruction or data in example between each equipment is an example, is also possible to other names in specific implementation Word is described collectively herein, and the embodiment of the present application is not especially limited this.
101, the first host node device creates the first motion.
It should be noted that first motion can in cluster one by any from node device or first host node The motion that equipment is created according to the data data of write-in, wherein needing after the first host node device creates first motion in institute Carry out initiation ballot in the cluster one of category, only respectively from node according to certain rules (such as the minority is subordinate to the majority) by this After one motion, then the first motion creates successfully, and what it is different from the prior art is to work as, after motion creates successfully, to realize first Motion copies to cluster two in real time, and the first host node device does not activate first motion directly but executes step 102.
102, when the first motion is synchronized to the second host node device by the determination of the first host node device, the first motion is stored To isochronous queue, wherein the first host node device and the second host node device belong to different clusters.
It wherein, will when the first motion is synchronized to the second host node device of another cluster by the determination of the first host node device First motion is stored to isochronous queue, is otherwise directly activated to the first motion, or the solidification deposit disk when activating abnormal.Its In, the first motion includes data object;First host node device stores the first motion to before isochronous queue, further includes: the One host node device is that the data object of the first motion adds metadata.
103, the first host node device reads the first motion from isochronous queue and is sent to the second host node device.
Illustratively, referring to shown in Fig. 4, metadata includes the mark of the affiliated cluster of the first motion, synchronization parameter and old Change one of parameter or a variety of, wherein ageing parameter is parameter relevant to time and operation, is deposited unique within a certain period of time Characteristic, for example, ageing parameter can be a timing length value, start when storing the first motion to isochronous queue according to this Timing length value timing triggers specified operation when timing is more than the timing length value, such as: determine that current time meets It when the ageing parameter, is successfully instructed if not receiving to synchronize, generates timing error information.In addition, further including when the first main section When point device creates new motion, refresh the corresponding ageing parameter of the first motion, such as shorten above-mentioned timing length value.Its In, when metadata includes synchronization parameter, synchronizing for the second host node device transmission is received in the first host node device and is successfully instructed Before, synchronization parameter is not synchronize.Wherein, the first host node device can be via any from node device transmission in cluster one First motion, or directly by itself sending first motion.
104, the first host node device reads the first motion from isochronous queue and stores to the first aging queue.
Wherein, the simultaneously operating terminates after the completion of reading the first motion from isochronous queue and store to the first aging queue, Otherwise the first motion is read up to the first motion is fully synchronized to the first aging queue from isochronous queue again.
105, the second host node device receives the first motion that the first host node device is sent.
Wherein, the second host node device can receive first motion (such as from node device by any in cluster two Shown in Fig. 1), or directly by itself receiving first motion.Wherein, the first host node device meeting during step 105 Data, which are taken out, from isochronous queue according to the principle of FIFO (first in first out, first in, first out) is passed to another point Cloth cluster creates the second motion and is stored in the second aging queue after the parsing of the second host node device, return, which synchronizes, successfully to be instructed.
106, the second host node device creates the second motion according to the first motion.
107, the second host node device stores the second motion to the second aging queue, and generates to synchronize and successfully instruct.
108, the second host node device will synchronize successfully instruction and be sent to the first host node device.
The first host node device receive the second host node device send synchronize successfully instruction after, the first host node is set It is standby to be also used to be revised as having synchronized by synchronization parameter.
109, the first host node device receives synchronizing for the second host node device transmission and successfully instructs.
110, the first host node device according to synchronize successfully instruct by the first aging queue the first motion activation or It is stored in disk.
In addition, the first host node device will the first motion activation after further include: the first host node device by isochronous queue with And first the first motion in aging queue is deleted;And it synchronizes still un-activation motion and has solidified deposit magnetic in abnormal cases Disk.Similar, the second motion in the second aging queue is activated or is stored in disk by the second host node device.And second After host node device activates the second motion, the second host node device deletes the second motion in the second aging queue.
When storing due to the first motion to isochronous queue metadata can be added to its data object, it can be according to first number It is judged that cluster one has latest data, it then can be by cluster one as unique when communication failure occurs for cluster one and cluster two The cluster of survival, another cluster two terminate operation.In this way, checking the first aging queue in cluster one, deletion is not cluster one And not synchronous data, it is not not synchronous data for being deleted in aging queue in cluster two, in this way after communication recovery Data copy operation can be re-started, avoids not replicating successful data occupancy resource.
In the above scheme, after the first host node device creates the first motion, the first host node device is being determined first When motion is synchronized to the second host node device, the first motion is stored to isochronous queue first, wherein the first host node device and Second host node device belongs to different clusters;First host node device reads the first motion from isochronous queue and is sent to second Host node device, the second host node device create the second motion according to the first motion;First host node device is read from isochronous queue It takes the first motion and stores to the first aging queue;Second host node device stores the second motion to the second aging queue, and Generation, which synchronizes, successfully to be instructed, and the first host node device receives synchronizing for the second host node device transmission and successfully instructs;First main section Point device only obtain synchronize successfully instruction after just can further according to synchronizing, successfully instruct will be in the first aging queue First motion activation or deposit disk;Simultaneously the second host node device by the second aging queue the second motion activation or It is stored in disk, the data duplicates across cluster have been achieved and ensure that atom consistency when data duplication is submitted.
It is above-mentioned that mainly scheme provided by the embodiments of the present application is described from the angle of method.In order to realize above-mentioned function Can, it comprises execute the corresponding hardware configuration of each function and/or software module.Those skilled in the art should be easy to anticipate Know, unit and algorithm steps described in conjunction with the examples disclosed in the embodiments of the present disclosure, the application can with hardware or The combining form of hardware and computer software is realized.Some function is actually with the side of hardware or computer software driving hardware Formula executes, specific application and design constraint depending on technical solution.Professional technician can be to each specific Using using different methods to achieve the described function, but this realize it is not considered that exceeding scope of the present application.
The embodiment of the present application can carry out the division of functional module, example according to above method example to data copy device Such as, each functional module of each function division can be corresponded to, two or more functions can also be integrated at one It manages in module.Above-mentioned integrated module both can take the form of hardware realization, can also use the form of software function module It realizes.It should be noted that being schematical, only a kind of logic function stroke to the division of module in the embodiment of the present application Point, there may be another division manner in actual implementation.
As shown in figure 5, being a kind of structural schematic diagram of data copy device provided by the embodiments of the present application.It is shown in fig. 5 Data copy device can be used for executing corresponding first host node device in any data copy method provided above and execute The step of.The data copy device 50 may include: sending module 51, processing module 52 and receiving module 53.Wherein, mould is handled Block 52, for creating the first motion;Processing module 52 is also used to determination for first motion and is synchronized to the second host node device When, first motion is stored to isochronous queue, wherein first host node device and the second host node device category In different clusters;Sending module 51, for reading first motion from the isochronous queue and being sent to the second host node Equipment, so that second host node device creates the second motion according to first motion;The processing module 52, is also used to First motion is read from the isochronous queue and is stored to the first aging queue;Receiving module 53, for receiving described Synchronizing for two host node devices transmission successfully instructs, wherein second host node device stores second motion to second Aging queue, and generate described synchronize and successfully instruct;The processing module 52 is also used to successfully be instructed according to described synchronize by institute State first motion activation in the first aging queue or deposit disk.Wherein, each step that above method embodiment is related to Rapid all related contents can quote the function description of corresponding function module, and the explanation of related content can in the present embodiment With reference to above method embodiment, details are not described herein again.
As an example, data copy device as shown in connection with fig. 2, above-mentioned sending module 51 and receiving module 53 can be with Communication interface 22 in corresponding diagram 2;Processing module 52 can be with the processor 21,25 in corresponding diagram 2.
As shown in fig. 6, being a kind of structural schematic diagram of data copy device 60 provided by the embodiments of the present application.Shown in Fig. 6 Data copy device 60 can be used for executing corresponding second host node device in any data copy method provided above The step of execution.The data copy device 60 may include: sending module 61, processing module 62 and receiving module 63.Wherein, it connects Module 63 is received, for receiving the first motion of the first host node device transmission;Processing module 62, for according to the receiving module Received first motion creates the second motion, wherein first host node device and second host node device belong to Different clusters;The processing module 62 is also used to store second motion to the second aging queue, and generate it is synchronous at Function instruction;Sending module 61, for by the processing module generate it is described synchronize successfully instruction be sent to the described first main section Point device, so that first host node device synchronizes successfully instruction for first motion activation or deposit magnetic according to described Disk.Wherein, all related contents for each step that above method embodiment is related to can quote the function of corresponding function module It can describe, the explanation of related content can refer to above method embodiment in the present embodiment, and details are not described herein again.
As an example, data copy device as shown in connection with fig. 2, above-mentioned sending module 61 and receiving module 63 can be with Communication interface 22 in corresponding diagram 2;Processing module 62 can be with the processor 21,25 in corresponding diagram 2.
It should be understood that magnitude of the sequence numbers of the above procedures are not meant to execute suitable in the various embodiments of the application Sequence it is successive, the execution of each process sequence should be determined by its function and internal logic, the implementation without coping with the embodiment of the present application Process constitutes any restriction.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually It is implemented in hardware or software, the specific application and design constraint depending on technical solution.Professional technician Each specific application can be used different methods to achieve the described function, but this realization is it is not considered that exceed Scope of the present application.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description, The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In several embodiments provided herein, it should be understood that disclosed system, apparatus and method, it can be with It realizes by another way.For example, apparatus embodiments described above are merely indicative, for example, the unit It divides, only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components It can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point, it is shown or The mutual coupling, direct-coupling or communication connection discussed can be through some interfaces, the indirect coupling of equipment or unit It closes or communicates to connect, can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
It, can also be in addition, each functional unit in each embodiment of the application can integrate in one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.
In the above-described embodiments, can come wholly or partly by software, hardware, firmware or any combination thereof real It is existing.When being realized using software program, can entirely or partly realize in the form of a computer program product.The computer Program product includes one or more computer instructions.On computers load and execute computer program instructions when, all or It partly generates according to process or function described in the embodiment of the present application.The computer can be general purpose computer, dedicated meter Calculation machine, computer network or other programmable devices.The computer instruction can store in computer readable storage medium In, or from a computer readable storage medium to the transmission of another computer readable storage medium, for example, the computer Instruction can pass through wired (such as coaxial cable, optical fiber, number from a web-site, computer, server or data center Word user line (Digital Subscriber Line, DSL)) or wireless (such as infrared, wireless, microwave etc.) mode to another A web-site, computer, server or data center are transmitted.The computer readable storage medium can be computer Any usable medium that can be accessed either includes the numbers such as one or more server, data centers that medium can be used to integrate According to storage equipment.The usable medium can be magnetic medium (for example, floppy disk, hard disk, tape), optical medium (for example, DVD), Or semiconductor medium (such as solid state hard disk (Solid State Disk, SSD)) etc..
The above, the only specific embodiment of the application, but the protection scope of the application is not limited thereto, it is any Those familiar with the art within the technical scope of the present application, can easily think of the change or the replacement, and should all contain Lid is within the scope of protection of this application.Therefore, the protection scope of the application should be based on the protection scope of the described claims.

Claims (20)

1. a kind of data copy method, which is characterized in that
First host node device creates the first motion;
When first motion is synchronized to the second host node device by the first host node device determination, by first motion It stores to isochronous queue, wherein first host node device and second host node device belong to different clusters;
First host node device reads first motion from the isochronous queue and is sent to the second host node device, with Toilet states the second host node device and creates the second motion according to first motion;
First host node device reads first motion from the isochronous queue and stores to the first aging queue;
First host node device receives the synchronizing for the second host node device transmission and successfully instructs, wherein described second is main Node device stores second motion to the second aging queue, and generates described synchronize and successfully instruct;
First host node device is according to first motion for synchronizing and successfully instructing in the first aging queue Activation or deposit disk.
2. the method according to claim 1, wherein first host node device activates first motion Afterwards, further includes:
First host node device deletes the first motion in the isochronous queue and the first aging queue.
3. method according to claim 1 or 2, which is characterized in that first motion includes data object;
First host node device stores first motion to before isochronous queue, the method also includes: described One host node device is that the data object of first motion adds metadata.
4. according to the method described in claim 3, it is characterized in that, the metadata includes ageing parameter;The method is also wrapped It includes:
When determining that current time meets the ageing parameter, is successfully instructed if not receiving described synchronize, generate timing error Information.
5. according to the method described in claim 3, it is characterized in that, further including when first host node device creation third mentions When case, refresh the corresponding ageing parameter of first motion.
6. according to the method described in claim 3, it is characterized in that, the metadata includes synchronization parameter;
First host node device receive that second host node device sends synchronize successfully instruction before, the synchronization Parameter is not synchronize;
First host node device receive that second host node device sends synchronize successfully instruction after, the method Further include:
The synchronization parameter is revised as having synchronized.
7. according to the method described in claim 3, it is characterized in that, the metadata includes the affiliated cluster of the first motion Mark.
8. a kind of data copy method, which is characterized in that
Second host node device receives the first motion that the first host node device is sent;
Second host node device creates the second motion according to first motion, wherein first host node device and institute It states the second host node device and belongs to different clusters;
Second host node device stores second motion to the second aging queue, and generates to synchronize and successfully instruct;
Second host node device by it is described synchronize successfully instruction be sent to first host node device, so as to described first Host node device synchronizes successfully instruction for first motion activation or deposit disk according to described.
9. data copy method according to claim 8, which is characterized in that the method also includes:
Second motion in the second aging queue is activated or is stored in disk by second host node device.
10. data copy method according to claim 9, which is characterized in that second host node device is by described After two motions activation, further includes:
Second host node device deletes the second motion in the second aging queue.
11. a kind of data copy device, which is characterized in that
Processing module, for creating the first motion;
The processing module is also used to determine when first motion is synchronized to the second host node device, described first is mentioned Case is stored to isochronous queue, wherein first host node device and second host node device belong to different clusters;
Sending module, for reading first motion from the isochronous queue and being sent to the second host node device, with toilet It states the second host node device and the second motion is created according to first motion;
The processing module is also used to read first motion from the isochronous queue and store to the first aging queue;
Receiving module is successfully instructed for receiving the synchronizing for the second host node device transmission, wherein second host node Equipment stores second motion to the second aging queue, and generates described synchronize and successfully instruct;
The processing module is also used to according to first motion for synchronizing and successfully instructing in the first aging queue Activation or deposit disk.
12. device according to claim 11, which is characterized in that the processing module is also used to first motion After activation, the first motion in the isochronous queue and the first aging queue is deleted.
13. device according to claim 11 or 12, which is characterized in that first motion includes data object;
The processing module is the data pair of first motion before being also used to store first motion to isochronous queue As adding metadata.
14. device according to claim 13, which is characterized in that the metadata includes ageing parameter;The processing mould Block is also used to when determining that current time meets the ageing parameter, is successfully instructed if not receiving described synchronize, is generated synchronization Error message.
15. device according to claim 13, which is characterized in that the processing module, when being also used to create third motion, Refresh the corresponding ageing parameter of first motion.
16. device according to claim 13, which is characterized in that the metadata includes synchronization parameter;
First host node device receive that second host node device sends synchronize successfully instruction before, the synchronization Parameter is not synchronize;
The processing module will be described after being also used to synchronize successfully instruction receive that second host node device sends Synchronization parameter is revised as having synchronized.
17. device according to claim 13, which is characterized in that the metadata includes the affiliated cluster of the first motion Mark.
18. a kind of data copy device, which is characterized in that
Receiving module, for receiving the first motion of the first host node device transmission;
Processing module, for creating the second motion according to received first motion of the receiving module, wherein described first Host node device and second host node device belong to different clusters;
The processing module is also used to store second motion to the second aging queue, and generates to synchronize and successfully instruct;
Sending module described synchronize successfully instruction and is sent to first host node and sets for generate the processing module It is standby, so that first host node device synchronizes successfully instruction for first motion activation or deposit disk according to described.
19. device according to claim 18, which is characterized in that the processing module is also used to second aging Second motion activation or deposit disk in queue.
20. device according to claim 19, which is characterized in that the processing module is also used to second motion After activation, the second motion in the second aging queue is deleted.
CN201810209543.2A 2018-03-14 2018-03-14 Data copying method and device Active CN110309224B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810209543.2A CN110309224B (en) 2018-03-14 2018-03-14 Data copying method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810209543.2A CN110309224B (en) 2018-03-14 2018-03-14 Data copying method and device

Publications (2)

Publication Number Publication Date
CN110309224A true CN110309224A (en) 2019-10-08
CN110309224B CN110309224B (en) 2021-08-31

Family

ID=68073318

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810209543.2A Active CN110309224B (en) 2018-03-14 2018-03-14 Data copying method and device

Country Status (1)

Country Link
CN (1) CN110309224B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021168697A1 (en) * 2020-02-26 2021-09-02 深圳市欢太科技有限公司 Data synchronization method and apparatus, data storage system, and computer readable medium
CN113703954A (en) * 2020-05-21 2021-11-26 中移(苏州)软件技术有限公司 Message backup method and device, electronic equipment and computer storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102629268A (en) * 2012-03-09 2012-08-08 华为技术有限公司 Data synchronization method, system and date access device
US20130275698A1 (en) * 2009-09-24 2013-10-17 International Business Machines Corporation Data storage using bitmaps
CN103875229A (en) * 2013-12-02 2014-06-18 华为技术有限公司 Asynchronous replication method, device and system
CN104202375A (en) * 2014-08-22 2014-12-10 广州华多网络科技有限公司 Method and system for synchronous data
CN105512297A (en) * 2015-12-10 2016-04-20 中国测绘科学研究院 Distributed stream-oriented computation based spatial data processing method and system
CN105786959A (en) * 2016-01-11 2016-07-20 北京京东尚科信息技术有限公司 Synchronization method and device of primary database and spare database
CN106034080A (en) * 2015-03-10 2016-10-19 中兴通讯股份有限公司 Metadata migration method and metadata migration device in distributed system
CN106445409A (en) * 2016-09-13 2017-02-22 郑州云海信息技术有限公司 Distributed block storage data writing method and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130275698A1 (en) * 2009-09-24 2013-10-17 International Business Machines Corporation Data storage using bitmaps
CN102629268A (en) * 2012-03-09 2012-08-08 华为技术有限公司 Data synchronization method, system and date access device
CN103875229A (en) * 2013-12-02 2014-06-18 华为技术有限公司 Asynchronous replication method, device and system
CN104202375A (en) * 2014-08-22 2014-12-10 广州华多网络科技有限公司 Method and system for synchronous data
CN106034080A (en) * 2015-03-10 2016-10-19 中兴通讯股份有限公司 Metadata migration method and metadata migration device in distributed system
CN105512297A (en) * 2015-12-10 2016-04-20 中国测绘科学研究院 Distributed stream-oriented computation based spatial data processing method and system
CN105786959A (en) * 2016-01-11 2016-07-20 北京京东尚科信息技术有限公司 Synchronization method and device of primary database and spare database
CN106445409A (en) * 2016-09-13 2017-02-22 郑州云海信息技术有限公司 Distributed block storage data writing method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
崔伟等: "分布式系统中数据同步机制的研究与实现 ", 《计算机工程与设计》 *
袁震: "基于消息中间件的数据同步更新方法 ", 《兵工自动化》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021168697A1 (en) * 2020-02-26 2021-09-02 深圳市欢太科技有限公司 Data synchronization method and apparatus, data storage system, and computer readable medium
CN113703954A (en) * 2020-05-21 2021-11-26 中移(苏州)软件技术有限公司 Message backup method and device, electronic equipment and computer storage medium

Also Published As

Publication number Publication date
CN110309224B (en) 2021-08-31

Similar Documents

Publication Publication Date Title
TWI222025B (en) Method and apparatus for dynamically allocating and deallocating processors in a logical partitioned data processing system
CN109857445A (en) Storage system and control software layout method
US9444678B2 (en) Automatic cloud-based disaster recovery system including modifying a copy command based on a copy time threshold
CN106446159B (en) A kind of method of storage file, the first virtual machine and name node
CN108073656A (en) A kind of method of data synchronization and relevant device
WO2018107772A1 (en) Method, device and apparatus for processing write request
CN105242872B (en) A kind of shared memory systems of Virtual cluster
CN110045912A (en) Data processing method and device
JP2005528684A5 (en)
CN110377395A (en) A kind of Pod moving method in Kubernetes cluster
JP4516322B2 (en) A computer system having a shared exclusive control method between sites having a storage system shared by a plurality of host devices
EP3206128A1 (en) Data storage method, data storage apparatus, and storage device
CN108292235A (en) Use the Network Attached Storage of selective resource migration
Moniz et al. Blotter: Low latency transactions for geo-replicated storage
CN105468727A (en) Zookeeper based method for realizing MySQL strong-consistency copy
CN107111530B (en) A kind of disaster recovery method, system and device
US20120259961A1 (en) System of managing remote resources
CN104937565B (en) Address realm transmission from first node to section point
CN105357042A (en) High-availability cluster system, master node and slave node
JP2023541298A (en) Transaction processing methods, systems, devices, equipment, and programs
CN110457261A (en) Data access method, device and server
CN110119308B (en) System for managing large-scale container applications
JP2014067357A (en) Data transfer device
TWI226549B (en) High-performance lock management for flash copy in n-way shared storage systems
US11533391B2 (en) State replication, allocation and failover in stream processing

Legal Events

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