WO2019091324A1 - 数据同步方法、装置以及电子设备 - Google Patents

数据同步方法、装置以及电子设备 Download PDF

Info

Publication number
WO2019091324A1
WO2019091324A1 PCT/CN2018/113337 CN2018113337W WO2019091324A1 WO 2019091324 A1 WO2019091324 A1 WO 2019091324A1 CN 2018113337 W CN2018113337 W CN 2018113337W WO 2019091324 A1 WO2019091324 A1 WO 2019091324A1
Authority
WO
WIPO (PCT)
Prior art keywords
log
data
storage space
data storage
new cluster
Prior art date
Application number
PCT/CN2018/113337
Other languages
English (en)
French (fr)
Inventor
唐治洋
卢毅军
陶云峰
Original Assignee
阿里巴巴集团控股有限公司
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 阿里巴巴集团控股有限公司 filed Critical 阿里巴巴集团控股有限公司
Publication of WO2019091324A1 publication Critical patent/WO2019091324A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/1805Append-only file systems, e.g. using logs or journals to store data
    • G06F16/1815Journaling file systems
    • 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

Definitions

  • the present application relates to the field of data synchronization technologies, and in particular, to a data synchronization method.
  • the present application relates to a data synchronization device, another data synchronization method and device, and two types of electronic devices.
  • Multi-screen interaction refers to the transmission, analysis, display, control, etc. of multimedia (audio, video, picture) content on different multimedia terminal devices (such as between common mobile phones and TVs) through a wireless network connection.
  • a series of operations can display the same content on different terminal devices and realize content intercommunication between the terminals.
  • the Zab protocol defines three roles: Leader (Leader), Follower (Follower). ) and Observer (observer), all of which maintain a log (log) and snapshot (snapshot) locally.
  • the Leader directly sends the log that is more than the Follower; if there is a vacancy, the Leader sends its current snapshot. Go to follower/Observer and send the log generated during the snapshot transmission to follower/Observer to ensure that the new Follower/Observer data is consistent.
  • the log may be cleared during the snapshot generation process, resulting in a version between the snapshot and the log. There are vacancies that undermine data consistency.
  • the present application provides a data synchronization method to solve the defect that data consistency is destroyed in the prior art.
  • the present application further provides a data synchronization device, another data synchronization method and device, and two types of electronic devices.
  • the application provides a data synchronization method, including:
  • the notification log queue has a new cluster joined to the data synchronization
  • the read log is merged into the second data storage space.
  • the feature data stored in the first data storage space is synchronized into the second data storage space in the form of a data snapshot file.
  • the synchronizing the feature data stored in the first data storage space of the synchronized cluster to the second data storage space of the new cluster is implemented as follows:
  • a confirmation message is returned to the new cluster through the second data storage space.
  • the synchronizing the feature data stored in the first data storage space of the synchronized cluster into the second data storage space of the new cluster, and reading the log in the log queue by using the new cluster Implementing in a multi-threaded manner, and synchronizing feature data stored in the first data storage space into the second data storage space based on a first thread, and reading a log in the log queue based on a second thread .
  • the log queue is provided and maintained by the log submission system.
  • the notification log queue has a new cluster joined to the data synchronization, and is implemented as follows:
  • the log version corresponding to the log with the lowest log version in the log queue is read as the minimum log version according to the log version of the log in the log queue.
  • the log in the log queue is not allowed to be deleted.
  • the reading, by using the new cluster, the logs in the log queue is implemented as follows:
  • the log in the log queue is allowed to be deleted.
  • the log submission system provides an expired log confirmation interface for submitting an expired log, and when the expired log confirmation interface receives the expired log information submitted by the synchronized cluster, the expired log information is deleted according to the expired log information. An expired log in the log queue.
  • the log in the log queue is not allowed to be deleted, and the expiration log confirmation interface is not allowed to be called.
  • the log in the log queue is allowed to be deleted, including: the expired log confirmation interface is allowed to be called.
  • the initialization command includes a minimum log version; correspondingly, after the performing the snapshot request sub-step to the first data storage space according to the initialization instruction, and generating, according to the snapshot request, Before the snapshot data file of the feature data stored in the first data storage space is sent to the second data storage space sub-step, the following operations are performed:
  • Determining, according to the log version corresponding to the feature data stored in the first data storage space, whether the log version is lower than the minimum log version, and if not, performing the first data storage according to the snapshot request A snapshot data file of the feature data stored in the space, and the data snapshot file is sent to the second data storage space sub-step.
  • determining whether the log version corresponding to the feature data stored in the first data storage space is determined, determining whether the log version is lower than the minimum log version sub-step is YES, waiting for a preset time interval Then, returning to execute the log version corresponding to the feature data stored in the first data storage space, and determining whether the log version is lower than the minimum log version sub-step.
  • the second log version acquires a log set capable of covering the first log version and the second log version from the log queue, and merges the read log set into the second data storage space.
  • the log in the log queue is created according to the data change operation submitted by the node in the synchronized cluster, and the current data change operation is recorded in the created log and added to the log queue.
  • the merging the read log into the second data storage space is implemented as follows:
  • the data change is applied to the second data storage space based on the data change involved in the data change operation recorded in the read log.
  • the data storage space provides snapshot data file storage by using any one of the following implementations: a non-relational database and a distributed database.
  • the application also provides a data synchronization device, including:
  • the new cluster notification unit is configured to notify the log queue that a new cluster joins the data synchronization
  • a data synchronization unit configured to synchronize feature data stored in the first data storage space of the synchronized cluster into a second data storage space of the new cluster, and read a log in the log queue by using the new cluster;
  • a log merging unit configured to merge the read log into the second data storage space.
  • the application additionally provides a data synchronization method, including:
  • the application additionally provides a data synchronization device, including:
  • a registration request sending unit configured to send a registration request to the log submission system
  • a minimum log version receiving unit configured to receive a minimum log version sent by the log submission system
  • An initialization instruction issuing unit configured to send an initialization instruction to the data storage space based on the minimum log version
  • a log read request sending unit configured to send a log read request to the log submission system
  • a log receiving application unit configured to receive a log returned by the log submission system based on the log read request, and apply the received log to the data storage space.
  • the application also provides an electronic device, including:
  • Memory Memory, and processor
  • the memory is for storing computer executable instructions for executing the computer executable instructions:
  • the notification log queue has a new cluster joined to the data synchronization
  • the read log is merged into the second data storage space.
  • the application further provides an electronic device, including:
  • Memory Memory, and processor
  • the memory is for storing computer executable instructions for executing the computer executable instructions:
  • the data synchronization method provided by the present application notifies the log queue that a new cluster joins the data synchronization; synchronizes the feature data stored in the first data storage space of the synchronized cluster to the second data storage space of the new cluster, and passes The new cluster reads the logs in the log queue; merges the read logs into the second data storage space.
  • the data synchronization method for the new cluster newly joined for data synchronization, notifying the log queue that the new cluster joins data synchronization, according to the feature data stored in the first data storage space of the synchronized cluster, And synchronizing the feature data stored in the first data storage space into the second data storage space of the new cluster, so that the data in the second data storage space is consistent with the feature data stored in the first data storage space; Reading the log in the log queue, and further merging the read log in the log queue into the second data storage space, so that the new cluster and the synchronized cluster and The data of the log queue is consistent as a whole to ensure data consistency.
  • FIG. 1 is a process flow diagram of an embodiment of a data synchronization method provided by the present application.
  • FIG. 2 is a schematic diagram of a data synchronization interaction manner provided by the present application.
  • FIG. 3 is a schematic diagram of an embodiment of a data synchronization apparatus provided by the present application.
  • FIG. 4 is a process flow diagram of another embodiment of a data synchronization method provided by the present application.
  • FIG. 5 is a schematic diagram of another embodiment of a data synchronization apparatus provided by the present application.
  • FIG. 6 is a schematic diagram of an embodiment of an electronic device provided by the present application.
  • FIG. 7 is a schematic diagram of another embodiment of an electronic device provided by the present application.
  • the present application provides a data synchronization method, and the present application further provides a data synchronization device, another data synchronization method and device, and two types of electronic devices.
  • a data synchronization method and the present application further provides a data synchronization device, another data synchronization method and device, and two types of electronic devices.
  • the following is a detailed description of the embodiments of the embodiments provided herein, and the various steps of the method are explained.
  • the data synchronization method provided by the present application is implemented as follows:
  • FIG. 1 it is a flowchart of a data synchronization method embodiment provided by the present application.
  • FIG. 2 it is a schematic diagram of a data synchronization interaction manner provided by the present application.
  • step S101 the log queue is notified that a new cluster joins the data synchronization.
  • the cluster is composed of at least one node, where the node refers to a service boundary visible to the user, and provides data services for the user; further, several clusters may form a cluster set.
  • a snapshot and log separation architecture is adopted.
  • each cluster is separately configured with a corresponding feature data storage space, and the feature data may be a snapshot, or just a log index table, or a description file, such as Data storage space for storing the respective data snapshots and providing the full data snapshot function of the storage; for each data change operation of the user in the cluster, the data is recorded in the log, and the data change operation is also carried The data changes are applied to the data storage space of the cluster.
  • By providing a globally unique log queue all logs are added to the log queue.
  • the log queue can be used to clear expired logs from the log queue. Therefore, only the most recent log is temporarily stored in the log queue, not the full amount of logs.
  • the log queue ensures data consistency between the clusters: when a new log is submitted in the log queue, each cluster reads from the log queue. Take the newly submitted log and separately record the respective logs Recording data is changed according to the change operation of the data applied to the respective data memory space, so as to ensure data consistency between each other.
  • the log queue is provided and maintained by the log submission system, and at the same time, the data synchronization between the clusters is implemented on the basis of the global uniqueness of the log queue.
  • the log queue provided by the log submission system is globally unique, all global clusters submit data requests to the log submission system and convert them into logs to join the log queue, so once the data provided by the cluster If there are many users in the service, the number of logs in the log queue provided by the log submission system will be relatively large, and even a large number of logs will exist. The storage space occupied by these logs will be relatively large, in order to recycle the log submission. The storage space of the logs in the log queue provided by the system saves storage resources.
  • the log submission system can provide log queue abstraction externally.
  • the response provides an expired log confirmation interface for submitting expired logs on the API.
  • the expired log confirmation interface can delete the log that is no longer used in the log queue, and is implemented as follows: when the expired log confirmation interface receives the expired log information submitted by the synchronized cluster, The log information deletes the expiration in the log queue. Log.
  • the data storage space is used to provide storage of a full amount of data
  • the snapshot data file storage may be provided by any one of the following implementations: a non-relational database and a distributed database. It should be noted that the implementation of the data storage space is not limited to the non-relational database and the distributed database provided above, and may be implemented by other types of data, or by using other methods than the database to implement full data storage. .
  • the data storage space of the newly added new cluster is empty, and any synchronized cluster synchronization data from the cluster set needs to be synchronized to the newly added new cluster.
  • the newly added new cluster is consistent with the data of the synchronized cluster.
  • the new queue that is newly added to the log queue is notified to join the data synchronization, which can be implemented as follows:
  • the new cluster Frontend_1 sends a registration request to the log submission system, and the log submission system adds the new cluster Frontend_1 to the cluster list, and reads the lowest log version minLogVersion corresponding to the log with the lowest log version in the log queue, which will be the lowest.
  • the log version minLogVersion is sent to the new cluster Frontend_1.
  • the full amount of data represented by the data snapshot file tends to be relatively large, that is, the full amount of data stored in the data storage space of the synchronized cluster is relatively large, and may be generated during the process of generating the data snapshot file and transmitting the data snapshot file through the network.
  • the log in the log queue is disconnected from the data snapshot file. To prevent this from happening, after the log submission system receives the registration request sent by the new cluster, the log submits the log in the log queue maintained by the system. It is not allowed to be deleted. For example, the expiration log confirmation interface provided by the log submission system is set to not allow the called state, so that the log after receiving the registration request can be retained in the log queue.
  • Step S102 Synchronize the feature data stored in the first data storage space of the synchronized cluster into the second data storage space of the new cluster, and read the log in the log queue by using the new cluster.
  • This step performs two operations: synchronizing the feature data stored in the data storage space of the synchronized cluster into the data storage space of the new cluster, that is, the operation of synchronizing data from the synchronized cluster to the new cluster And an operation of reading a log in the log queue by the new cluster. These two operations are not executed in the order in which they can be executed first, and then another.
  • the synchronized cluster synchronization data may be sent from the synchronized cluster to the new cluster in the form of a data snapshot file, which is implemented as follows:
  • the data storage space of the new cluster sends a snapshot request to the data storage space of the synchronized cluster according to the initialization instruction
  • the data storage space of the new cluster sends an acknowledgement message to the new cluster.
  • the new cluster Frontend_1 sends an initialization instruction to the data storage space BulkStorage_1, and after receiving the initialization instruction, the data storage space BulkStorage_1 issues a snapshot request to the data storage space BulkStorage_0, and after receiving the snapshot request, the data storage space BulkStorage_0 gives A snapshot is taken of the currently stored full amount of data, a data snapshot file snapshot_0 containing the full amount of data is generated, and the data snapshot file snapshot_0 is sent to the data storage space BulkStorage_1, and an acknowledgement message is sent to the new cluster Frontend_1.
  • the reading, by the new cluster, the log in the log queue may be implemented by: sending, by the new cluster, a log read request to the log submission system; Logs in the log queue are sent to the new cluster.
  • the new cluster Frontend_1 sends a log read request Request for Log to the log submission system, and the log submission system sends a log (Send Log) in the log queue to the new cluster Frontend_1.
  • the logs in the log queue are not allowed to be deleted, but as time passes, the number of logs in the log queue increases continuously.
  • the log in the log queue is allowed to be deleted, for example, by changing the expired log confirmation interface from the above-mentioned not allowed to be invoked state to the allowed called state.
  • the expired log information submitted by the interface is confirmed by the expiration log to delete the expired log in the log queue, so as to prevent the log from accumulating in the log queue.
  • the new cluster determines whether the logs read by the new cluster are all merged into the data storage space of the new cluster, and if so, send a log read confirmation to the log submission system by using the new cluster. Message; if not, continue to read logs from the log queue until all logs in the log queue are read to the new cluster. Or, by determining whether the new cluster reads all the logs in the current log queue, and if so, determining whether the read logs are all merged into the data storage space of the new cluster, and if yes, passing the new The cluster sends a log read confirmation to the log submission system; if not, the log is continuously read from the log queue until all the logs in the log queue are read to the new cluster.
  • the log in the log queue is not allowed to be cleared, that is, the log in the log queue is from the current lowest log.
  • the version begins to be retained, but the feature data stored in the data storage space of the synchronized cluster corresponds to a log version smaller than the minimum log version.
  • the data snapshot file cannot be connected to the log read from the log queue, before the minimum log version is lost. a piece of data.
  • the minimum log version may be carried in the initialization instruction, and based on the above,
  • the data storage space of the new cluster is sent to the data storage space of the synchronized cluster according to the initialization instruction, and the data storage space storage feature of the synchronized cluster is generated according to the snapshot request.
  • the snapshot data file of the data is sent to the data storage space of the new cluster before the operation of the data storage space is performed, and the following log version determination operation is performed:
  • the synchronized cluster since the full amount of data represented by the data snapshot file tends to be relatively large, that is, the full amount of data stored in the data storage space of the synchronized cluster is relatively large, it takes a long time to generate the data snapshot file; In the process of the data snapshot file, the synchronized cluster reads the log from the log submission system, and applies the data change caused by the data change operation recorded in the read log to the data storage space. Therefore, in the process of generating the data snapshot file, there may be a log that is not read by the generated data snapshot file part of the data, and the part of the data continues to generate the data snapshot file after the update, resulting in The data included in the data snapshot file is inconsistent with the log version of the log. There are multiple versions of the log, which causes the data consistency of the new cluster and the synchronized cluster to be damaged. Here, the data consistency of the new cluster and the synchronized cluster may be prevented from being destroyed by the following data consistency judgment operation:
  • the data consistency with the synchronized cluster is destroyed, according to the first log version with the lowest log version of the log corresponding to the data included in the data snapshot file, and the second log version with the highest log version of the corresponding log.
  • the data snapshot file snapshot_0 contains 5 log versions corresponding to the log. According to the log version SnapVersion_1 with the lowest log version and the log version SnapVersion_5 with the highest log version, reading from the log queue can cover the log version SnapVersion_1. The log of this interval of the log version SnapVersion_5, and the read log is applied to the data storage space BulkStorage_1 of the new cluster Frontend_1.
  • the new data is received after the completion of synchronizing the data snapshot file from the synchronized cluster to the new cluster.
  • the log read from the log submission system is started to be merged into the data storage space of the new cluster; meanwhile, the new cluster is successfully registered in the log submission system.
  • the operation of reading the log from the log submission system is repeatedly performed, and after receiving the confirmation message sent by the data storage space of the new cluster, its own message mechanism guarantees that all the slaves can be The log submission system reads into the data storage space of the new cluster to which the log is applied.
  • the new cluster can provide data services externally like other synchronized clusters in the cluster set.
  • the generation and transmission of the data snapshot file takes a long time. Therefore, the new cluster needs to be sent according to the received data consistency storage operation based on the received data consistency judgment operation.
  • the confirmation message provides external data services.
  • the two operations performed in this step are not performed in the order, so that either operation can be performed first, and then another operation can be performed thereafter.
  • the two operations may also be performed in a multi-threaded manner: synchronizing feature data stored in the first data storage space into the second data storage space based on the first thread, And reading the log in the log queue based on the second thread can save data synchronization time to a certain extent, thereby further reducing the accumulation of logs in the log queue.
  • the new cluster Frontend_1 is executed in parallel in a two-threaded manner. One thread is used to synchronize the data snapshot file snapshot_0 from the data storage space BulkStorage_0 to the data storage space BulkStorage_1, and the other thread is used to read from the log submission system. Take the log.
  • Step S103 merging the read log into the second data storage space.
  • the step S102 synchronizes the feature data stored in the data storage space of the synchronized cluster into the data storage space of the new cluster, and reads the log in the log queue by using the new cluster, on the basis of
  • the read log is merged into the data storage space of the new cluster, so that the newly added new cluster in the cluster set maintains data consistency with the synchronized cluster in the cluster set.
  • the data change is applied to the second data storage space according to the data change involved in the data change operation recorded in the read log. For example, as shown in FIG. 2, the data change involved in the data change operation recorded by the read log is applied to the data storage space BulkStorage_1, so that the data of the data storage space BulkStorage_1 is consistent with the data of the data storage space BulkStorage_0.
  • the data synchronization method notifies the log queue that the new cluster joins data synchronization for the new cluster newly added to the cluster set, and stores the characteristics according to the data storage space of the synchronized cluster.
  • Data synchronizing the feature data stored in the data storage space of the synchronized cluster into the data storage space of the new cluster in the form of a data snapshot file, so that the newly added new cluster and the synchronized cluster data Consistent;
  • the log in the log queue is read from the log submission system, and the read log is further merged into the data storage space of the new cluster, that is, the read log is merged into the slave
  • the data snapshot file to which the synchronized cluster is synchronized so that the newly added new cluster maintains data consistency with the synchronized cluster and the log queue as a whole, and ensures data consistency.
  • a data synchronization device provided by the present application is implemented as follows:
  • a data synchronization method is provided.
  • the present application further provides a data synchronization device, which will be described below with reference to the accompanying drawings.
  • FIG. 3 a schematic diagram of an embodiment of a data synchronization apparatus provided by the present application is shown.
  • the device embodiment corresponds to the method embodiment provided above.
  • the device embodiments described below are merely illustrative.
  • the application provides a data synchronization device, including:
  • the new cluster notification unit 301 is configured to notify the log queue that a new cluster joins the data synchronization
  • the data synchronization unit 302 is configured to synchronize feature data stored in the first data storage space of the synchronized cluster into the second data storage space of the new cluster, and read the log in the log queue by using the new cluster. ;
  • the log merging unit 303 is configured to merge the read logs into the second data storage space.
  • the feature data stored in the first data storage space is synchronized into the second data storage space in the form of a data snapshot file.
  • the data synchronization unit 302 includes:
  • An initialization instruction sending subunit configured to send an initialization instruction to the second data storage space by using the new cluster
  • a snapshot request sending subunit configured to issue a snapshot request to the first data storage space according to the initialization instruction
  • a snapshot data file generating subunit configured to generate a snapshot data file of the feature data stored in the first data storage space according to the snapshot request, and send the data snapshot file to the second data storage space;
  • the confirmation message returns to the subunit for returning an acknowledgment message to the new cluster through the second data storage space.
  • the data synchronization unit 302 is implemented in a multi-thread manner, and synchronizes feature data stored in the first data storage space into the second data storage space based on the first thread, and is based on the second thread. Read the logs in the log queue.
  • the log queue is provided by the log submission system and is maintained; correspondingly, the new cluster notification unit 301 includes:
  • a registration request sending subunit configured to send a registration request to the log submission system by using the new cluster
  • a new cluster registration sub-unit configured to join the new cluster to a cluster list provided by the log submission system
  • the minimum log version read subunit is configured to read, according to the log version of the log in the log queue, a log version corresponding to the log with the lowest log version in the log queue, as the lowest log version;
  • the log in the log queue is not allowed to be deleted.
  • the data synchronization unit 302 includes:
  • a log read request sending subunit configured to send a log read request to the log submission system by using the new cluster
  • a log sending subunit configured to send the log in the log queue to the new cluster according to the log read request.
  • the data synchronization unit 302 includes:
  • the log determining subunit is configured to determine whether the new cluster reads all logs in the current log queue, and if yes, sends a log read confirmation message to the log submission system by using the new cluster.
  • the data synchronization device includes:
  • a first log determining unit configured to determine whether the read logs are all merged into the second data storage space, and if yes, send a log read confirmation message to the log submission system by using the new cluster
  • a second log determining unit configured to determine whether the new cluster reads all the logs in the current log queue, and if so, runs a third log determining unit, where the third log determining unit is configured to determine the read Whether the logs are all merged into the second data storage space, and if so, a log read confirmation message is sent to the log submission system by the new cluster.
  • the log in the log queue is allowed to be deleted.
  • the log submission system provides an expired log confirmation interface for submitting an expired log, and when the expired log confirmation interface receives the expired log information submitted by the synchronized cluster, the expired log information is deleted according to the expired log information. An expired log in the log queue.
  • the log in the log queue is not allowed to be deleted, including: the expired log confirms that the interface is not allowed to be called; correspondingly, the log in the log queue is allowed to be deleted, including: the expired log confirmation The interface is allowed to be called.
  • the initialization command includes a minimum log version; correspondingly, the data synchronization unit 302 includes:
  • a log version determining subunit configured to determine, according to a log version corresponding to the feature data stored in the first data storage space, whether the log version is lower than the minimum log version, and if not, running the snapshot data file generator unit.
  • the log version determining subunit is executed after waiting for a preset time interval.
  • the log version consistency determining unit configured to determine the data snapshot
  • the data included in the file corresponds to the log version of the log. If not, the log is read and merged; the log read and merge unit is configured to use the lowest log version of the log corresponding to the data included in the data snapshot file. a log version, and a second log version having the highest log version of the corresponding log, obtaining a log set capable of overwriting the first log version and the second log version from the log queue, and merging the read log set Going to the second data storage space.
  • the log in the log queue is created according to the data change operation submitted by the node in the synchronized cluster, and the current data change operation is recorded in the created log and added to the log queue.
  • the log merging unit 303 is specifically configured to apply the data change to the second data storage space according to the data change involved in the data change operation recorded by the read log.
  • the data storage space provides snapshot data file storage by using any one of the following implementations: a non-relational database and a distributed database.
  • a data synchronization method is provided.
  • the method implementation body is a log submission system.
  • the present application further provides another data synchronization method.
  • the method implementation body is a new cluster, and the two cooperate with each other. Description will be made in conjunction with the drawings. Referring to FIG. 4, which is a flowchart of a process of another data synchronization method provided by the present application. Referring to FIG. 2, a schematic diagram of a data synchronization interaction manner provided by the present application is shown.
  • Step S401 sending a registration request to the log submission system.
  • the data storage space of the newly added new cluster is empty, and any synchronized cluster synchronization data from the cluster set needs to be synchronized to the newly added new cluster.
  • the newly added new cluster is consistent with the data of the synchronized cluster.
  • the new cluster can also implement data synchronization based on the log submission system to keep its data synchronized with other data in the cluster set. An embodiment of the present application is described by using an implementation manner in which the new cluster synchronizes data from any one of the clusters in the cluster set.
  • the newly added The new cluster sends a registration request to the log submission system, and after receiving the registration request sent by the new cluster, the log submission system adds the new cluster to the cluster list provided by the log submission system, according to the The log version of the log in the log queue, the log version corresponding to the log with the lowest log version in the log queue is read as the lowest log version, and the minimum log version is sent to the new cluster.
  • the new cluster Frontend_1 sends a registration request to the log submission system, and the log submission system adds the new cluster Frontend_1 to the cluster list, and reads the lowest log version minLogVersion corresponding to the log with the lowest log version in the log queue.
  • the cluster Frontend_1 sends the lowest log version minLogVersion.
  • the full amount of data represented by the data snapshot file tends to be relatively large, that is, the full amount of data stored in the data storage space of the synchronized cluster is relatively large, and may be generated during the process of generating the data snapshot file and transmitting the data snapshot file through the network.
  • the log in the log queue is disconnected from the data snapshot file. To prevent this from happening, after the log submission system receives the registration request sent by the new cluster, the log submits the log in the log queue maintained by the system. It is not allowed to be deleted. For example, the expiration log confirmation interface provided by the log submission system is set to not allow the called state, so that the log after receiving the registration request can be retained in the log queue.
  • Step S402 receiving a minimum log version sent by the log submission system.
  • Step S403 issuing an initialization instruction to the data storage space based on the lowest log version.
  • the data storage space of the new cluster issues a snapshot request to the data storage space of the synchronized cluster according to the initialization instruction, and according to the snapshot request, Generating a snapshot data file of the feature data stored in the data storage space of the synchronized cluster, and sending the data snapshot file to a data storage space of the new cluster.
  • the data storage space of the new cluster is completed. A confirmation message will be sent to the new cluster.
  • the new cluster Frontend_1 sends an initialization instruction to the data storage space BulkStorage_1, and after receiving the initialization instruction, the data storage space BulkStorage_1 issues a snapshot request to the data storage space BulkStorage_0, and after receiving the snapshot request, the data storage space BulkStorage_0 gives A snapshot is taken of the currently stored full amount of data, a data snapshot file snapshot_0 containing the full amount of data is generated, and the data snapshot file snapshot_0 is sent to the data storage space BulkStorage_1, and an acknowledgement message is sent to the new cluster Frontend_1.
  • Step S404 sending a log read request to the log submission system.
  • Step S405 Receive a log returned by the log submission system based on the log read request, and apply the received log to the data storage space.
  • the log submission system sends a log (Send Log) in the log queue to the new cluster Frontend_1.
  • the logs in the log queue are not allowed to be deleted, but as time passes, the number of logs in the log queue increases continuously.
  • the log in the log queue is allowed to be deleted, for example, by changing the expired log confirmation interface from the above-mentioned not allowed to be invoked state to the allowed called state.
  • the expired log information submitted by the interface is confirmed by the expiration log to delete the expired log in the log queue, so as to prevent the log from accumulating in the log queue.
  • the above steps synchronize the feature data stored in the data storage space of the synchronized cluster into the data storage space of the new cluster, and read the log in the log queue by using the new cluster.
  • the read log is merged into the data storage space of the new cluster, so that the newly added new cluster in the cluster set maintains data consistency with the synchronized cluster in the cluster set.
  • the data change according to the data change operation recorded in the read log is applied to the data storage space of the new cluster.
  • the data change involved in the data change operation recorded by the read log is applied to the data storage space BulkStorage_1, so that the data of the data storage space BulkStorage_1 is consistent with the data of the data storage space BulkStorage_0.
  • Another data synchronization device provided by the present application is implemented as follows:
  • FIG. 5 a schematic diagram of another embodiment of a data synchronization apparatus provided by the present application is shown.
  • the device embodiment corresponds to the method embodiment provided above.
  • the device embodiments described below are merely illustrative.
  • the present application provides another data synchronization device, including:
  • a registration request sending unit configured to send a registration request to the log submission system
  • a minimum log version receiving unit configured to receive a minimum log version sent by the log submission system
  • An initialization instruction issuing unit configured to send an initialization instruction to the data storage space based on the minimum log version
  • a log read request sending unit configured to send a log read request to the log submission system
  • a log receiving application unit configured to receive a log returned by the log submission system based on the log read request, and apply the received log to the data storage space.
  • An electronic device implementation provided by the present application is as follows:
  • a data synchronization method is provided.
  • the present application further provides an electronic device for implementing the data synchronization method, which will be described below with reference to the accompanying drawings.
  • FIG. 6 a schematic diagram of an electronic device provided by this embodiment is shown.
  • the electronic device provided by the present application is used to implement the data synchronization method provided by the present application.
  • This embodiment corresponds to the data synchronization method embodiment provided above.
  • For the content of the embodiment refer to the data synchronization method provided above.
  • Corresponding description of the embodiment. The embodiments described below are merely illustrative.
  • the application provides an electronic device, including:
  • the memory 601 is configured to store computer executable instructions, and the processor 602 is configured to execute the computer executable instructions:
  • the notification log queue has a new cluster joined to the data synchronization
  • the read log is merged into the second data storage space.
  • the feature data stored in the first data storage space is synchronized into the second data storage space in the form of a data snapshot file.
  • the synchronizing the feature data stored in the first data storage space of the synchronized cluster to the second data storage space of the new cluster is implemented as follows:
  • a confirmation message is returned to the new cluster through the second data storage space.
  • the feature data stored in the first data storage space of the synchronized cluster is synchronized into the second data storage space of the new cluster, and the log instruction in the log queue is read by the new cluster.
  • the log instruction in the log queue is read by the new cluster.
  • the log queue is provided and maintained by the log submission system.
  • the notification log queue has a new cluster joined to the data synchronization, and is implemented as follows:
  • the log version corresponding to the log with the lowest log version in the log queue is read as the minimum log version according to the log version of the log in the log queue.
  • the log in the log queue is not allowed to be deleted.
  • the reading, by using the new cluster, the logs in the log queue is implemented as follows:
  • the processor 602 is further configured to execute the following computer executable instructions:
  • the processor 602 is further configured to execute the following computer executable instructions:
  • the log in the log queue is allowed to be deleted.
  • the log submission system provides an expired log confirmation interface for submitting an expired log, and when the expired log confirmation interface receives the expired log information submitted by the synchronized cluster, the expired log information is deleted according to the expired log information. An expired log in the log queue.
  • the log in the log queue is not allowed to be deleted, including: the expired log confirms that the interface is not allowed to be called; correspondingly, the log in the log queue is allowed to be deleted, including: the expired log confirmation The interface is allowed to be called.
  • the initialization instruction includes a minimum log version; correspondingly, after the issuing the snapshot request instruction to the first data storage space according to the initialization instruction, and generating, according to the snapshot request, generating the
  • the processor 602 is further configured to execute the following computer executable instructions: a snapshot data file of the feature data stored in the data storage space and before the data snapshot file is sent to the second data storage space instruction:
  • determining whether the log version is lower than the execution result of the minimum log version instruction is yes, waiting for a preset time interval And returning to execute the log version corresponding to the feature data stored in the first data storage space, and determining whether the log version is lower than the minimum log version instruction.
  • the processor 602 is further configured to execute the following computer executable instructions:
  • the second log version acquires a log set capable of covering the first log version and the second log version from the log queue, and merges the read log set into the second data storage space.
  • the log in the log queue is created according to the data change operation submitted by the node in the synchronized cluster, and the current data change operation is recorded in the created log and added to the log queue.
  • the merging the read log into the second data storage space is implemented by: changing data according to the data change involved in the data change operation recorded by the read log, and applying the data change Going to the second data storage space.
  • the data storage space provides snapshot data file storage by using any one of the following implementations: a non-relational database and a distributed database.
  • An electronic device implementation provided by the present application is as follows:
  • a data synchronization method is provided.
  • the present application further provides an electronic device for implementing the data synchronization method, which will be described below with reference to the accompanying drawings.
  • FIG. 7 a schematic diagram of an electronic device provided by this embodiment is shown.
  • the electronic device provided by the present application is used to implement the data synchronization method provided by the present application.
  • This embodiment corresponds to the data synchronization method embodiment provided above.
  • For the content of the embodiment refer to the data synchronization method provided above.
  • Corresponding description of the embodiment. The embodiments described below are merely illustrative.
  • the application provides an electronic device, including:
  • the memory 701 is configured to store computer executable instructions
  • the processor 7402 is configured to execute the computer executable instructions:
  • a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
  • processors CPUs
  • input/output interfaces network interfaces
  • memory volatile and non-volatile memory
  • the memory may include non-persistent memory, random access memory (RAM), and/or non-volatile memory in a computer readable medium, such as read only memory (ROM) or flash memory.
  • RAM random access memory
  • ROM read only memory
  • Memory is an example of a computer readable medium.
  • Computer readable media includes both permanent and non-persistent, removable and non-removable media.
  • Information storage can be implemented by any method or technology.
  • the information can be computer readable instructions, data structures, modules of programs, or other data.
  • Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory. (ROM), electrically erasable programmable read only memory (EEPROM), flash memory or other memory technology, compact disk read only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, Magnetic tape cartridges, magnetic tape storage or other magnetic storage devices or any other non-transportable media can be used to store information that can be accessed by a computing device.
  • computer readable media does not include non-transitory computer readable media, such as modulated data signals and carrier waves.
  • embodiments of the present application can be provided as a method, system, or computer program product.
  • the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment in combination of software and hardware.
  • the application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Debugging And Monitoring (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本申请公开了一种数据同步方法、装置以及电子设备,所述方法包括:通知日志队列有新集群加入数据同步;将已同步集群的第一数据存储空间存储的特征数据同步到所述新集群的第二数据存储空间中,以及通过所述新集群读取所述日志队列中的日志;将读取到的日志合并到所述第二数据存储空间中。所述数据同步方法,针对新加入数据同步的新集群,将已同步集群的数据同步到新集群,使新集群与已同步集群的数据保持一致;此外,读取日志队列中的日志合并到新集群,从而使新集群与已同步集群以及日志队列的数据在整体上保持一致,确保数据一致性。

Description

数据同步方法、装置以及电子设备
本申请要求2017年11月07日递交的申请号为201711083268.6、发明名称为“数据同步方法、装置以及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及数据同步技术领域,具体涉及一种数据同步方法。本申请同时涉及一种数据同步装置,另一种数据同步方法以及装置,以及两种电子设备。
背景技术
多屏互动是指通过无线网络连接,在不同的多媒体终端设备上(如常见的手机与电视之间等等),可进行多媒体(音频,视频,图片)内容的传输、解析、展示、控制等一系列操作,可以在不同终端设备显示同样的内容,并实现各个终端之间的内容互通。
随着云计算的发展,越来越多的业务需求要求一种更强大的用于数据存储的数据中心,并且要求数据中心具有较强的高可用性,能够最大程度的减少甚至消除系统故障对正常业务的影响,因此,建立多个数据中心实现业务容灾成为必然选择,这些数据中心之间的数据同步成为实现业务高可用性至关重要的一环。
目前有许多方案着眼于实现分布式场景下的数据一致性,比如ZAB协议(Zookeeper Atomic Broadcast,Zookeeper原子消息广播协议)中,Zab协议定义了三种角色:Leader(领导者)、Follower(追随者)和Observer(观察者),三者都在本地维护了一个log(日志)和snapshot(快照)。当Quorum(集群)当中有新的Follower/Observer加入时,会向当前的Leader提交其当前snapshot的版本,等待Leader返回最近一段时间产生的log;Leader会比较自身log最低的版本与Follower/Observer提交的snapshot的版本,以判断Follower/Observer与自身log之间是否存在空缺,如果不存在空缺,则Leader直接发送自己相比较于Follower多出的log;如果存在空缺,则Leader将自身当前的snapshot发送至Follower/Observer,再将snapshot发送期间产生的log发给Follower/Observer,从而确保新加入Follower/Observer数据满足一致性。然而,在log与snapshot分离的场景下,由于log通常更新的比较快,而snapshot的生成却比较慢,因此,在snapshot生成的过程中可能会出现log被清除,导致snapshot与log之间的版本存在空缺,从而破坏了数据一致性。
发明内容
本申请提供一种数据同步方法,以解决现有技术存在的数据一致性被破坏的缺陷。本申请另外提供一种数据同步装置,另一种数据同步方法以及装置,以及两种电子设备。
本申请提供一种数据同步方法,包括:
通知日志队列有新集群加入数据同步;
将已同步集群的第一数据存储空间存储的特征数据同步到所述新集群的第二数据存储空间中,以及通过所述新集群读取所述日志队列中的日志;
将读取到的日志合并到所述第二数据存储空间中。
可选的,所述第一数据存储空间存储的特征数据以数据快照文件的形式同步到所述第二数据存储空间中。
可选的,所述将已同步集群的第一数据存储空间存储的特征数据同步到所述新集群的第二数据存储空间中,采用如下方式实现:
通过所述新集群向所述第二数据存储空间发送初始化指令;
根据所述初始化指令向所述第一数据存储空间发出快照请求;
根据所述快照请求,生成所述第一数据存储空间存储的特征数据的快照数据文件,并将所述数据快照文件发送至所述第二数据存储空间;
通过所述第二数据存储空间向所述新集群返回确认消息。
可选的,所述将已同步集群的第一数据存储空间存储的特征数据同步到所述新集群的第二数据存储空间中,以及通过所述新集群读取所述日志队列中的日志步骤,采用多线程方式实现,并且,基于第一线程将所述第一数据存储空间存储的特征数据同步到所述第二数据存储空间中,以及基于第二线程读取所述日志队列中的日志。
可选的,所述日志队列由日志提交系统提供并进行维护;相应的,所述通知日志队列有新集群加入数据同步,采用如下方式实现:
通过所述新集群向所述日志提交系统发送注册请求;
将所述新集群加入所述日志提交系统提供的集群列表中;
根据所述日志队列中日志的日志版本,读取所述日志队列中日志版本最低的日志对应的日志版本,作为最低日志版本;
将所述最低日志版本发送至所述新集群。
可选的,所述日志提交系统接收到所述注册请求之后,所述日志队列中的日志不允 许被删除。
可选的,所述通过所述新集群读取所述日志队列中的日志,采用如下方式实现:
通过所述新集群向所述日志提交系统发送日志读取请求;
根据所述日志读取请求将所述日志队列中的日志发送至所述新集群。
可选的,所述根据所述日志读取请求将所述日志队列中的日志发送至所述新集群子步骤执行后,执行下述操作:
判断所述新集群是否读取到当前所述日志队列中所有日志,若是,通过所述新集群向所述日志提交系统发送日志读取确认消息。
可选的,所述将读取到的日志合并到所述第二数据存储空间中步骤执行后,执行下述步骤:
判断读取到的日志是否全部合并到所述第二数据存储空间中,若是,通过所述新集群向所述日志提交系统发送日志读取确认消息;
或者,判断所述新集群是否读取到当前所述日志队列中所有日志,若是,判断读取到的日志是否全部合并到所述第二数据存储空间中,若是,通过所述新集群向所述日志提交系统发送日志读取确认消息。
可选的,所述日志提交系统接收到所述日志读取确认消息之后,所述日志队列中的日志允许被删除。
可选的,所述日志提交系统提供用于提交过期日志的过期日志确认接口,当通过所述过期日志确认接口接收到所述已同步集群提交的过期日志信息时,根据所述过期日志信息删除所述日志队列中的过期日志。
可选的,所述日志队列中的日志不允许被删除,包括:所述过期日志确认接口不允许被调用;
相应的,所述日志队列中的日志允许被删除,包括:所述过期日志确认接口允许被调用。
可选的,所述初始化指令中包含最低日志版本;相应的,所述根据所述初始化指令向所述第一数据存储空间发出快照请求子步骤执行后,且根据所述快照请求,生成所述第一数据存储空间存储的特征数据的快照数据文件,并将所述数据快照文件发送至所述第二数据存储空间子步骤执行前,执行下述操作:
根据所述第一数据存储空间存储的特征数据对应的日志版本,判断所述日志版本是否低于所述最低日志版本,若否,执行所述根据所述快照请求,生成所述第一数据存储 空间存储的特征数据的快照数据文件,并将所述数据快照文件发送至所述第二数据存储空间子步骤。
可选的,若所述根据所述第一数据存储空间存储的特征数据对应的日志版本,判断所述日志版本是否低于所述最低日志版本子步骤的判断结果为是,等待预设时间间隔后,返回执行所述根据所述第一数据存储空间存储的特征数据对应的日志版本,判断所述日志版本是否低于所述最低日志版本子步骤。
可选的,所述第一数据存储空间存储的特征数据同步到所述第二数据存储空间之后,执行下述操作:
判断所述数据快照文件所包含数据对应日志的日志版本是否一致,若否,根据所述数据快照文件所包含数据对应日志的日志版本最低的第一日志版本,以及对应日志的日志版本最高的第二日志版本,从所述日志队列获取能够覆盖所述第一日志版本和所述第二日志版本的日志集合,并将读取到的日志集合合并到所述第二数据存储空间中。
可选的,所述日志队列中日志根据所述已同步集群中节点提交的数据变更操作创建,并在创建的日志中记录当前数据变更操作后加入所述日志队列。
可选的,所述将读取到的日志合并到所述第二数据存储空间中,采用如下方式实现:
根据读取到的日志所记录数据变更操作涉及的数据变更,将所述数据变更应用到所述第二数据存储空间中。
可选的,所述数据存储空间采用下述任意一种实现方式提供快照数据文件存储:非关系型数据库和分布式数据库。
本申请还提供一种数据同步装置,包括:
新集群通知单元,用于通知日志队列有新集群加入数据同步;
数据同步单元,用于将已同步集群的第一数据存储空间存储的特征数据同步到所述新集群的第二数据存储空间中,以及通过所述新集群读取所述日志队列中的日志;
日志合并单元,用于将读取到的日志合并到所述第二数据存储空间中。
本申请另外提供一种数据同步方法,包括:
向日志提交系统发送注册请求;
接收所述日志提交系统发送的最低日志版本;
基于所述最低日志版本向数据存储空间下发初始化指令;
向所述日志提交系统发送日志读取请求;
接收所述日志提交系统基于所述日志读取请求返回的日志,并将接收到的日志应用 到所述数据存储空间中。
本申请另外提供一种数据同步装置,包括:
注册请求发送单元,用于向日志提交系统发送注册请求;
最低日志版本接收单元,用于接收所述日志提交系统发送的最低日志版本;
初始化指令下发单元,用于基于所述最低日志版本向数据存储空间下发初始化指令;
日志读取请求发送单元,用于向所述日志提交系统发送日志读取请求;
日志接收应用单元,用于接收所述日志提交系统基于所述日志读取请求返回的日志,并将接收到的日志应用到所述数据存储空间中。
本申请还提供一种电子设备,包括:
存储器,以及处理器;
所述存储器用于存储计算机可执行指令,所述处理器用于执行所述计算机可执行指令:
通知日志队列有新集群加入数据同步;
将已同步集群的第一数据存储空间存储的特征数据同步到所述新集群的第二数据存储空间中,以及通过所述新集群读取所述日志队列中的日志;
将读取到的日志合并到所述第二数据存储空间中。
本申请另外提供一种电子设备,包括:
存储器,以及处理器;
所述存储器用于存储计算机可执行指令,所述处理器用于执行所述计算机可执行指令:
向日志提交系统发送注册请求;
接收所述日志提交系统发送的最低日志版本;
基于所述最低日志版本向数据存储空间下发初始化指令;
向所述日志提交系统发送日志读取请求;
接收所述日志提交系统基于所述日志读取请求返回的日志,并将接收到的日志应用到所述数据存储空间中。
本申请提供的所述数据同步方法,通知日志队列有新集群加入数据同步;将已同步集群的第一数据存储空间存储的特征数据同步到所述新集群的第二数据存储空间中,以及通过所述新集群读取所述日志队列中的日志;将读取到的日志合并到所述第二数据存 储空间中。
本申请提供的所述数据同步方法,针对新加入数据同步的所述新集群,通知日志队列所述新集群加入数据同步,根据已同步集群的第一数据存储空间存储的特征数据,将所述第一数据存储空间存储的特征数据同步到所述新集群的第二数据存储空间中,使所述第二数据存储空间中数据与所述第一数据存储空间存储的特征数据保持一致;此外,读取所述日志队列中的日志,并进一步将所述读取到的所述日志队列中的日志合并到所述第二数据存储空间中,从而使所述新集群与所述已同步集群以及所述日志队列的数据在整体上保持一致,确保数据一致性。
附图说明
图1是本申请提供的一种数据同步方法实施例的处理流程图;
图2是本申请提供的一种数据同步交互方式的示意图;
图3是本申请提供的一种数据同步装置实施例的示意图;
图4是本申请提供的另一种数据同步方法实施例的处理流程图;
图5是本申请提供的另一种数据同步装置实施例的示意图;
图6是本申请提供的一种电子设备实施例的示意图;
图7是本申请提供的另一种电子设备实施例的示意图。
具体实施方式
在下面的描述中阐述了很多具体细节以便于充分理解本申请。但是本申请能够以很多不同于在此描述的其它方式来实施,本领域技术人员可以在不违背本申请内涵的情况下做类似推广,因此本申请不受下面公开的具体实施的限制。
本申请提供一种数据同步方法,本申请另外提供一种数据同步装置,另一种数据同步方法以及装置,以及两种电子设备。以下分别结合本申请提供的实施例的附图逐一进行详细说明,并且对方法的各个步骤进行说明。
本申请提供的数据同步方法实施例如下:
参照图1,其示出了本申请提供的一种数据同步方法实施例的处理流程图,参照图2,其示出了本申请提供的一种数据同步交互方式的示意图。
步骤S101,通知日志队列有新集群加入数据同步。
本申请实施例中,集群由至少一个节点组成,节点是指用户可见的服务边界,为用 户提供数据服务;进一步,若干个集群可以组成集群集合。采用快照和日志分离的架构,在这种架构下,每一个集群分别设置与各自相关特征数据存储空间,所述特征数据可以是快照,或者仅仅是一个日志索引表,或者是一个描述文件,比如用于存储各自的数据快照以及提供其存储的全量数据快照功能的数据存储空间;针对用户在集群中节点的每一次数据变更操作,都会被记录到日志中,同时也会将数据变更操作所带来的数据变更应用到集群的数据存储空间中,通过提供全局唯一的日志队列,所有的日志均被会被加入日志队列当中(但日志队列通过自身机制可以实现将过期日志从日志队列中清除,因此,日志队列中只暂存最近的日志,并不是全量日志),通过日志队列确保集群之间的数据一致性:当日志队列中有新的日志提交时,每一个集群都会从日志队列中读取新提交的日志,并分别将各自读取到的日志所记录数据变更操作涉及的数据变更应用到各自的数据存储空间中,从而保证相互之间的数据一致性。
同时,在这种架构下,不会因为集群集合中集群数量过多导致的性能瓶颈而影响集群集合的水平扩展,因此,有必要提供针对集群集合中新加入集群(新集群)的数据同步机制:根据任意一个已同步集群的数据存储空间(第一数据存储空间)当前存储的全量数据生成一个数据快照文件,然后将数据快照文件通过网络异步复制到新集群的数据存储空间(第二数据存储空间),最后利用数据快照文件来初始化新集群的数据存储空间,使新集群与集群集合中已同步集群保持同步。但是,由于数据快照文件代表的是全量数据,往往比较大,因此,不管是生成数据快照文件,还是通过网络传输数据快照文件的时候,需要花费的时间都比较长,在此期间,日志队列中不断有新的日志加入,同时过期的日志被清除,这会导致数据快照文件成功同步到新集群的数据存储空间后,日志队列中的日志早已与数据快照文件脱节,即导致快照与日志脱节,数据一致性无法得到满足。本申请提供的所述数据同步方法,能够解决所述数据一致性无法满足的问题。
本申请实施例中,所述日志队列由日志提交系统提供并进行维护,同时,由于集群之间的数据同步是在所述日志队列全局唯一的基础上实现的。同时,由于所述日志提交系统提供的日志队列具有全局唯一性,全局所有集群都会将数据请求提交至所述日志提交系统,并转换为日志加入所述日志队列中,因此,一旦集群提供的数据服务的用户比较多,则所述日志提交系统提供的日志队列的日志数目也会比较大,甚至会存在海量的日志,存储这些日志占用的存储空间也会比较大,为了循环利用所述日志提交系统提供的日志队列中日志的存储空间,节省存储资源,在实际应用中,所述日志提交系统可对外提供日志队列抽象,反应在API上对外提供用于提交过期日志的过期日志确认接口, 利用所述过期日志确认接口能够将所述日志队列中不再使用的日志删除,具体实现如下:当通过所述过期日志确认接口接收到所述已同步集群提交的过期日志信息时,根据所述过期日志信息删除所述日志队列中的过期日志。
在具体实施时,所述数据存储空间用于提供全量数据的存储,具体可采用下述任意一种实现方式提供快照数据文件存储:非关系型数据库和分布式数据库。需要指出的是,所述数据存储空间的实现并不限于上述提供的非关系型数据库和分布式数据库,还可以采用其他类型的数据实现,或者采用数据库之外的其他方式来实现全量数据的存储。
本申请实施例中,当集群集合中有新集群加入时,新加入的所述新集群的数据存储空间为空,需要从集群集合中任意一个已同步集群同步数据至新加入的所述新集群,使新加入的所述新集群与所述已同步集群的数据保持一致。本步骤中,当集群集合中有新集群加入时,通知所述日志队列当前新加入的所述新集群加入数据同步,具体可采用如下方式实现:
1)通过所述新集群向所述日志提交系统发送注册请求;
2)将所述新集群加入所述日志提交系统提供的集群列表中;
3)根据所述日志队列中日志的日志版本,读取所述日志队列中日志版本最低的日志对应的日志版本,作为最低日志版本;
4)将所述最低日志版本发送至所述新集群。
例如,如图2所示,新集群Frontend_1向日志提交系统发送注册请求,日志提交系统将新集群Frontend_1加入集群列表中,读取日志队列中日志版本最低的日志对应的最低日志版本minLogVersion,将最低日志版本minLogVersion发送至新集群Frontend_1。
如上所述,由于数据快照文件代表的全量数据往往比较大,即:已同步集群的数据存储空间存储的全量数据比较大,在生成数据快照文件和通过网络传输数据快照文件的过程中,可能会导致日志队列中的日志与数据快照文件脱节;为了避免这种情况的发生,当所述日志提交系统接收到所述新集群发送的注册请求之后,所述日志提交系统维护的日志队列中的日志不允许被删除,比如通过将所述日志提交系统对外提供的过期日志确认接口设置为不允许被调用状态,从而使接收到注册请求之后的日志得以在所述日志队列中保留。
步骤S102,将已同步集群的第一数据存储空间存储的特征数据同步到所述新集群的第二数据存储空间中,以及通过所述新集群读取所述日志队列中的日志。
本步骤执行两个操作:将所述已同步集群的数据存储空间存储的特征数据同步到所述新集群的数据存储空间中,即:从所述已同步集群同步数据至所述新集群的操作,以及通过所述新集群读取所述日志队列中的日志的操作。这两个操作并没有执行的先后顺序,在执行时可先执行任意一个操作,此后执行另一操作。在具体实施时,从所述已同步集群同步数据至所述新集群的过程中,可以数据快照文件的形式从所述已同步集群同步数据至所述新集群,具体采用如下方式实现:
1)所述新集群向其自身的数据存储空间发送初始化指令;
2)所述新集群的数据存储空间根据所述初始化指令向所述已同步集群的数据存储空间发出快照请求;
3)根据所述快照请求,生成所述已同步集群的数据存储空间存储的特征数据的快照数据文件,并将所述数据快照文件发送至所述新集群的数据存储空间;
4)所述新集群的数据存储空间向所述新集群发送确认消息。
例如,如图2所示,新集群Frontend_1向数据存储空间BulkStorage_1发送初始化指令,数据存储空间BulkStorage_1接收到初始化指令后,向数据存储空间BulkStorage_0发出快照请求,数据存储空间BulkStorage_0接收到快照请求后,给当前存储的全量数据打一个快照,生成包含全量数据的数据快照文件snapshot_0,并将数据快照文件snapshot_0发送至数据存储空间BulkStorage_1,并向新集群Frontend_1发送确认消息。
所述通过所述新集群读取所述日志队列中的日志,可采用如下方式实现:通过所述新集群向所述日志提交系统发送日志读取请求;根据所述日志读取请求将所述日志队列中的日志发送至所述新集群。例如,如图2所示,新集群Frontend_1向日志提交系统发送日志读取请求Request for Log,日志提交系统向新集群Frontend_1发送日志队列中的日志(Send Log)。
如上所述,所述日志提交系统接收到所述新集群发送的注册请求之后,所述日志队列中的日志不允许被删除,但随着时间的推移,所述日志队列中日志数量不断增加,为了避免所述日志队列中日志的大量堆积,有必要在将所述日志队列中日志同步到所述新集群的基础上,恢复利用所述过期日志确认接口清除所述日志队列中过期日志这一机制。在具体实施时,可通过判断所述新集群是否读取到当前所述日志队列中所有日志,若是,通过所述新集群向所述日志提交系统发送日志读取确认消息;若否,继续从所述日志队列中读取日志,直至所述日志队列中的日志全部读取到所述新集群。所述日志提 交系统接收到所述日志读取确认消息之后,所述日志队列中的日志允许被删除,比如通过将所述过期日志确认接口从上述不允许被调用状态变更为允许被调用状态,根据过期日志确认接口提交的过期日志信息删除所述日志队列中的过期日志,从而避免日志在所述日志队列中大量堆积。
除此之外,还可以通过判断所述新集群读取到的日志是否全部合并到所述新集群的数据存储空间中,若是,通过所述新集群向所述日志提交系统发送日志读取确认消息;若否,继续从所述日志队列中读取日志,直至所述日志队列中的日志全部读取到所述新集群。或者,通过判断所述新集群是否读取到当前所述日志队列中所有日志,若是,判断读取到的日志是否全部合并到所述新集群的数据存储空间中,如果是,通过所述新集群向所述日志提交系统发送日志读取确认消;如果否,继续从所述日志队列中读取日志,直至所述日志队列中的日志全部读取到所述新集群。
在实际应用中,可能会出现如下情形:所述新集群向所述日志提交系统发送注册请求后,所述日志队列中日志不允许被清除,即:所述日志队列中的日志从当前最低日志版本开始得以保留,但所述已同步集群的数据存储空间存储的特征数据对应的日志版本小于所述最低日志版本。在这种情形下,如果从所述已同步集群同步数据至所述新集群,会导致所述数据快照文件无法与从所述日志队列读取到的日志衔接,丢失了所述最低日志版本之前的一段数据。因此,为了避免数据同步过程中的数据丢失,所述新集群向其自身的数据存储空间发送初始化指令时,可在所述初始化指令中携带所述最低日志版本,在此基础上,在上述所述新集群的数据存储空间根据所述初始化指令向所述已同步集群的数据存储空间发出快照请求操作执行后,并且上述根据所述快照请求,生成所述已同步集群的数据存储空间存储的特征数据的快照数据文件,并将所述数据快照文件发送至所述新集群的数据存储空间操作执行前,执行如下日志版本判断操作:
根据所述已同步集群的数据存储空间存储的特征数据对应的日志版本,判断所述日志版本是否低于所述最低日志版本,若是,等待预设时间间隔后,再次执行所述日志版本判断操作,判断所述已同步集群的数据存储空间存储的特征数据对应的日志版本是否低于所述最低日志版本;若否,则表明不存在数据丢失,继续执行上述根据所述快照请求,生成所述已同步集群的数据存储空间存储的特征数据的快照数据文件,并将所述数据快照文件发送至所述新集群的数据存储空间操作即可。
此外,由于所述由于数据快照文件代表的全量数据往往比较大,即:已同步集群的数据存储空间存储的全量数据比较大,生成所述数据快照文件需要花费的时间较长;同 时,在生成所述数据快照文件的过程中,所述已同步集群会从所述日志提交系统读取日志,并将读取到的日志所记录的数据变更操作所带来的数据变更应用到数据存储空间中;因此,在生成所述数据快照文件的过程中,可能会有未被生成数据快照文件部分数据被读取到的日志所更新,并且该部分数据在更新后继续生成数据快照文件的操作,导致数据快照文件中包含的数据对应日志的日志版本不一致,存在多个日志版本,从而导致所述新集群与所述已同步集群二者的数据一致性遭到破坏。在此,可通过如下数据一致性判断操作来避免所述新集群与所述已同步集群二者的数据一致性遭到破坏:
判断所述数据快照文件所包含数据对应日志的日志版本是否一致,若是,则表明所述新集群与所述已同步集群二者数据保持一致,不作处理即可;若否,表明所述新集群与所述已同步集群二者的数据一致性遭到破坏,根据所述数据快照文件所包含数据对应日志的日志版本最低的第一日志版本,以及对应日志的日志版本最高的第二日志版本,从所述日志队列获取能够覆盖所述第一日志版本和所述第二日志版本的日志集合,并将读取到的日志集合合并到所述新集群的数据存储空间中。
例如,数据快照文件snapshot_0中包含的数据对应日志的日志版本有5个,根据日志版本最低的日志版本SnapVersion_1,以及日志版本最高的日志版本SnapVersion_5,从日志队列中读取能够覆盖从日志版本SnapVersion_1至日志版本SnapVersion_5的这一区间的日志,并将读取到的日志应用到新集群Frontend_1的数据存储空间BulkStorage_1中。
在理想的条件下,如果生成以及传输所述数据快照文件的过程是瞬时的,则在完成将所述数据快照文件从所述已同步集群同步到所述新集群之后,即接收到所述新集群的数据存储空间发送的确认消息之后,开始将从所述日志提交系统读取到的日志合并到所述新集群的数据存储空间中;同时,所述新集群在所述日志提交系统注册成功之后,会重复不断的执行从所述日志提交系统读取日志的操作,并且,在接收到所述新集群的数据存储空间发送的确认消息之后,其自身的消息机制会保证:能够将所有从所述日志提交系统读取到的日志应用到的所述新集群的数据存储空间中。因此,所述新集群在接收到其自身的数据存储空间发送的确认消息之后,可以像集群集合中的其他已同步集群一样对外提供数据服务。但一般而言,所述数据快照文件的生成以及传输需要花费较长的时间,因此,所述新集群需要在执行上述数据一致性判断操作的基础上,根据接收到的其自身数据存储空间发送的确认消息对外提供数据服务。
如上所述,本步骤执行的两个操作并没有执行先后顺序,因此可以先执行任意一个 操作,在此之后执行另一操作。除此之外,在实际应用中,还可以采用多线程方式来执行这两个操作:基于第一线程将所述第一数据存储空间存储的特征数据同步到所述第二数据存储空间中,以及基于第二线程读取所述日志队列中的日志,在一定程度上能够节省数据同步时间,从而进一步减少日志在所述日志队列中的堆积。例如,如图2所示,新集群Frontend_1采用双线程方式并行执行,其中一个线程用于将数据快照文件snapshot_0从数据存储空间BulkStorage_0同步至数据存储空间BulkStorage_1,另一个线程用于从日志提交系统读取日志。
步骤S103,将读取到的日志合并到所述第二数据存储空间中。
上述步骤S102将所述已同步集群的数据存储空间存储的特征数据同步到所述新集群的数据存储空间中,以及通过所述新集群读取所述日志队列中的日志,在此基础上,本步骤将读取到的日志合并到所述新集群的数据存储空间中,从而集群集合中新加入的所述新集群与集群集合中已同步集群保持数据一致性。具体的,根据读取到的日志所记录数据变更操作涉及的数据变更,将所述数据变更应用到所述第二数据存储空间中。例如,如图2所示,将读取到的日志所记录数据变更操作涉及的数据变更应用到数据存储空间BulkStorage_1,使数据存储空间BulkStorage_1的数据与数据存储空间BulkStorage_0的数据保持一致。
综上所述,本申请提供的所述数据同步方法,针对新加入集群集合的所述新集群,通知日志队列所述新集群加入数据同步,根据所述已同步集群的数据存储空间存储的特征数据,以数据快照文件的形式将所述已同步集群的数据存储空间存储的特征数据同步到所述新集群的数据存储空间中,使新加入的所述新集群与所述已同步集群的数据保持一致;此外,从所述日志提交系统读取日志队列中的日志,并进一步将读取到的日志合并到所述新集群的数据存储空间中,即:将读取到的日志合并到从所述已同步集群同步到的数据快照文件中,从而使新加入的所述新集群与所述已同步集群以及所述日志队列在整体上保持数据一致,确保数据一致性。
本申请提供的一种数据同步装置实施例如下:
在上述的实施例中,提供了一种数据同步方法,与之相对应的,本申请还提供了一种数据同步装置,下面结合附图进行说明。
参照图3,其示出了本申请提供的一种数据同步装置实施例的示意图。
由于装置实施例与上述提供的方法实施例相互对应,阅读本实施例的内容请参照上述方法实施例的对应说明。下述描述的装置实施例仅仅是示意性的。
本申请提供一种数据同步装置,包括:
新集群通知单元301,用于通知日志队列有新集群加入数据同步;
数据同步单元302,用于将已同步集群的第一数据存储空间存储的特征数据同步到所述新集群的第二数据存储空间中,以及通过所述新集群读取所述日志队列中的日志;
日志合并单元303,用于将读取到的日志合并到所述第二数据存储空间中。
可选的,所述第一数据存储空间存储的特征数据以数据快照文件的形式同步到所述第二数据存储空间中。
可选的,所述数据同步单元302,包括:
初始化指令发送子单元,用于通过所述新集群向所述第二数据存储空间发送初始化指令;
快照请求发送子单元,用于根据所述初始化指令向所述第一数据存储空间发出快照请求;
快照数据文件生成子单元,用于根据所述快照请求,生成所述第一数据存储空间存储的特征数据的快照数据文件,并将所述数据快照文件发送至所述第二数据存储空间;
确认消息返回子单元,用于通过所述第二数据存储空间向所述新集群返回确认消息。
可选的,所述数据同步单元302采用多线程方式实施,并且,基于第一线程将所述第一数据存储空间存储的特征数据同步到所述第二数据存储空间中,以及基于第二线程读取所述日志队列中的日志。
可选的,所述日志队列由日志提交系统提供并进行维护;相应的,所述新集群通知单元301,包括:
注册请求发送子单元,用于通过所述新集群向所述日志提交系统发送注册请求;
新集群注册子单元,用于将所述新集群加入所述日志提交系统提供的集群列表中;
最低日志版本读取子单元,用于根据所述日志队列中日志的日志版本,读取所述日志队列中日志版本最低的日志对应的日志版本,作为最低日志版本;
最低日志版本发送子单元,用于将所述最低日志版本发送至所述新集群。
可选的,所述日志提交系统接收到所述注册请求之后,所述日志队列中的日志不允许被删除。
可选的,所述数据同步单元302,包括:
日志读取请求发送子单元,用于通过所述新集群向所述日志提交系统发送日志读取 请求;
日志发送子单元,用于根据所述日志读取请求将所述日志队列中的日志发送至所述新集群。
可选的,数据同步单元302,包括:
日志判断子单元,用于判断所述新集群是否读取到当前所述日志队列中所有日志,若是,通过所述新集群向所述日志提交系统发送日志读取确认消息。
可选的,所述数据同步装置,包括:
第一日志判断单元,用于判断读取到的日志是否全部合并到所述第二数据存储空间中,若是,通过所述新集群向所述日志提交系统发送日志读取确认消息;
第二日志判断单元,用于判断所述新集群是否读取到当前所述日志队列中所有日志,若是,运行第三日志判断单元;所述第三日志判断单元,用于判断读取到的日志是否全部合并到所述第二数据存储空间中,若是,通过所述新集群向所述日志提交系统发送日志读取确认消息。
可选的,所述日志提交系统接收到所述日志读取确认消息之后,所述日志队列中的日志允许被删除。
可选的,所述日志提交系统提供用于提交过期日志的过期日志确认接口,当通过所述过期日志确认接口接收到所述已同步集群提交的过期日志信息时,根据所述过期日志信息删除所述日志队列中的过期日志。
可选的,所述日志队列中的日志不允许被删除,包括:所述过期日志确认接口不允许被调用;相应的,所述日志队列中的日志允许被删除,包括:所述过期日志确认接口允许被调用。
可选的,所述初始化指令中包含最低日志版本;相应的,所述数据同步单元302,包括:
日志版本判断子单元,用于根据所述第一数据存储空间存储的特征数据对应的日志版本,判断所述日志版本是否低于所述最低日志版本,若否,运行所述快照数据文件生成子单元。
可选的,若所述日志版本判断子单元输出的判断结果为所述日志版本低于所述最低日志版本,则等待预设时间间隔后,运行所述日志版本判断子单元。
可选的,所述第一数据存储空间存储的特征数据同步到所述第二数据存储空间之后,运行日志版本一致性判断单元;所述日志版本一致性判断单元,用于判断所述数据 快照文件所包含数据对应日志的日志版本是否一致,若否,运行日志读取合并单元;所述日志读取合并单元,用于根据所述数据快照文件所包含数据对应日志的日志版本最低的第一日志版本,以及对应日志的日志版本最高的第二日志版本,从所述日志队列获取能够覆盖所述第一日志版本和所述第二日志版本的日志集合,并将读取到的日志集合合并到所述第二数据存储空间中。
可选的,所述日志队列中日志根据所述已同步集群中节点提交的数据变更操作创建,并在创建的日志中记录当前数据变更操作后加入所述日志队列。
可选的,所述日志合并单元303,具体用于根据读取到的日志所记录数据变更操作涉及的数据变更,将所述数据变更应用到所述第二数据存储空间中。
可选的,所述数据存储空间采用下述任意一种实现方式提供快照数据文件存储:非关系型数据库和分布式数据库。
本申请提供的另一种数据同步方法实施例如下:
在上述的实施例中,提供了一种数据同步方法,方法实施主体为日志提交系统;此外,本申请还提供了另一种数据同步方法,方法实施主体为新集群,二者相互配合,下面结合附图进行说明。参照图4,其示出了本申请提供的另一种数据同步方法实施例的处理流程图,参照图2,其示出了本申请提供的一种数据同步交互方式的示意图。
由于当前提供的另一种数据同步方法实施例与上述提供的所述数据同步方法实施例相互配合,因此,阅读本实施例的内容请参照上述提供的所述数据同步方法实施例的对应说明。下述描述的方法实施例仅仅是示意性的。
本申请实施例提供的数据同步方法,包括:
步骤S401,向日志提交系统发送注册请求。
本申请实施例中,当集群集合中有新集群加入时,新加入的所述新集群的数据存储空间为空,需要从集群集合中任意一个已同步集群同步数据至新加入的所述新集群,使新加入的所述新集群与所述已同步集群的数据保持一致。除此之外,所述新集群还可以基于所述日志提交系统实现数据同步,使其数据与集群集合中其他数据保持同步。本申请实施例以所述新集群从所述集群集合中任意一个已同步集群同步数据这一实现方式为例进行说明,具体的,当集群集合中有新集群加入时,由新加入的所述新集群向所述日志提交系统发送注册请求,所述日志提交系统在接收到所述新集群发送的注册请求后,将所述新集群加入所述日志提交系统提供的集群列表中,根据所述日志队列中日志的日志版本,读取所述日志队列中日志版本最低的日志对应的日志版本,作为最低日志 版本,并将所述最低日志版本向所述新集群发送。
例如,如图2所示,新集群Frontend_1向日志提交系统发送注册请求,日志提交系统将新集群Frontend_1加入集群列表中,读取日志队列中日志版本最低的日志对应的最低日志版本minLogVersion,向新集群Frontend_1发送最低日志版本minLogVersion。
如上所述,由于数据快照文件代表的全量数据往往比较大,即:已同步集群的数据存储空间存储的全量数据比较大,在生成数据快照文件和通过网络传输数据快照文件的过程中,可能会导致日志队列中的日志与数据快照文件脱节;为了避免这种情况的发生,当所述日志提交系统接收到所述新集群发送的注册请求之后,所述日志提交系统维护的日志队列中的日志不允许被删除,比如通过将所述日志提交系统对外提供的过期日志确认接口设置为不允许被调用状态,从而使接收到注册请求之后的日志得以在所述日志队列中保留。
步骤S402,接收所述日志提交系统发送的最低日志版本。
步骤S403,基于所述最低日志版本向数据存储空间下发初始化指令。
所述新集群向其自身的数据存储空间发送初始化指令之后,所述新集群的数据存储空间根据所述初始化指令向所述已同步集群的数据存储空间发出快照请求,并根据所述快照请求,生成所述已同步集群的数据存储空间存储的特征数据的快照数据文件,并将所述数据快照文件发送至所述新集群的数据存储空间,这一过程完成后所述新集群的数据存储空间会向所述新集群发送确认消息。
例如,如图2所示,新集群Frontend_1向数据存储空间BulkStorage_1发送初始化指令,数据存储空间BulkStorage_1接收到初始化指令后,向数据存储空间BulkStorage_0发出快照请求,数据存储空间BulkStorage_0接收到快照请求后,给当前存储的全量数据打一个快照,生成包含全量数据的数据快照文件snapshot_0,并将数据快照文件snapshot_0发送至数据存储空间BulkStorage_1,并向新集群Frontend_1发送确认消息。
步骤S404,向所述日志提交系统发送日志读取请求。
步骤S405,接收所述日志提交系统基于所述日志读取请求返回的日志,并将接收到的日志应用到所述数据存储空间中。
例如,如图2所示,新集群Frontend_1向日志提交系统发送日志读取请求Request for Log后,日志提交系统向新集群Frontend_1发送日志队列中的日志(Send Log)。
如上所述,所述日志提交系统接收到所述新集群发送的注册请求之后,所述日志队列中的日志不允许被删除,但随着时间的推移,所述日志队列中日志数量不断增加,为了避免所述日志队列中日志的大量堆积,有必要在将所述日志队列中日志同步到所述新集群的基础上,恢复利用所述过期日志确认接口清除所述日志队列中过期日志这一机制。在具体实施时,可通过判断所述新集群是否读取到当前所述日志队列中所有日志,若是,通过所述新集群向所述日志提交系统发送日志读取确认消息;若否,继续从所述日志队列中读取日志,直至所述日志队列中的日志全部读取到所述新集群。所述日志提交系统接收到所述日志读取确认消息之后,所述日志队列中的日志允许被删除,比如通过将所述过期日志确认接口从上述不允许被调用状态变更为允许被调用状态,根据过期日志确认接口提交的过期日志信息删除所述日志队列中的过期日志,从而避免日志在所述日志队列中大量堆积。
上述步骤将所述已同步集群的数据存储空间存储的特征数据同步到所述新集群的数据存储空间中,以及通过所述新集群读取所述日志队列中的日志,在此基础上,将读取到的日志合并到所述新集群的数据存储空间中,从而集群集合中新加入的所述新集群与集群集合中已同步集群保持数据一致性。具体的,根据读取到的日志所记录数据变更操作涉及的数据变更,将所述数据变更应用到所述新集群的数据存储空间中。例如,如图2所示,将读取到的日志所记录数据变更操作涉及的数据变更应用到数据存储空间BulkStorage_1,使数据存储空间BulkStorage_1的数据与数据存储空间BulkStorage_0的数据保持一致。
本申请提供的另一种数据同步装置实施例如下:
在上述的实施例中,提供了另一种数据同步方法,与之相对应的,本申请还提供了另一种数据同步装置,下面结合附图进行说明。
参照图5,其示出了本申请提供的另一种数据同步装置实施例的示意图。
由于装置实施例与上述提供的方法实施例相互对应,阅读本实施例的内容请参照上述方法实施例的对应说明。下述描述的装置实施例仅仅是示意性的。
本申请提供另一种数据同步装置,包括:
注册请求发送单元,用于向日志提交系统发送注册请求;
最低日志版本接收单元,用于接收所述日志提交系统发送的最低日志版本;
初始化指令下发单元,用于基于所述最低日志版本向数据存储空间下发初始化指令;
日志读取请求发送单元,用于向所述日志提交系统发送日志读取请求;
日志接收应用单元,用于接收所述日志提交系统基于所述日志读取请求返回的日志,并将接收到的日志应用到所述数据存储空间中。
本申请提供的一种电子设备实施例如下:
在上述的实施例中,提供了一种数据同步方法,此外,本申请还提供了一种用于实现所述数据同步方法的电子设备,下面结合附图进行说明。
参照图6,其示出了本实施例提供的一种电子设备的示意图。
本申请提供的所述电子设备用于实现本申请提供的所述数据同步方法,本实施例与上述提供的数据同步方法实施例相对应,阅读本实施例的内容请参照上述提供的数据同步方法实施例的对应说明。下述描述的实施例仅仅是示意性的。
本申请提供一种电子设备,包括:
存储器601,以及处理器602;
所述存储器601用于存储计算机可执行指令,所述处理器602用于执行所述计算机可执行指令:
通知日志队列有新集群加入数据同步;
将已同步集群的第一数据存储空间存储的特征数据同步到所述新集群的第二数据存储空间中,以及通过所述新集群读取所述日志队列中的日志;
将读取到的日志合并到所述第二数据存储空间中。
可选的,所述第一数据存储空间存储的特征数据以数据快照文件的形式同步到所述第二数据存储空间中。
可选的,所述将已同步集群的第一数据存储空间存储的特征数据同步到所述新集群的第二数据存储空间中,采用如下方式实现:
通过所述新集群向所述第二数据存储空间发送初始化指令;
根据所述初始化指令向所述第一数据存储空间发出快照请求;
根据所述快照请求,生成所述第一数据存储空间存储的特征数据的快照数据文件,并将所述数据快照文件发送至所述第二数据存储空间;
通过所述第二数据存储空间向所述新集群返回确认消息。
可选的,所述将已同步集群的第一数据存储空间存储的特征数据同步到所述新集群的第二数据存储空间中,以及通过所述新集群读取所述日志队列中的日志指令在执行时,采用多线程方式执行,并且,基于第一线程将所述第一数据存储空间存储的特征数 据同步到所述第二数据存储空间中,以及基于第二线程读取所述日志队列中的日志。
可选的,所述日志队列由日志提交系统提供并进行维护;相应的,所述通知日志队列有新集群加入数据同步,采用如下方式实现:
通过所述新集群向所述日志提交系统发送注册请求;
将所述新集群加入所述日志提交系统提供的集群列表中;
根据所述日志队列中日志的日志版本,读取所述日志队列中日志版本最低的日志对应的日志版本,作为最低日志版本;
将所述最低日志版本发送至所述新集群。
可选的,所述日志提交系统接收到所述注册请求之后,所述日志队列中的日志不允许被删除。
可选的,所述通过所述新集群读取所述日志队列中的日志,采用如下方式实现:
通过所述新集群向所述日志提交系统发送日志读取请求;
根据所述日志读取请求将所述日志队列中的日志发送至所述新集群。
可选的,所述根据所述日志读取请求将所述日志队列中的日志发送至所述新集群指令执行后,所述处理器602还用于执行下述计算机可执行指令:
判断所述新集群是否读取到当前所述日志队列中所有日志,若是,通过所述新集群向所述日志提交系统发送日志读取确认消息。
可选的,所述将读取到的日志合并到所述第二数据存储空间中指令执行后,所述处理器602还用于执行下述计算机可执行指令:
判断读取到的日志是否全部合并到所述第二数据存储空间中,若是,通过所述新集群向所述日志提交系统发送日志读取确认消息;
或者,判断所述新集群是否读取到当前所述日志队列中所有日志,若是,判断读取到的日志是否全部合并到所述第二数据存储空间中,若是,通过所述新集群向所述日志提交系统发送日志读取确认消息。
可选的,所述日志提交系统接收到所述日志读取确认消息之后,所述日志队列中的日志允许被删除。
可选的,所述日志提交系统提供用于提交过期日志的过期日志确认接口,当通过所述过期日志确认接口接收到所述已同步集群提交的过期日志信息时,根据所述过期日志信息删除所述日志队列中的过期日志。
可选的,所述日志队列中的日志不允许被删除,包括:所述过期日志确认接口不允 许被调用;相应的,所述日志队列中的日志允许被删除,包括:所述过期日志确认接口允许被调用。
可选的,所述初始化指令中包含最低日志版本;相应的,所述根据所述初始化指令向所述第一数据存储空间发出快照请求指令执行后,且根据所述快照请求,生成所述第一数据存储空间存储的特征数据的快照数据文件,并将所述数据快照文件发送至所述第二数据存储空间指令执行前,所述处理器602还用于执行下述计算机可执行指令:
根据所述第一数据存储空间存储的特征数据对应的日志版本,判断所述日志版本是否低于所述最低日志版本,若否,执行所述根据所述快照请求,生成所述第一数据存储空间存储的特征数据的快照数据文件,并将所述数据快照文件发送至所述第二数据存储空间指令。
可选的,若所述根据所述第一数据存储空间存储的特征数据对应的日志版本,判断所述日志版本是否低于所述最低日志版本指令的执行结果为是,等待预设时间间隔后,返回执行所述根据所述第一数据存储空间存储的特征数据对应的日志版本,判断所述日志版本是否低于所述最低日志版本指令。
可选的,所述第一数据存储空间存储的特征数据同步到所述第二数据存储空间之后,所述处理器602还用于执行下述计算机可执行指令:
判断所述数据快照文件所包含数据对应日志的日志版本是否一致,若否,根据所述数据快照文件所包含数据对应日志的日志版本最低的第一日志版本,以及对应日志的日志版本最高的第二日志版本,从所述日志队列获取能够覆盖所述第一日志版本和所述第二日志版本的日志集合,并将读取到的日志集合合并到所述第二数据存储空间中。
可选的,所述日志队列中日志根据所述已同步集群中节点提交的数据变更操作创建,并在创建的日志中记录当前数据变更操作后加入所述日志队列。
可选的,所述将读取到的日志合并到所述第二数据存储空间中,采用如下方式实现:根据读取到的日志所记录数据变更操作涉及的数据变更,将所述数据变更应用到所述第二数据存储空间中。
可选的,所述数据存储空间采用下述任意一种实现方式提供快照数据文件存储:非关系型数据库和分布式数据库。
本申请提供的一种电子设备实施例如下:
在上述的实施例中,提供了一种数据同步方法,此外,本申请还提供了一种用于实现所述数据同步方法的电子设备,下面结合附图进行说明。
参照图7,其示出了本实施例提供的一种电子设备的示意图。
本申请提供的所述电子设备用于实现本申请提供的所述数据同步方法,本实施例与上述提供的数据同步方法实施例相对应,阅读本实施例的内容请参照上述提供的数据同步方法实施例的对应说明。下述描述的实施例仅仅是示意性的。
本申请提供一种电子设备,包括:
存储器701,以及处理器702;
所述存储器701用于存储计算机可执行指令,所述处理器7402用于执行所述计算机可执行指令:
向日志提交系统发送注册请求;
接收所述日志提交系统发送的最低日志版本;
基于所述最低日志版本向数据存储空间下发初始化指令;
向所述日志提交系统发送日志读取请求;
接收所述日志提交系统基于所述日志读取请求返回的日志,并将接收到的日志应用到所述数据存储空间中。
本申请虽然以较佳实施例公开如上,但其并不是用来限定本申请,任何本领域技术人员在不脱离本申请的精神和范围内,都可以做出可能的变动和修改,因此本申请的保护范围应当以本申请权利要求所界定的范围为准。
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括非暂存电脑可读媒体(transitory  media),如调制的数据信号和载波。
本领域技术人员应明白,本申请的实施例可提供为方法、系统或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。

