Distributed database copy synchronization method, device and non-volatile storage medium

By obtaining and storing the change data and operation logs of the target primary replica in a distributed database, synchronizing the primary replica and slave replica, solving the problem of high data storage cost in distributed storage mode, and improving the scalability and performance of the system .

CN117874136BActive Publication Date: 2024-11-12云和恩墨(北京)信息技术有限公司
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202311869329.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-29
Publication Date
2024-11-12
Estimated Expiration
2043-12-29

AI Technical Summary

Technical Problem

In the existing distributed storage methods, data storage costs are relatively high, which is difficult to meet the needs of large-scale data processing, and the system scalability is limited.

Method used

By obtaining the change data and operation logs in the target master replica, selecting at least one slave replica to store the change data and operation logs, synchronizing the master replica and the slave replica, reducing the data storage cost of the slave replica.

Benefits of technology

It effectively reduces the data storage cost of distributed storage, improves the scalability and performance of the system, and solves the problem of high data storage cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117874136B_ABST
    Figure CN117874136B_ABST
Patent Text Reader

Abstract

The present invention discloses a copy synchronization method, device and non-volatile storage medium of a distributed database. The method comprises: obtaining the changed data in the target master copy; determining the operation log of the changed data, wherein the operation log is used to record at least one data operation that generates the changed data; selecting at least one first slave copy from multiple target slave copies of the target master copy to store the changed data; selecting at least one second slave copy from multiple target slave copies of the target master copy to store the operation log. The present invention solves the technical problem that the existing distributed storage method has a high data storage cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of distributed databases, and in particular to a method and device for synchronizing copies of a distributed database and a non-volatile storage medium. Background Art

[0002] The master-slave architecture is a widely used architecture in distributed systems. Its basic principle is to divide the nodes in the system into two types: master nodes and slave nodes. The master node plays the core role of the system and is responsible for controlling and managing the operation of the entire system, while the slave node is responsible for storing and processing data.

[0003] In the master-slave architecture, the master node is usually a single node that is responsible for coordinating and managing the operation status of the entire system, including controlling data read and write operations, load balancing, data backup, etc. Slave nodes are multiple nodes in the system that are responsible for storing and processing data. Data synchronization and backup between slave nodes are controlled by the master node to ensure data consistency and reliability of the system.

[0004] However, in a multi-copy storage system with a master-slave architecture, since the master node is the control center of the entire system, once the master node fails, the entire system will not work properly, which will result in data loss or service unavailability. In addition, in a master-slave architecture, the master node needs to process all metadata and coordinate the work of all nodes, which will cause the master node to become the performance bottleneck of the entire system, affecting the scalability and performance of the system.

[0005] In the master-slave architecture, since data is only modified on the master node, there is a problem of data synchronization between the master and slave nodes. If errors or delays occur during the synchronization process, data inconsistency may occur; and in the master-slave architecture, due to the limitation of the master node, the scalability of the system is subject to certain restrictions, making it difficult to meet the needs of large-scale data processing.

[0006] Furthermore, in a multi-copy storage system of a general distributed consistency protocol, each node includes multiple copies, and a master copy can be selected in each node to process data. Multiple copies communicate through a distributed consistency protocol to ensure data consistency. Data is distributed and stored among multiple nodes to ensure data reliability and high availability. Each node contains a complete data set and can provide services when other nodes are down.

[0007] However, when determining the master node or master replica, an election must be conducted based on at least three nodes or replicas, which means that at least half of the nodes or replicas must agree to perform data modification operations, and each node or replica needs to store the same data. In this case, there is a lot of replica redundancy, the data storage cost is high, and the scalability of the distributed storage system based on this is also limited, and the purpose of dynamically increasing storage space cannot be achieved by adding new nodes.

[0008] The above-mentioned existing distributed storage methods have the problem of high data storage costs, and no effective solution has been proposed yet. Summary of the invention

[0009] The embodiments of the present invention provide a method and device for synchronizing replicas of a distributed database and a non-volatile storage medium, so as to at least solve the technical problem of high data storage cost in the existing distributed storage method.

[0010] According to one aspect of an embodiment of the present invention, a method for synchronizing replicas of a distributed database is provided, comprising: obtaining change data in a target master replica; determining an operation log of the change data, wherein the operation log is used to record at least one data operation that generates the change data; selecting at least one first slave replica from multiple target slave replicas of the target master replica to store the change data; and selecting at least one second slave replica from multiple target slave replicas of the target master replica to store the operation log.

[0011] Optionally, obtaining the changed data in the target master copy includes: selecting the target master copy from a plurality of preset copies of a preset copy group; and generating the changed data by the target master copy in response to at least one of the data operations.

[0012] Optionally, among multiple preset replicas in a preset replica group, electing the target master replica includes: counting the election votes received by each preset replica in the preset replica group, wherein the election vote indicates agreement with the preset replica as the master replica; detecting the number of votes in the election vote; and determining the preset replica whose number of votes meets the preset election rules as the target master replica, wherein the preset election rules are that the number of votes is the total number of copies of the preset replicas in the preset replica group, or the number of votes exceeds half of the total number of copies of the preset replicas in the preset replica group.

[0013] Optionally, among multiple preset replicas of a preset replica group, electing the target master replica includes: identifying a preset replica group in which no master replica exists as a target replica group, wherein the target replica group includes: multiple target replicas; among multiple preset nodes of a distributed database, determining multiple target nodes for storing the target replica group, wherein each of the preset nodes includes: multiple preset data blocks, each of the preset data blocks is used to store a preset replica, the preset replica includes the target replica, and there are preset data blocks for storing the target replica in the target node; monitoring the number of master replicas in each of the target nodes, wherein there are multiple preset replicas belonging to different preset replica groups in the target node, and the number of master replicas is the number of master replicas among the multiple preset replicas of the same target node; in the target node with the lowest number of master replicas, determining the target replica as the target master replica.