Claims (23)

  1. 一种数据同步方法,其特征在于,包括:
    通知日志队列有新集群加入数据同步;
    将已同步集群的第一数据存储空间存储的特征数据同步到所述新集群的第二数据存储空间中,以及通过所述新集群读取所述日志队列中的日志;
    将读取到的日志合并到所述第二数据存储空间中。
  2. 根据权利要求1所述的数据同步方法,其特征在于,所述第一数据存储空间存储的特征数据以数据快照文件的形式同步到所述第二数据存储空间中。
  3. 根据权利要求2所述的数据同步方法,其特征在于,所述将已同步集群的第一数据存储空间存储的特征数据同步到所述新集群的第二数据存储空间中,采用如下方式实现:
    通过所述新集群向所述第二数据存储空间发送初始化指令;
    根据所述初始化指令向所述第一数据存储空间发出快照请求;
    根据所述快照请求,生成所述第一数据存储空间存储的特征数据的快照数据文件,并将所述数据快照文件发送至所述第二数据存储空间;
    通过所述第二数据存储空间向所述新集群返回确认消息。
  4. 根据权利要求1所述的数据同步方法,其特征在于,所述将已同步集群的第一数据存储空间存储的特征数据同步到所述新集群的第二数据存储空间中,以及通过所述新集群读取所述日志队列中的日志步骤,采用多线程方式实现,并且,基于第一线程将所述第一数据存储空间存储的特征数据同步到所述第二数据存储空间中,以及基于第二线程读取所述日志队列中的日志。
  5. 根据权利要求1所述的数据同步方法,其特征在于,所述日志队列由日志提交系统提供并进行维护;
    相应的,所述通知日志队列有新集群加入数据同步,采用如下方式实现:
    通过所述新集群向所述日志提交系统发送注册请求;
    将所述新集群加入所述日志提交系统提供的集群列表中;
    根据所述日志队列中日志的日志版本,读取所述日志队列中日志版本最低的日志对应的日志版本,作为最低日志版本;
    将所述最低日志版本发送至所述新集群。
  6. 根据权利要求5所述的数据同步方法,其特征在于,所述日志提交系统接收到 所述注册请求之后,所述日志队列中的日志不允许被删除。
  7. 根据权利要求6所述的数据同步方法,其特征在于,所述通过所述新集群读取所述日志队列中的日志,采用如下方式实现:
    通过所述新集群向所述日志提交系统发送日志读取请求;
    根据所述日志读取请求将所述日志队列中的日志发送至所述新集群。
  8. 根据权利要求7所述的数据同步方法,其特征在于,所述根据所述日志读取请求将所述日志队列中的日志发送至所述新集群子步骤执行后,执行下述操作:
    判断所述新集群是否读取到当前所述日志队列中所有日志,若是,通过所述新集群向所述日志提交系统发送日志读取确认消息。
  9. 根据权利要求8所述的数据同步方法,其特征在于,所述将读取到的日志合并到所述第二数据存储空间中步骤执行后,执行下述步骤:
    判断读取到的日志是否全部合并到所述第二数据存储空间中,若是,通过所述新集群向所述日志提交系统发送日志读取确认消息;
    或者,判断所述新集群是否读取到当前所述日志队列中所有日志,若是,判断读取到的日志是否全部合并到所述第二数据存储空间中,若是,通过所述新集群向所述日志提交系统发送日志读取确认消息。
  10. 根据权利要求8或9所述的数据同步方法,其特征在于,所述日志提交系统接收到所述日志读取确认消息之后,所述日志队列中的日志允许被删除。
  11. 根据权利要求10所述的数据同步方法,其特征在于,所述日志提交系统提供用于提交过期日志的过期日志确认接口,当通过所述过期日志确认接口接收到所述已同步集群提交的过期日志信息时,根据所述过期日志信息删除所述日志队列中的过期日志。
  12. 根据权利要求11所述的数据同步方法,其特征在于,所述日志队列中的日志不允许被删除,包括:所述过期日志确认接口不允许被调用;
    相应的,所述日志队列中的日志允许被删除,包括:所述过期日志确认接口允许被调用。
  13. 根据权利要求3所述的数据同步方法,其特征在于,所述初始化指令中包含最低日志版本;
    相应的,所述根据所述初始化指令向所述第一数据存储空间发出快照请求子步骤执行后,且根据所述快照请求,生成所述第一数据存储空间存储的特征数据的快照数据文 件,并将所述数据快照文件发送至所述第二数据存储空间子步骤执行前,执行下述操作:
    根据所述第一数据存储空间存储的特征数据对应的日志版本,判断所述日志版本是否低于所述最低日志版本,若否,执行所述根据所述快照请求,生成所述第一数据存储空间存储的特征数据的快照数据文件,并将所述数据快照文件发送至所述第二数据存储空间子步骤。
  14. 根据权利要求13所述的数据同步方法,其特征在于,若所述根据所述第一数据存储空间存储的特征数据对应的日志版本,判断所述日志版本是否低于所述最低日志版本子步骤的判断结果为是,等待预设时间间隔后,返回执行所述根据所述第一数据存储空间存储的特征数据对应的日志版本,判断所述日志版本是否低于所述最低日志版本子步骤。
  15. 根据权利要求3所述的数据同步方法,其特征在于,所述第一数据存储空间存储的特征数据同步到所述第二数据存储空间之后,执行下述操作:
    判断所述数据快照文件所包含数据对应日志的日志版本是否一致,若否,根据所述数据快照文件所包含数据对应日志的日志版本最低的第一日志版本,以及对应日志的日志版本最高的第二日志版本,从所述日志队列获取能够覆盖所述第一日志版本和所述第二日志版本的日志集合,并将读取到的日志集合合并到所述第二数据存储空间中。
  16. 根据权利要求1所述的数据同步方法,其特征在于,所述日志队列中日志根据所述已同步集群中节点提交的数据变更操作创建,并在创建的日志中记录当前数据变更操作后加入所述日志队列。
  17. 根据权利要求16所述的数据同步方法,其特征在于,所述将读取到的日志合并到所述第二数据存储空间中,采用如下方式实现:
    根据读取到的日志所记录数据变更操作涉及的数据变更,将所述数据变更应用到所述第二数据存储空间中。
  18. 根据权利要求1所述的数据同步方法,其特征在于,所述数据存储空间采用下述任意一种实现方式提供快照数据文件存储:
    非关系型数据库和分布式数据库。
  19. 一种数据同步装置,其特征在于,包括:
    新集群通知单元,用于通知日志队列有新集群加入数据同步;
    数据同步单元,用于将已同步集群的第一数据存储空间存储的特征数据同步到所述新集群的第二数据存储空间中,以及通过所述新集群读取所述日志队列中的日志;
    日志合并单元,用于将读取到的日志合并到所述第二数据存储空间中。
  20. 一种数据同步方法,其特征在于,包括:
    向日志提交系统发送注册请求;
    接收所述日志提交系统发送的最低日志版本;
    基于所述最低日志版本向数据存储空间下发初始化指令;
    向所述日志提交系统发送日志读取请求;
    接收所述日志提交系统基于所述日志读取请求返回的日志,并将接收到的日志应用到所述数据存储空间中。
  21. 一种数据同步装置,其特征在于,包括:
    注册请求发送单元,用于向日志提交系统发送注册请求;
    最低日志版本接收单元,用于接收所述日志提交系统发送的最低日志版本;
    初始化指令下发单元,用于基于所述最低日志版本向数据存储空间下发初始化指令;
    日志读取请求发送单元,用于向所述日志提交系统发送日志读取请求;
    日志接收应用单元,用于接收所述日志提交系统基于所述日志读取请求返回的日志,并将接收到的日志应用到所述数据存储空间中。
  22. 一种电子设备,其特征在于,包括:
    存储器,以及处理器;
    所述存储器用于存储计算机可执行指令,所述处理器用于执行所述计算机可执行指令:
    通知日志队列有新集群加入数据同步;
    将已同步集群的第一数据存储空间存储的特征数据同步到所述新集群的第二数据存储空间中,以及通过所述新集群读取所述日志队列中的日志;
    将读取到的日志合并到所述第二数据存储空间中。
  23. 一种电子设备,其特征在于,包括:
    存储器,以及处理器;
    所述存储器用于存储计算机可执行指令,所述处理器用于执行所述计算机可执行指令:
    向日志提交系统发送注册请求;
    接收所述日志提交系统发送的最低日志版本;
    基于所述最低日志版本向数据存储空间下发初始化指令;
    向所述日志提交系统发送日志读取请求;
    接收所述日志提交系统基于所述日志读取请求返回的日志,并将接收到的日志应用到所述数据存储空间中。
PCT/CN2018/113337 2017-11-07 2018-11-01 数据同步方法、装置以及电子设备 WO2019091324A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201711083268.6 2017-11-07
CN201711083268.6A CN110019514B (zh) 2017-11-07 2017-11-07 数据同步方法、装置以及电子设备

Publications (1)

Publication Number Publication Date
WO2019091324A1 true WO2019091324A1 (zh) 2019-05-16

Family

ID=66438218

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/113337 WO2019091324A1 (zh) 2017-11-07 2018-11-01 数据同步方法、装置以及电子设备

Country Status (2)

Country Link
CN (1) CN110019514B (zh)
WO (1) WO2019091324A1 (zh)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110795499A (zh) * 2019-09-17 2020-02-14 中国平安人寿保险股份有限公司 基于大数据的集群数据同步方法、装置、设备及存储介质
CN111431999A (zh) * 2020-03-23 2020-07-17 杭州趣维科技有限公司 一种基于Paxos算法的云函数分布式系统
CN112069137A (zh) * 2020-09-02 2020-12-11 北京百度网讯科技有限公司 生成信息的方法、装置、电子设备及计算机可读存储介质
CN112416884A (zh) * 2020-11-23 2021-02-26 中国移动通信集团江苏有限公司 一种数据同步方法及系统
CN114124707A (zh) * 2021-11-22 2022-03-01 中国电子科技集团公司第五十四研究所 一种网控中心多点热备方法
CN114676094A (zh) * 2022-05-27 2022-06-28 云上(江西)大数据发展有限公司 数字化政府项目的全周期管理方法、系统及可读存储介质
CN115544172A (zh) * 2022-11-28 2022-12-30 杭州欧若数网科技有限公司 一种一主多从的集群间数据实时同步的方法和系统

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110389863A (zh) * 2019-07-26 2019-10-29 苏州浪潮智能科技有限公司 一种数据恢复方法、装置、设备及计算机可读存储介质
CN111858504B (zh) * 2020-06-04 2023-12-12 武汉达梦数据库股份有限公司 基于日志解析同步的操作合并执行方法和数据同步系统
CN111752910A (zh) * 2020-06-24 2020-10-09 上海微盟企业发展有限公司 一种异构平台的数据同步方法、系统和相关装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130124638A1 (en) * 2011-11-16 2013-05-16 Tomas Barreto Managing updates at clients used by a user to access a cloud-based collaboration service
CN103294701A (zh) * 2012-02-24 2013-09-11 联想(北京)有限公司 一种分布式文件系统以及数据处理的方法
CN104346373A (zh) * 2013-07-31 2015-02-11 华为技术有限公司 分区日志队列同步管理方法及设备
CN106570007A (zh) * 2015-10-09 2017-04-19 阿里巴巴集团控股有限公司 用于分布式缓存系统数据同步的方法和设备
CN106713392A (zh) * 2015-11-13 2017-05-24 阿里巴巴集团控股有限公司 数据同步方法、装置和系统

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105760398A (zh) * 2014-12-18 2016-07-13 中兴通讯股份有限公司 一种日志记录系统及日志记录操作方法
CN104881494B (zh) * 2015-06-12 2019-02-19 北京奇虎科技有限公司 与Redis服务器进行数据同步的方法、装置和系统
US10185627B2 (en) * 2015-10-23 2019-01-22 Oracle International Corporation Synchronized test master
CN105262831B (zh) * 2015-10-30 2019-02-22 北京奇艺世纪科技有限公司 一种存储系统间同步数据的方法、装置及同步系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130124638A1 (en) * 2011-11-16 2013-05-16 Tomas Barreto Managing updates at clients used by a user to access a cloud-based collaboration service
CN103294701A (zh) * 2012-02-24 2013-09-11 联想(北京)有限公司 一种分布式文件系统以及数据处理的方法
CN104346373A (zh) * 2013-07-31 2015-02-11 华为技术有限公司 分区日志队列同步管理方法及设备
CN106570007A (zh) * 2015-10-09 2017-04-19 阿里巴巴集团控股有限公司 用于分布式缓存系统数据同步的方法和设备
CN106713392A (zh) * 2015-11-13 2017-05-24 阿里巴巴集团控股有限公司 数据同步方法、装置和系统

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110795499A (zh) * 2019-09-17 2020-02-14 中国平安人寿保险股份有限公司 基于大数据的集群数据同步方法、装置、设备及存储介质
CN110795499B (zh) * 2019-09-17 2024-04-16 中国平安人寿保险股份有限公司 基于大数据的集群数据同步方法、装置、设备及存储介质
CN111431999A (zh) * 2020-03-23 2020-07-17 杭州趣维科技有限公司 一种基于Paxos算法的云函数分布式系统
CN111431999B (zh) * 2020-03-23 2022-11-25 杭州小影创新科技股份有限公司 一种基于Paxos算法的云函数分布式系统
CN112069137A (zh) * 2020-09-02 2020-12-11 北京百度网讯科技有限公司 生成信息的方法、装置、电子设备及计算机可读存储介质
CN112069137B (zh) * 2020-09-02 2024-05-17 阿波罗智联(北京)科技有限公司 生成信息的方法、装置、电子设备及计算机可读存储介质
CN112416884A (zh) * 2020-11-23 2021-02-26 中国移动通信集团江苏有限公司 一种数据同步方法及系统
CN114124707A (zh) * 2021-11-22 2022-03-01 中国电子科技集团公司第五十四研究所 一种网控中心多点热备方法
CN114676094A (zh) * 2022-05-27 2022-06-28 云上(江西)大数据发展有限公司 数字化政府项目的全周期管理方法、系统及可读存储介质
CN115544172A (zh) * 2022-11-28 2022-12-30 杭州欧若数网科技有限公司 一种一主多从的集群间数据实时同步的方法和系统