[0014] Optionally, before electing the target master copy among multiple preset copies of the preset copy group, the method also includes: determining the total number of copies of the preset copies in the preset copy group; selecting preset nodes of the target number of nodes as target nodes among multiple preset nodes of the distributed database, wherein each of the preset nodes includes: multiple preset data blocks, each of the preset data blocks is used to store the preset copy, the number of target nodes is the same as the total number of copies, and each of the target nodes is used to store a preset copy; in each of the target nodes, determining the target data block, wherein the target data block is an idle preset data block; and placing the multiple preset copies in the preset copy group into the target data blocks in the target nodes, respectively.

[0015] Optionally, among the multiple target slave replicas of the target master replica, selecting at least one second slave backup to store the operation log includes: determining, among the multiple preset nodes of the distributed database, multiple slave replica nodes for storing the target slave replica, wherein each of the preset nodes includes: multiple preset data blocks, each of the preset data blocks is used to store a preset replica, the preset replica includes the target slave replica, and the slave replica node has preset data blocks for storing the target slave replica; monitoring the number of log storages in each of the slave replica nodes, wherein there are multiple preset slave replicas belonging to different preset replica groups in the slave replica node, the preset slave replica is a third slave replica that is synchronized with the master replica based on replica data, or a fourth slave replica that is synchronized with the master replica based on the operation log, and the number of log storages is the number of the fourth slave replica in the same slave replica node; selecting the second slave replica among the slave replica nodes where the number of log storages is lower than the preset number threshold.

[0016] Optionally, after determining the operation log of the changed data, the method further includes: obtaining a submission vote of a preset replica group in which the master replica is located, wherein the preset replica group includes: multiple preset replicas, each of the preset replicas is the master replica or a slave replica, and the submission vote indicates agreement to submit the operation log; detecting the submission number of the submission vote; and submitting the operation log to the slave replica when the submission number meets the preset submission rule.

[0017] According to another aspect of an embodiment of the present invention, a replica synchronization device for a distributed database is also provided, including: an acquisition module for acquiring change data in a target master replica; a determination module for determining an operation log of the change data, wherein the operation log is used to record at least one data operation that generates the change data; a first synchronization module for selecting at least one first slave replica from multiple target slave replicas of the target master replica to store the change data; and a second synchronization module for selecting at least one second slave replica from multiple target slave replicas of the target master replica to store the operation log.

[0018] According to another aspect of an embodiment of the present invention, a non-volatile storage medium is provided, wherein the non-volatile storage medium is used to store a program, wherein when the program is running, the device where the non-volatile storage medium is located is controlled to execute the distributed database replica synchronization method.

[0019] According to another aspect of an embodiment of the present invention, there is further provided an electronic device, comprising: a memory and a processor, wherein the processor is configured to run a program stored in the processor, wherein the method for synchronizing replicas of the distributed database is executed when the program is run.

[0020] In an embodiment of the present invention, the changed data in the target master copy is obtained; the operation log of the changed data is determined, wherein the operation log is used to record at least one data operation that generates the changed data; among the multiple target slave copies of the target master copy, at least one first slave copy is selected to store the changed data; among the multiple target slave copies of the target master copy, at least one second slave copy is selected to store the operation log, so that the master copy and the slave copy can be synchronized based on the changed data and the operation log. Since the data volume of the operation log is smaller than the data volume of the changed data, the data storage cost of the operation log is smaller than the data storage cost of the changed data, so that the multiple slave copies of the target master copy do not need to be synchronized based on the changed data, thereby achieving the purpose of reducing the data storage cost of the slave copies, and realizing the technical effect of reducing the data storage cost of the distributed storage method, thereby solving the technical problem of high data storage cost in the existing distributed storage method. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0022] Figure 1 is a flow chart of a replica synchronization method of a distributed database according to an embodiment of the present invention;

[0023] Figure 2 is a schematic diagram of some preset nodes in a distributed database according to an embodiment of the present invention;

[0024] Figure 3 is a schematic diagram of a replica synchronization device for a distributed database according to an embodiment of the present invention;

[0025] Figure 4 It is a structural block diagram of a computer terminal according to an embodiment of the present invention. DETAILED DESCRIPTION

[0026] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0028] First, some nouns or terms that appear in the description of the embodiments of the present application are subject to the following explanations:

[0029] Distributed storage system: A storage system that stores data in a dispersed manner on multiple nodes to store data, and generally has different degrees of data redundancy to ensure that data is not lost.

[0030] Node: Usually composed of hardware and software, it can be an instance in a server, computer, storage device, or cloud service.

[0031] Consistency protocol: A protocol used to ensure data consistency among multiple nodes in a distributed system.

[0032] Replica: A logical concept in a consistency protocol, which refers to a virtual instance of the data held in the protocol. The amount of data held can be more or less, depending on the physical concept corresponding to the virtual instance.

[0033] Log: In this document, "log" refers to an ordered sequence of storage software operations in each replica in the consistency protocol. It is not the operating system log file or console log in the common sense.

[0034] Election: The process in which one or more replicas elect a primary replica by sending voting messages to each other according to certain election rules.

[0035] According to an embodiment of the present invention, an embodiment of a replica synchronization method of a distributed database is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0036] Figure 1 is a flow chart of a distributed database replica synchronization method according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:

[0037] Step S102, obtaining the changed data in the target master copy;

[0038] Step S104, determining an operation log of the changed data, wherein the operation log is used to record at least one data operation that generates the changed data;

[0039] Step S106, selecting at least one first slave copy from among multiple target slave copies of the target master copy to store the changed data;

[0040] Step S108: Select at least one second slave copy from among multiple target slave copies of the target master copy to store the operation log.

[0041] In an embodiment of the present invention, the changed data in the target master copy is obtained; the operation log of the changed data is determined, wherein the operation log is used to record at least one data operation that generates the changed data; among the multiple target slave copies of the target master copy, at least one first slave copy is selected to store the changed data; among the multiple target slave copies of the target master copy, at least one second slave copy is selected to store the operation log, so that the master copy and the slave copy can be synchronized based on the changed data and the operation log. Since the data volume of the operation log is smaller than the data volume of the changed data, the data storage cost of the operation log is smaller than the data storage cost of the changed data, so that the multiple slave copies of the target master copy do not need to be synchronized based on the changed data, thereby achieving the purpose of reducing the data storage cost of the slave copies, and realizing the technical effect of reducing the data storage cost of the distributed storage method, thereby solving the technical problem of high data storage cost in the existing distributed storage method.

[0042] Optionally, the first slave replica and the second slave replica are different replicas, and the target master replica has at least two slave replicas. For example, the slave replicas of the target master replica may include: a first slave replica and a second slave replica.

[0043] Optionally, the second slave replica can be a pure log replica.

[0044] Optionally, the data volume of the operation log is smaller than the data volume of the change data.

[0045] It should be noted that the data storage cost can be expressed as the size of the space occupied by the storage. The more space the storage data occupies, the higher the data storage cost.

[0046] As an optional embodiment, obtaining the changed data in the target master copy includes: selecting a target master copy from multiple preset copies of a preset copy group; and generating the changed data by the target master copy in response to at least one data operation.

[0047] In the above-mentioned embodiment of the present invention, the preset replica group where the target master replica is located can select a target master replica for responding to data operations from multiple preset replicas by election, and respond to the changed data of the data operation in the target master replica to realize the determination of the changed data.

[0048] As an optional embodiment, among multiple preset replicas of a preset replica group, electing a target master replica includes: counting the election votes received by each preset replica in the preset replica group, wherein the election vote indicates agreement with the preset replica as the master replica; detecting the number of votes in the election vote; and determining the preset replica whose number of votes meets the preset election rules as the target master replica, wherein the preset election rules are that the number of votes is the total number of preset replicas in the preset replica group, or the number of votes exceeds half of the total number of preset replicas in the preset replica group.

[0049] In the above-mentioned embodiment of the present invention, the target master replica is determined based on the election votes obtained by each preset replica in the preset replica group. When the number of votes obtained by a certain preset replica in the election is equal to the total number of preset replicas in the preset replica group, or the number of votes exceeds half of the total number of preset replicas in the preset replica group, the preset replica is determined as the target master replica in the preset replica group, and the other preset replicas in the preset replica group are determined as the target slave replicas of the target master replica, thereby realizing the determination of the target master replica and the target slave replica.

[0050] Optionally, the preset copy group includes at least 3 preset copies.

[0051] Optionally, the number of votes is the total number of preset replicas in the preset replica group, indicating that all preset replicas in the preset replica group agree that the specified preset replica is the target slave replica.

[0052] Optionally, the number of votes exceeds half of the total number of preset replicas in the preset replica group, indicating that more than half of the preset replicas in the preset replica group agree that the designated preset replica is the target slave replica.

[0053] As an optional embodiment, among multiple preset replicas of a preset replica group, electing a target master replica includes: identifying a preset replica group in which no master replica exists as a target replica group, wherein the target replica group includes: multiple target replicas; among multiple preset nodes of a distributed database, determining multiple target nodes for storing the target replica group, wherein each preset node includes: multiple preset data blocks, each preset data block is used to store a preset replica, the preset replica includes a target replica, and there are preset data blocks for storing the target replica in the target node; monitoring the number of master replicas in each target node, wherein there are multiple preset replicas belonging to different preset replica groups in the target node, and the number of master replicas is the number of master replicas in multiple preset replicas of the same target node; in the target node with the lowest number of master replicas, determining the target replica as the target master replica.

[0054] In the above-mentioned embodiment of the present invention, a distributed database has multiple preset nodes, each preset node stores multiple preset copies through multiple preset data blocks, and the distributed database may include storing multiple preset copy groups. When determining the target master copy, the preset copy group for which the master copy has not yet been elected can be determined as the target copy group in the distributed database, as well as the distribution of the target copy group in the preset nodes of the distributed database. Since each preset node can store preset copies of multiple preset copy groups, and the preset copies in each preset node may be the master copies of the corresponding preset copy group, the number of master copies in each preset node as the master copy can be counted, and then the target node with the smallest number of master copies is selected to determine the target copy of the target copy group stored in the target node as the master copy in the target copy group, so that the master copies of multiple preset copy groups can be evenly distributed in the multiple preset nodes of the distributed database.

[0055] It should be noted that the master copy of each preset replica group is used to respond to data operations. When the data in the master copy is changed based on the data operation, the computing resources of the preset node where the master copy is located need to be occupied. The more computing resources of the preset node are occupied, the lower the efficiency of the master copy in the preset node in responding to data operations. Evenly distributing the master copies of multiple preset replica groups in multiple preset nodes of the distributed database can enable each master copy to have the optimal response efficiency to data operations.

[0056] As an optional embodiment, before selecting a target master copy among multiple preset copies of a preset copy group, the method also includes: determining the total number of copies of the preset copies in the preset copy group; selecting preset nodes of the target number of nodes as target nodes among multiple preset nodes of the distributed database, wherein each preset node includes: multiple preset data blocks, each preset data block is used to store a preset copy, the number of target nodes is the same as the total number of copies, and each target node is used to store a preset copy; in each target node, determining a target data block, wherein the target data block is an idle preset data block; and placing multiple preset copies in the preset copy group into the target data blocks in the target node respectively.