Also Published As

Publication number Publication date
CN110019514A (zh) 2019-07-16
CN110019514B (zh) 2023-05-09

Similar Documents

Publication Publication Date Title
WO2019091324A1 (zh) 数据同步方法、装置以及电子设备
US10255343B2 (en) Initialization protocol for a peer-to-peer replication environment
US10831741B2 (en) Log-shipping data replication with early log record fetching
CN108280080B (zh) 一种数据同步方法、装置以及电子设备
US11860741B2 (en) Continuous data protection
US11579981B2 (en) Past-state backup generator and interface for database systems
US10379964B2 (en) Integrating resources at a backup site
US11747995B2 (en) Data resynchronization methods and systems in continuous data protection
CN112131237A (zh) 数据同步方法、装置、设备及计算机可读介质
US10572350B1 (en) System and method for improved application consistency in a distributed environment
US11281546B2 (en) System and method for performing an incremental backup for a persistent storage system that stores data for a node cluster
WO2020025049A1 (zh) 数据同步的方法、装置、数据库主机及存储介质
US20210117278A1 (en) System and method for storage unavailability tolerant backup
CN106873902B (zh) 一种文件存储系统、数据调度方法及数据节点
AU2023241318B1 (en) Watermark-based techniques for change-data-capture
CN106815094B (zh) 一种用于实现主备同步模式下事务提交的方法与设备
US11042454B1 (en) Restoration of a data source
US9003018B2 (en) System and method for data set synchronization and replication
WO2020134480A1 (zh) 一种数据库主备复制延迟监控方法、装置和系统
CN111949441A (zh) 用于可扩展备份搜索的系统和方法
WO2023019953A1 (zh) 数据同步方法、系统、服务器及存储介质
CN107404511B (zh) 集群中服务器的替换方法及设备
CN111522688B (zh) 分布式系统的数据备份方法及装置
WO2021212493A1 (zh) 数据同步方法、装置、数据存储系统及计算机可读介质
US10976952B2 (en) System and method for orchestrated application protection

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18876704

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18876704

Country of ref document: EP

Kind code of ref document: A1