[0057] In the above-mentioned embodiment of the present invention, a distributed database has multiple preset nodes, and each preset node stores multiple preset copies through multiple preset data blocks. The multiple preset copies of the same preset copy group are stored in different preset nodes. In this way, if the preset node stops running due to a failure, it can also be ensured that there are other available preset copies in the distributed database, thereby ensuring the reliability and high availability of the data.

[0058] As an optional embodiment, selecting at least one second slave backup storage operation log from multiple target slave replicas of the target master replica includes: determining multiple slave replica nodes for storing target slave replicas from multiple preset nodes of the distributed database, wherein each preset node includes: multiple preset data blocks, each preset data block is used to store a preset replica, the preset replica includes the target slave replica, and the slave replica node has preset data blocks for storing the target slave replica; monitoring the number of log storages in each slave replica node, wherein there are multiple preset slave replicas belonging to different preset replica groups in the slave replica node, the preset slave replica is a third slave replica that is synchronized with the master replica based on replica data, or a fourth slave replica that is synchronized with the master replica based on operation logs, and the number of log storages is the number of fourth slave replicas in the same slave replica node; selecting a second slave replica from the slave replica nodes whose log storage number is lower than the preset number threshold.

[0059] In the above-mentioned embodiment of the present invention, a distributed database has multiple preset nodes, each preset node stores multiple preset replicas through multiple preset data blocks, selects a slave replica node whose log storage quantity is lower than a preset quantity threshold from the multiple preset nodes, and determines that the target slave replica in the slave replica node is the second slave replica, so as to avoid excessive storage in the preset node where the slave replica node is located.

[0060] Optionally, the preset quantity threshold may be determined according to a lowest value of the log storage quantity in a plurality of preset nodes of the distributed database.

[0061] As an optional embodiment, after determining the operation log of the changed data, the method also includes: obtaining the submission vote of the preset replica group where the master replica is located, wherein the preset replica group includes: multiple preset replicas, each preset replica is a master replica or a slave replica, and the submission vote indicates agreement to submit the operation log; detecting the submission number of the submission vote; and submitting the operation log to the slave replica when the submission number meets the preset submission rule.

[0062] The above-mentioned embodiment of the present invention can adopt a method similar to the election of the master replica, where multiple preset replicas in the preset replica group express whether they agree to synchronize the master replica and the slave replica in the preset replica group based on the changed data through submission voting, and then, when the submission vote of the submission vote meets the preset submission rules, it is determined that the preset replica group agrees to synchronize based on the changed data, and then the operation log can be submitted to the slave replica.

[0063] Optionally, the preset submission rule is that the submission quantity is the total number of copies of the preset copies in the preset copy group, or the submission quantity exceeds half of the total number of copies of the preset copies in the preset copy group.

[0064] Optionally, the submission quantity is the total number of copies of the preset copies in the preset copy group, indicating that the consent of all preset copies in the preset copy group is obtained.

[0065] Optionally, the number of votes exceeds half of the total number of preset replicas in the preset replica group, indicating that the consent of more than half of the preset replicas in the preset replica group is obtained.

[0066] The present invention also provides a preferred embodiment, which provides a method for optimizing storage space in distributed storage, which uses a consistency protocol based on operation record logs (such as operation logs); data copies using this protocol ensure data consistency between copies by copying operation logs.

[0067] Optionally, the consistency protocol determines the master replica through election to provide relevant services to the outside world; the submission of logs needs to be restricted according to preset submission rules. For example, new logs can be submitted only with the consent of more than half of the replicas through preset submission rules; or new logs can be submitted only with the consent of all replicas.

[0068] Optionally, the preset election rules of the master replica can be changed as needed. For example, the preset submission rule is selected to obtain the consent of more than half of the replicas to be elected as the master replica, or to obtain the consent of all the replicas to be elected as the master replica.

[0069] Optionally, the replica can choose whether to apply logs to complete data storage (choose to synchronize based on changed data, or synchronize based on operation logs). If logs are applied (i.e., synchronize based on operation logs), the storage space occupied by the replica will change substantially, and the replica will be a special replica (called a pure log replica).

[0070] It should be noted that, according to the characteristics of the above consistency protocol, the minimum data copy redundancy in the distributed database can be less than 3.

[0071] Optionally, multiple replica groups can be interleaved among multiple nodes of a distributed database, and the master nodes of multiple replica groups are evenly distributed on different nodes. The even distribution of master replicas can be achieved by electing master replicas for replica groups without master replicas in each node one by one. If the master replicas of multiple replica groups are evenly distributed among the nodes, any node can execute client requests, avoiding reaching the performance bottleneck of a single node.

[0072] In the above embodiment of the present invention, the number of replicas of different replica groups can be different, which can be specified by configuring the consistency protocol in the replica group, and cooperating with the "pure log replica" (such as the second slave replica) in the replica group to achieve the purpose of data redundancy less than 3.

[0073] Figure 2is a schematic diagram of some nodes in a distributed database according to an embodiment of the present invention, such as Figure 2 As shown, the distributed database uses a storage system to divide the managed physical storage units into blocks. Each data block is a replica. The data between different replicas of different nodes are organized into replica groups using the above-mentioned consistency protocol. From the perspective of the entire storage system, there are multiple replica groups in the distributed database at the same time.

[0074] Alternatively, if Figure 2 As shown, there are at least 3 nodes and 5 replica groups in the distributed database, among which the replicas in replica group 1 include: replica (1-1), the replicas in replica group 2 include: replicas (2-1, 2-2), the replicas in replica group 3 include: replicas (3-1, 3-2, 3-3), the replicas in replica group 4 include: replicas (4-1, 4-2), and the replicas in replica group 5 include: replica (5-1).

[0075] As an optional example, each replica group in the distributed database uses a consistency protocol to ensure data consistency. After the distributed database is started, the primary replica that interacts with the client is selected through an election mechanism. For example, a preset election rule can be used (such as obtaining the consent of all replicas to be elected as the primary replica), and then the primary replica is elected in sequence from the leaderless replica group stored in each node, such as Figure 2 As shown, the leaders of the five replica groups are relatively evenly distributed on three different nodes.

[0076] As an optional example, the log is synchronized to other replicas (such as slave replicas) through a consistency protocol. Other replicas choose whether to apply the log and write the data to disk based on the configuration, that is, choose to synchronize based on the changed data or based on the operation log.

[0077] Alternatively, if Figure 2 As shown, replicas (2-1), (3-2), and (4-2) are pure log replicas and will not apply log writes to disk.

[0078] Optionally, according to the multi-copy storage system solution of the common distributed protocol, the maximum number of nodes configured is 3, and the data redundancy can be calculated as 3; the technology provided in the present application can reduce the amount of data required for storage because the replicas can be synchronized based on the operation log, and the data redundancy is calculated to be 2.

[0079] As an optional example, data can be evenly distributed by controlling whether to apply logs to the replicas between each node, so that data is evenly distributed among the nodes.

[0080] Alternatively, if Figure 2As shown in the figure, the data is evenly distributed among the six replicas (1-1), (3-1), (4-1), (2-2), (5-1), and (5-3), and since the leader replicas are also relatively evenly distributed on different nodes, each node can respond to the client's request, making full use of cluster resources and avoiding the overall performance being limited by the performance bottleneck of a single node.

[0081] The above-mentioned embodiments of the present invention can achieve the purpose of optimizing storage space, not only can reduce copy redundancy, but also can achieve uniform distribution of data and balanced response to requests; it can improve the reliability and availability of distributed databases and perform well in terms of performance.

[0082] According to an embodiment of the present invention, an embodiment of a replica synchronization device for a distributed database is also provided. It should be noted that the replica synchronization device for a distributed database can be used to execute the replica synchronization method for a distributed database in an embodiment of the present invention, and the replica synchronization method for a distributed database in an embodiment of the present invention can be executed in the replica synchronization device for a distributed database.

[0083] Figure 3 is a schematic diagram of a replica synchronization device for a distributed database according to an embodiment of the present invention. Figure 3 As shown, the device may include: an acquisition module 32, used to acquire the change data in the target master copy; a determination module 34, used to determine the operation log of the change data, wherein the operation log is used to record at least one data operation that generates the change data; a first synchronization module 36, used to select at least one first slave copy from multiple target slave copies of the target master copy to store the change data; and a second synchronization module 38, used to select at least one second slave copy from multiple target slave copies of the target master copy to store the operation log.

[0084] It should be noted that the acquisition module 32 in this embodiment can be used to execute step S102 in the embodiment of the present application, the determination module 34 in this embodiment can be used to execute step S104 in the embodiment of the present application, the first synchronization module 36 in this embodiment can be used to execute step S106 in the embodiment of the present application, and the second synchronization module 38 in this embodiment can be used to execute step S108 in the embodiment of the present application. The examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the contents disclosed in the above embodiments.

[0085] In an embodiment of the present invention, the changed data in the target master copy is obtained; the operation log of the changed data is determined, wherein the operation log is used to record at least one data operation that generates the changed data; among the multiple target slave copies of the target master copy, at least one first slave copy is selected to store the changed data; among the multiple target slave copies of the target master copy, at least one second slave copy is selected to store the operation log, so that the master copy and the slave copy can be synchronized based on the changed data and the operation log. Since the data volume of the operation log is smaller than the data volume of the changed data, the data storage cost of the operation log is smaller than the data storage cost of the changed data, so that the multiple slave copies of the target master copy do not need to be synchronized based on the changed data, thereby achieving the purpose of reducing the data storage cost of the slave copies, and realizing the technical effect of reducing the data storage cost of the distributed storage method, thereby solving the technical problem of high data storage cost in the existing distributed storage method.

[0086] As an optional embodiment, the acquisition module includes: an election unit, used to elect a target master replica from multiple preset replicas in a preset replica group; a generation unit, used to generate change data by the target master replica in response to at least one data operation.

[0087] As an optional embodiment, the election unit includes: a counting unit, used to count the election votes received by each preset replica in the preset replica group, wherein the election vote indicates the agreement of the preset replica as the master replica; a detection unit, used to detect the number of votes in the election vote; a first determination unit, used to determine the preset replica whose number of votes meets the preset election rules as the target master replica, wherein the preset election rules are that the number of votes is the total number of preset replicas in the preset replica group, or the number of votes exceeds half of the total number of preset replicas in the preset replica group.

[0088] As an optional embodiment, the election unit includes: an identification unit, used to identify a preset replica group in which no master replica exists as a target replica group, wherein the target replica group includes: multiple target replicas; a second determination unit, used to determine, among multiple preset nodes of a distributed database, multiple target nodes for storing the target replica group, wherein each preset node includes: multiple preset data blocks, each preset data block is used to store a preset replica, the preset replica includes a target replica, and there are preset data blocks for storing the target replica in the target node; a monitoring unit, used to monitor the number of master replicas in each target node, wherein there are multiple preset replicas belonging to different preset replica groups in the target node, and the number of master replicas is the number of master replicas among multiple preset replicas of the same target node; a third determination unit, used to determine the target replica as the target master replica in the target node with the lowest number of master replicas.

[0089] As an optional embodiment, the device also includes: a first determination subunit, used to determine the total number of copies of the preset copies in the preset copy group before electing the target master copy among the multiple preset copies of the preset copy group; a selection subunit, used to select the preset nodes of the target number of nodes as the target nodes among the multiple preset nodes of the distributed database, wherein each preset node includes: multiple preset data blocks, each preset data block is used to store the preset copy, the number of target nodes is the same as the total number of copies, and each target node is used to store a preset copy; a second determination subunit, used to determine the target data block in each target node, wherein the target data block is an idle preset data block; a storage subunit, used to place the multiple preset copies in the preset copy group into the target data blocks in the target node respectively.

[0090] As an optional embodiment, the second synchronization module includes: a determination submodule, used to determine multiple slave replica nodes for storing target slave replicas among multiple preset nodes of the distributed database, wherein each preset node includes: multiple preset data blocks, each preset data block is used to store a preset replica, the preset replica includes the target slave replica, and there are preset data blocks for storing the target slave replica in the slave replica node; a monitoring submodule, used to monitor the number of log storages in each slave replica node, wherein there are multiple preset slave replicas belonging to different preset replica groups in the slave replica node, the preset slave replica is a third slave replica that is synchronized with the master replica based on replica data, or a fourth slave replica that is synchronized with the master replica based on an operation log, and the number of log storages is the number of fourth slave replicas in the same slave replica node; a selection submodule, used to select a second slave replica from the slave replica nodes whose log storage number is lower than a preset number threshold.

[0091] As an optional embodiment, the device also includes: an acquisition sub-module, which is used to obtain the submission vote of the preset replica group where the master replica is located after determining the operation log of the changed data, wherein the preset replica group includes: multiple preset replicas, each preset replica is a master replica or a slave replica, and the submission vote indicates agreement to submit the operation log; a detection sub-module, which is used to detect the submission number of the submission vote; and a submission sub-module, which is used to submit the operation log to the slave replica when the submission number meets the preset submission rules.

[0092] The embodiment of the present invention can provide a computer terminal, which can be any computer terminal device in a computer terminal group. Optionally, in this embodiment, the computer terminal can also be replaced by a terminal device such as a mobile terminal.

[0093] Optionally, in this embodiment, the computer terminal may be located in at least one network device among a plurality of network devices of the computer network.

[0094] In this embodiment, the above-mentioned computer terminal can execute the program code of the following steps in the replica synchronization method of a distributed database: obtaining the change data in the target master replica; determining the operation log of the change data, wherein the operation log is used to record at least one data operation that generates the change data; selecting at least one first slave replica from multiple target slave replicas of the target master replica to store the change data; and selecting at least one second slave replica from multiple target slave replicas of the target master replica to store the operation log.

[0095] Optionally, Figure 4 is a structural block diagram of a computer terminal according to an embodiment of the present invention. Figure 4 As shown, the computer terminal 10 may include: one or more (only one is shown in the figure) processors 42 and a memory 44.

[0096] Among them, the memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the copy synchronization method and device of the distributed database in the embodiment of the present invention. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, the copy synchronization method of the distributed database mentioned above is realized. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories can be connected to the terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0097] The processor can call the information and application programs stored in the memory through the transmission device to perform the following steps: obtain the changed data in the target master copy; determine the operation log of the changed data, wherein the operation log is used to record at least one data operation that generates the changed data; select at least one first slave copy from multiple target slave copies of the target master copy to store the changed data; select at least one second slave copy from multiple target slave copies of the target master copy to store the operation log.

[0098] Optionally, the processor may also execute program code of the following steps: selecting a target master replica from among multiple preset replicas of a preset replica group; and generating change data by the target master replica in response to at least one data operation.

[0099] Optionally, the processor may also execute program code for the following steps: counting the number of election votes received by each preset replica in the preset replica group, wherein the election vote indicates agreement with the preset replica as the primary replica; detecting the number of votes in the election vote; determining the preset replica whose number of votes meets the preset election rules as the target primary replica, wherein the preset election rules are that the number of votes is the total number of preset replicas in the preset replica group, or the number of votes exceeds half of the total number of preset replicas in the preset replica group.

[0100] Optionally, the processor may also execute the following steps of program code: identifying a preset replica group in which no master replica exists as a target replica group, wherein the target replica group includes: multiple target replicas; determining multiple target nodes for storing the target replica group among multiple preset nodes of the distributed database, wherein each preset node includes: multiple preset data blocks, each preset data block is used to store a preset replica, the preset replica includes a target replica, and there are preset data blocks for storing the target replica in the target node; monitoring the number of master replicas in each target node, wherein there are multiple preset replicas belonging to different preset replica groups in the target node, and the number of master replicas is the number of master replicas among the multiple preset replicas of the same target node; and determining the target replica as the target master replica in the target node with the lowest number of master replicas.

[0101] Optionally, the processor may also execute the program code of the following steps: determining the total number of copies of the preset copies in the preset copy group before electing the target master copy among the multiple preset copies of the preset copy group; selecting the preset nodes of the target number of nodes as the target nodes among the multiple preset nodes of the distributed database, wherein each preset node includes: multiple preset data blocks, each preset data block is used to store a preset copy, the number of target nodes is the same as the total number of copies, and each target node is used to store a preset copy; in each target node, determining the target data block, wherein the target data block is an idle preset data block; and placing the multiple preset copies in the preset copy group into the target data block in the target node respectively.

[0102] Optionally, the processor may also execute program code of the following steps: determining, among multiple preset nodes of a distributed database, multiple slave replica nodes for storing target slave replicas, wherein each preset node includes: multiple preset data blocks, each preset data block is used to store a preset replica, the preset replica includes a target slave replica, and there are preset data blocks for storing the target slave replica in the slave replica node; monitoring the number of log storages in each slave replica node, wherein there are multiple preset slave replicas belonging to different preset replica groups in the slave replica node, the preset slave replica is a third slave replica that is synchronized with the master replica based on replica data, or a fourth slave replica that is synchronized with the master replica based on an operation log, and the number of log storages is the number of fourth slave replicas in the same slave replica node; selecting a second slave replica in the slave replica node whose number of log storages is lower than a preset number threshold.

[0103] Optionally, the processor may also execute the program code of the following steps: after determining the operation log of the changed data, obtaining the submission vote of the preset replica group where the master replica is located, wherein the preset replica group includes: multiple preset replicas, each preset replica is a master replica or a slave replica, and the submission vote indicates agreement to submit the operation log; detecting the submission number of the submission vote; and submitting the operation log to the slave replica when the submission number meets the preset submission rule.

[0104] By adopting the embodiment of the present invention, a copy synchronization scheme of a distributed database is provided. In the embodiment of the present invention, the change data in the target master copy is obtained; the operation log of the change data is determined, wherein the operation log is used to record at least one data operation that generates the change data; at least one first slave copy is selected from multiple target slave copies of the target master copy to store the change data; at least one second slave copy is selected from multiple target slave copies of the target master copy to store the operation log, so that the master copy and the slave copy can be synchronized based on the change data and the operation log. Since the data volume of the operation log is smaller than the data volume of the change data, the data storage cost of the operation log is smaller than the data storage cost of the change data, so that the multiple slave copies of the target master copy do not need to be synchronized based on the change data, thereby achieving the purpose of reducing the data storage cost of the slave copies, and realizing the technical effect of reducing the data storage cost of the distributed storage method, thereby solving the technical problem of high data storage cost in the existing distributed storage method.

[0105] It can be understood by those skilled in the art that Figure 4 The structure shown is for illustration only, and the computer terminal may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a handheld computer, a mobile Internet device (Mobile Internet Devices, MID), a PAD, or other terminal devices. Figure 4The structure of the electronic device is not limited. For example, the computer terminal 40 may also include Figure 4 More or fewer components (such as network interfaces, display devices, etc.) shown in, or having Figure 4 Different configurations are shown.

[0106] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a non-volatile medium. The non-volatile storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0107] The embodiment of the present invention further provides a non-volatile storage medium. Optionally, in this embodiment, the non-volatile storage medium can be used to store the program code executed by the replica synchronization method of the distributed database provided in the above embodiment.

[0108] Optionally, in this embodiment, the non-volatile storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.

[0109] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for performing the following steps: obtaining the change data in the target master copy; determining an operation log of the change data, wherein the operation log is used to record at least one data operation that generates the change data; selecting at least one first slave copy among multiple target slave copies of the target master copy to store the change data; and selecting at least one second slave copy among multiple target slave copies of the target master copy to store the operation log.

[0110] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for executing the following steps: selecting a target master copy from multiple preset copies of a preset copy group; and generating change data in response to at least one data operation by the target master copy.

[0111] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for executing the following steps: counting the number of election votes received by each preset replica in the preset replica group, wherein the election vote indicates agreement with the preset replica as the master replica; detecting the number of votes in the election vote; determining the preset replica whose number of votes meets the preset election rules as the target master replica, wherein the preset election rules are that the number of votes is the total number of copies of the preset replicas in the preset replica group, or the number of votes exceeds half of the total number of copies of the preset replicas in the preset replica group.

[0112] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for performing the following steps: identifying a preset replica group in which no master replica exists as a target replica group, wherein the target replica group includes: multiple target replicas; determining multiple target nodes for storing the target replica group among multiple preset nodes of the distributed database, wherein each preset node includes: multiple preset data blocks, each preset data block is used to store a preset replica, the preset replica includes a target replica, and there are preset data blocks for storing the target replica in the target node; monitoring the number of master replicas in each target node, wherein there are multiple preset replicas belonging to different preset replica groups in the target node, and the number of master replicas is the number of master replicas among the multiple preset replicas of the same target node; in the target node with the lowest number of master replicas, determining the target replica as the target master replica.

[0113] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for executing the following steps: among multiple preset copies of a preset copy group, before electing a target master copy, determining the total number of copies of the preset copies in the preset copy group; among multiple preset nodes of the distributed database, selecting preset nodes of the target number of nodes as target nodes, wherein each preset node includes: multiple preset data blocks, each preset data block is used to store a preset copy, the number of target nodes is the same as the total number of copies, and each target node is used to store a preset copy; in each target node, determining a target data block, wherein the target data block is an idle preset data block; and placing multiple preset copies in the preset copy group into the target data blocks in the target node, respectively.

[0114] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for performing the following steps: determining, among multiple preset nodes of a distributed database, multiple slave replica nodes for storing target slave replicas, wherein each preset node includes: multiple preset data blocks, each preset data block is used to store a preset replica, the preset replica includes a target slave replica, and there are preset data blocks for storing the target slave replica in the slave replica node; monitoring the number of log storages in each slave replica node, wherein there are multiple preset slave replicas belonging to different preset replica groups in the slave replica node, the preset slave replica is a third slave replica that is synchronized with the master replica based on replica data, or a fourth slave replica that is synchronized with the master replica based on an operation log, and the number of log storages is the number of fourth slave replicas in the same slave replica node; selecting a second slave replica in the slave replica node whose number of log storages is lower than a preset number threshold.

[0115] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for executing the following steps: after determining the operation log of the changed data, obtaining a commit vote of a preset replica group where the master replica is located, wherein the preset replica group includes: multiple preset replicas, each preset replica is a master replica or a slave replica, and the commit vote indicates agreement to submit the operation log; detecting the number of submissions of the commit vote; and submitting the operation log to the slave replica when the number of submissions meets the preset submission rule.

[0116] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0117] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0118] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0119] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0120] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0121] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a non-volatile storage medium, including several instructions for a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned non-volatile storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.

[0122] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A distributed database replica synchronization method, characterized in that: include: Get the changed data in the target master copy; Determining an operation log of the changed data, wherein the operation log is used to record at least one data operation that generates the changed data; Selecting at least one first slave copy from among multiple target slave copies of the target master copy to store the changed data; Selecting at least one second slave copy from among multiple target slave copies of the target master copy to store the operation log; Among them, selecting at least one second slave backup to store the operation log from among the multiple target slave copies of the target master copy includes: Among multiple preset nodes of a distributed database, multiple slave replica nodes for storing the target slave replica are determined, wherein each of the preset nodes includes: multiple preset data blocks, each of the preset data blocks is used to store a preset replica, the preset replica includes the target slave replica, and the slave replica node has a preset data block for storing the target slave replica; Monitoring the number of log storages in each of the slave replica nodes, wherein the slave replica node contains a plurality of preset slave replicas belonging to different preset replica groups, the preset slave replica is a third slave replica that is synchronized with the master replica based on replica data, or a fourth slave replica that is synchronized with the master replica based on an operation log, and the number of log storages is the number of the fourth slave replica in the same slave replica node; Among the slave replica nodes whose log storage quantity is lower than a preset quantity threshold, select the second slave replica.

2. The method according to claim 1, characterized in that Obtaining the changed data in the target master copy includes: Selecting the target master replica from among multiple preset replicas in the preset replica group; The target master copy generates the change data in response to at least one of the data operations.

3. The method according to claim 2, characterized in that Among the multiple preset replicas in the preset replica group, selecting the target primary replica comprises: Counting the number of election votes received by each preset replica in the preset replica group, wherein the election vote indicates that the preset replica is approved as the primary replica; detecting the number of votes cast in said election ballot; The preset replica whose number of votes meets the preset election rules is determined as the target master replica, wherein the preset election rules are that the number of votes is the total number of copies of the preset replicas in the preset replica group, or the number of votes exceeds half of the total number of copies of the preset replicas in the preset replica group.

4. The method according to claim 2, characterized in that: Among the multiple preset replicas in the preset replica group, selecting the target primary replica comprises: Identify a preset replica group in which no master replica exists as a target replica group, wherein the target replica group includes: a plurality of target replicas; Determine a plurality of target nodes for storing the target replica group from a plurality of preset nodes of a distributed database, wherein each of the preset nodes comprises: a plurality of preset data blocks, each of the preset data blocks is used to store a preset replica, the preset replica comprises the target replica, and the target node has a preset data block for storing the target replica; Monitoring the number of master copies in each of the target nodes, wherein the target node contains multiple preset copies belonging to different preset copy groups, and the number of master copies is the number of master copies among the multiple preset copies of the same target node; Among the target nodes with the lowest number of master replicas, determine the target replica as the target master replica.

5. The method according to claim 2, characterized in that: Before selecting the target primary replica from among the multiple preset replicas of the preset replica group, the method further includes: Determining the total number of copies of the preset copies in the preset copy group; Among multiple preset nodes of the distributed database, select preset nodes of the target number of nodes as target nodes, wherein each of the preset nodes includes: multiple preset data blocks, each of the preset data blocks is used to store the preset replica, the number of the target nodes is the same as the total number of replicas, and each of the target nodes is used to store one preset replica; In each of the target nodes, a target data block is determined, wherein the target data block is an idle preset data block; The plurality of preset replicas in the preset replica group are respectively placed into the target data blocks in the target node.

6. The method according to claim 1, characterized in that After determining the operation log of the changed data, the method further includes: Obtaining a submission vote of a preset replica group where the master replica is located, wherein the preset replica group includes: a plurality of preset replicas, each of which is the master replica or a slave replica, and the submission vote indicates agreement to submit the operation log; Detecting the number of submissions for the submission vote; When the submission quantity meets the preset submission rule, the operation log is submitted to the slave replica.

7. A replica synchronization device for a distributed database, characterized in that: include: The acquisition module is used to obtain the changed data in the target master copy; A determination module, configured to determine an operation log of the change data, wherein the operation log is configured to record at least one data operation that generates the change data; A first synchronization module, configured to select at least one first slave replica from among a plurality of target slave replicas of the target master replica to store the changed data; A second synchronization module, configured to select at least one second slave replica from among a plurality of target slave replicas of the target master replica to store the operation log; Wherein, the second synchronization module includes: A determination submodule is used to determine, among a plurality of preset nodes of a distributed database, a plurality of slave replica nodes for storing the target slave replica, wherein each of the preset nodes comprises: a plurality of preset data blocks, each of the preset data blocks is used to store a preset replica, the preset replica comprises the target slave replica, and the preset data blocks for storing the target slave replica exist in the slave replica node; A monitoring submodule, used for monitoring the number of log storages in each of the slave replica nodes, wherein the slave replica node contains a plurality of preset slave replicas belonging to different preset replica groups, the preset slave replica is a third slave replica that is synchronized with the master replica based on replica data, or a fourth slave replica that is synchronized with the master replica based on an operation log, and the number of log storages is the number of the fourth slave replica in the same slave replica node; The selection submodule is used to select the second slave replica from the slave replica nodes whose log storage quantity is lower than a preset quantity threshold.

8. A non-volatile storage medium, characterized in that: The non-volatile storage medium is used to store a program, wherein when the program is running, the device where the non-volatile storage medium is located is controlled to execute the copy synchronization method of a distributed database as described in any one of claims 1 to 6.

9. An electronic device, characterized in that: include: A memory and a processor, wherein the processor is used to run a program stored in the processor, wherein the program, when running, executes the replica synchronization method of a distributed database as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Transaction processing method and device, node equipment and storage medium

    CN115098229A

  • Cross-data-center service processing method, device and equipment

    CN115103011A

  • Distributed database system and member change synchronization method and device thereof

    CN115687519A

  • Distributed database system and data reading method and device

    CN116521796A

  • System and method for log conflict detection and resolution in a data store

    US8719225B1