Method, device, equipment, system and storage medium for sharing and synchronizing data

By using the log file synchronization mechanism between the primary node and the standby node in the shared storage system, the elastic expansion and data loss problems when sharing data between multiple nodes in the prior art are solved, and more efficient data synchronization and resource utilization are achieved.

CN111966652BActive Publication Date: 2025-04-29ALIBABA GROUP HOLDING LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN201910418192.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-05-20
Publication Date
2025-04-29
Estimated Expiration
2039-05-20

AI Technical Summary

Technical Problem

The prior art has the risk of elastic expansion and data loss when sharing data between multiple nodes on a stand-alone system.

Method used

By using shared storage between the primary node and the backup node, the primary node generates log files and updates the meta information file. The backup node reads log files from the shared storage and plays them back to generate a consistent Memtable.

Benefits of technology

It achieves faster and more flexible capacity expansion, avoids data loss and saves computing resources of backup nodes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111966652B_ABST
    Figure CN111966652B_ABST
Patent Text Reader

Abstract

The present application proposes a method, device, equipment, system and storage medium for shared storage synchronization data, which relates to the field of shared storage technology. The method includes: the master node uses the key value corresponding to the operation request as an index to determine whether there is a log file corresponding to the operation request in the master node; when the corresponding log file exists, the master node writes the execution content of the operation request in the log file; when the corresponding log file does not exist, the master node creates a log file for the operation request and writes the execution content of the operation request in the created log file; the master node updates the meta information file, records the changes in the log file, and performs a Memtable write operation. This enables different computing nodes to know the LSM tree structure and data updates.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of shared storage, and in particular to a method, device, equipment, system and storage medium for shared storage synchronization data. Background Art

[0002] In the prior art, data sharing between multiple nodes on a single-machine system that does not achieve separation of computing and storage is mainly done through log copying and playback. The process is as follows:

[0003] (1) The master node generates log content related to write operations;

[0004] (2) The standby node reads the relevant write operation log content from the primary node and plays it back.

[0005] The disadvantages of the prior art are as follows:

[0006] (1) It is not conducive to elastic expansion. Adding a node requires copying all data;

[0007] (2) There is a risk of data loss. The logs generated by the primary node write operation are not read in time by the standby node. If the primary node crashes at this time, the standby node cannot replay the log content of the incomplete read operation. Summary of the invention

[0008] The present invention provides a method, device, equipment, system and storage medium for shared storage and synchronization of data, so that different computing nodes can learn about LSM tree structure and data update.

[0009] In order to achieve the above-mentioned object of the invention, the technical solution adopted by the present invention is as follows:

[0010] In a first aspect, the present invention provides a method for shared storage synchronization data, comprising:

[0011] The master node uses the key value corresponding to the operation request as an index to determine whether there is a log file corresponding to the operation request on the master node;

[0012] When a corresponding log file exists, the master node writes the execution content of the operation request into the log file; when a corresponding log file does not exist, the master node creates a log file for the operation request and writes the execution content of the operation request into the created log file;

[0013] The master node updates the meta information file, records the changes in the log file, and performs the Memtable write operation.

[0014] Preferably, the method further comprises:

[0015] The standby node reads the log files generated by the primary node from the shared storage and replays them on the standby node to generate a Memtable that is consistent with the primary node.

[0016] Preferably, the method further comprises:

[0017] When the Memtable flushing conditions are met, the master node performs the Memtable flushing operation.

[0018] Preferably, the Memtable brushing conditions include:

[0019] The amount of data written to the Memtable in memory reaches the preset first threshold.

[0020] Preferably, the master node performs the Memtable flushing operation including:

[0021] The master node creates a new SSTTable file on the shared storage and updates the count file of the SSTTable file to record the change in the number of SSTTable files.

[0022] The master node calls the logical interface of the shared storage to perform the Memtable flushing operation; and deletes the log file corresponding to the Memtable;

[0023] The shared storage updates the count file of the Memtable and records the changes in the number of log files corresponding to the Memtable;

[0024] If the count file content of the Memtable reaches a preset first value, the shared storage calls the physical interface to delete the log file corresponding to the corresponding Memtable;

[0025] Update the meta information file, which contains the newly created SSTTable file information and the log file information corresponding to the logically deleted Memtable.

[0026] Preferably, the method further comprises:

[0027] When the SSTTable file merging conditions are met, the master node merges and compresses the SSTTable files.

[0028] Preferably, the SSTTable file merging conditions include:

[0029] The amount of data written to the SSTTable file in the master node reaches the preset second threshold.

[0030] Preferably, the master node merges and compresses the SSTTable file including:

[0031] The master node merges and compresses the SSTTable files whose data volume reaches the second threshold to generate new SSTTable files;

[0032] The shared storage updates the count file of the SSTTable file and records the change in the number of SSTTable files;

[0033] The master node updates the meta information file and adds the newly generated SSTTable file information;

[0034] The master node calls the logical interface to delete the SSTTable file before merging and compression;

[0035] Update the count file of the SSTTable file to record the change in the number of SSTTable files;

[0036] When the shared storage determines that the count file content of the SSTTable file reaches a preset second value, the physical interface is called to delete the SSTTable file before merging and compression;

[0037] The master node updates the meta information file, which contains the newly generated SSTTable file information and the logically deleted SSTTable file information before merging and compression.

[0038] Preferably, the standby node reads the log file generated by the master node from the shared storage and replays it on the standby node to generate a Memtable consistent with the master node, including:

[0039] The standby node reads the meta information file;

[0040] The standby node creates a new LSM tree structure based on the metadata content;

[0041] The standby node determines whether the new LSM tree contains an unopened SSTTable file;

[0042] If it contains an unopened SSTTable file, the standby node opens it;

[0043] Shared storage updates the count file of the open SSTTable files, recording the changes in the number of open SSTTable files;

[0044] The standby node determines whether it contains the open SSTTable file, which does not exist in the created LSM tree;

[0045] If there is an SSTTable file that does not exist in the created LSM tree, the standby node calls the logical interface of the shared storage to delete the non-existent SSTTable file;

[0046] Shared storage updates the count file of the SSTTable file and records the changes in the number of SSTTable files;

[0047] When the shared storage determines that the count file content of the SSTTable file reaches a preset first value, the shared storage calls the physical interface to delete the corresponding SSTTable file;

[0048] The standby node determines whether the log file has been updated;

[0049] If the log file is updated, the updated content is read and replayed, and written into the Memtable of the standby node;

[0050] The standby node determines whether the Memtable flushing conditions are met;

[0051] The standby node deletes the Memtable that meets the flushing conditions.

[0052] In a second aspect, the present invention provides a device for sharing and storing synchronous data, comprising:

[0053] A query module, configured to use the key value corresponding to the operation request as an index to determine whether a log file corresponding to the operation request exists in the primary node;

[0054] an execution module, configured to write the execution content of the operation request into the corresponding log file when there is one; and to create a log file for the operation request and write the execution content of the operation request into the created log file when there is no corresponding log file;

[0055] The update module is configured to update the meta information file, record the changes in the log file, and perform Memtable write operations.

[0056] In a third aspect, the present invention provides a device for shared storage and synchronization of data, comprising: a memory and a processor, wherein the memory stores a computer program for synchronizing LSM tree data under shared storage, and when the processor executes the computer program, it implements the processing of the method described in the first aspect above.

[0057] In a fourth aspect, the present invention provides a system for shared storage synchronization data, comprising: a shared storage composed of a plurality of computing nodes, the shared storage being divided into a primary node and a backup node;

[0058] The master node is configured to use the key value corresponding to the operation request as an index to determine whether there is a log file corresponding to the operation request in the master node; when the corresponding log file exists, the master node writes the execution content of the operation request in the log file; when the corresponding log file does not exist, the master node creates a log file for the operation request, and writes the execution content of the operation request in the created log file;

[0059] The master node is also configured to update the meta information file, record the changes in the log file, and perform Memtable write operations.

[0060] Preferably, the standby node is configured to read the log file generated by the master node from the shared storage, and replay it on the standby node to generate a Memtable consistent with the master node.

[0061] In a fifth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the processing of the above-mentioned method when executed by a processor.

[0062] Compared with the prior art, the present invention has the following beneficial effects:

[0063] (1) Faster elastic expansion: adding a new computing node only requires reading the metadata file to create the LSM tree structure and reading a limited number of log files to update the Memtable. There is no need to copy the full data between the primary and standby nodes.

[0064] (2) The standby node does not need to perform disk flushing and SSTTable merge and compression operations, which saves the computing resources of the standby node.

[0065] (3) If the main computing node goes down, the backup node can recover all the data because the log files and metadata files are stored on the shared storage, thus avoiding data loss. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] Figure 1 A flowchart of a method for synchronizing LSM tree data under shared storage according to an embodiment of the present invention;

[0067] Figure 2 A schematic diagram of the structure of a system for synchronizing LSM tree data under shared storage according to an embodiment of the present invention;

[0068] Figure 3 A schematic diagram of the structure of a device for synchronizing LSM tree data under shared storage according to an embodiment of the present invention;

[0069] Figure 4 A flowchart of a master node processing a user write request according to an embodiment of the present invention;

[0070] Figure 5This is a flowchart of the master node Memtable flushing in an embodiment of the present invention;

[0071] Figure 6 A flowchart of merging and compressing SSTTable files of a master node in an embodiment of the present invention;

[0072] Figure 7 This is a flowchart of the standby node LSM tree information and data update in an embodiment of the present invention. DETAILED DESCRIPTION

[0073] In order to make the invention objectives, technical solutions and beneficial effects of the present invention more clear, the embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be noted that, unless there is a conflict, the embodiments in this application and the features in the embodiments can be combined with each other arbitrarily.

[0074] like Figure 1 As shown, an embodiment of the present invention provides a method for shared storage and synchronization of data, including:

[0075] S101, the master node uses the key value corresponding to the operation request as an index to determine whether there is a log file corresponding to the operation request on the master node;

[0076] S102. When a corresponding log file exists, the master node writes the execution content of the operation request into the log file; when a corresponding log file does not exist, the master node creates a log file for the operation request and writes the execution content of the operation request into the created log file;

[0077] S103. The master node updates the meta information file, records the changes in the log file, and performs a Memtable write operation.

[0078] In an embodiment of the present invention, the method further includes:

[0079] The standby node reads the log files generated by the primary node from the shared storage and replays them on the standby node to generate a Memtable that is consistent with the primary node.

[0080] Compared with the existing technology, the characteristics of this solution are: (1) All write operations are performed on the master node. (2) The backup node reads the log file, replays it, and updates the Memtable on the backup node. (3) The backup node does not need to write log files, write Memtable contents to shared storage, or merge and compress SSTTable. (4) The master and backup nodes are maintained separately and do not need to exchange information with each other.

[0081] The embodiment of the present invention uses the reference counting function of shared storage and the meta information file to achieve the effect of updating the LSM tree structure and data between different nodes. The standby node does not need to perform the Memtable flushing and SSTTable merge update actions. The primary and standby nodes do not need to maintain each other's information.

[0082] In an embodiment of the present invention, the method further includes:

[0083] When the Memtable flushing conditions are met, the master node performs the Memtable flushing operation.

[0084] The Memtable flushing conditions include:

[0085] The amount of data written to the Memtable in memory reaches the preset first threshold.

[0086] In the embodiment of the present invention, when the memory Memtable is full, the disk is flushed. For example, if the capacity of a Memtable is 1M, then the disk flushing operation is performed when the 1M in the memory is full.

[0087] In the embodiment of the present invention, the master node performs the Memtable flushing operation including:

[0088] The master node creates a new SSTTable file on the shared storage and updates the count file of the SSTTable file to record the change in the number of SSTTable files.

[0089] The master node calls the logical interface of the shared storage to perform the Memtable flushing operation; and deletes the log file corresponding to the Memtable;

[0090] The shared storage updates the count file of the Memtable and records the changes in the number of log files corresponding to the Memtable;

[0091] If the count file content of the Memtable reaches a preset first value, the shared storage calls the physical interface to delete the log file corresponding to the corresponding Memtable;

[0092] Update the meta information file, which contains the newly created SSTTable file information and the log file information corresponding to the logically deleted Memtable.

[0093] In an embodiment of the present invention, multiple files, such as SSTTable and reference counts of meta-information files, are maintained on a shared storage. When an operation of opening a file is performed, the reference count of the corresponding file is increased by 1, and when a file is closed, the corresponding reference count is decreased by 1. A file can only be physically deleted when the reference count is 0. In an embodiment of the present invention, the first value is preset to 0.

[0094] In an embodiment of the present invention, the method further includes:

[0095] When the SSTTable file merging conditions are met, the master node merges and compresses the SSTTable files.

[0096] In the embodiment of the present invention, the SSTTable file merging conditions include:

[0097] The amount of data written to the SSTTable file in the master node reaches the preset second threshold.

[0098] In the embodiment of the present invention, the master node merges and compresses the SSTTable file including:

[0099] The master node merges and compresses the SSTTable files whose data volume reaches the second threshold to generate new SSTTable files;

[0100] The shared storage updates the count file of the SSTTable file and records the change in the number of SSTTable files;

[0101] The master node updates the meta information file and adds the newly generated SSTTable file information;

[0102] The master node calls the logical interface to delete the SSTTable file before merging and compression;

[0103] Update the count file of the SSTTable file to record the change in the number of SSTTable files;

[0104] When the shared storage determines that the count file content of the SSTTable file reaches a preset second value, the physical interface is called to delete the SSTTable file before merging and compression;

[0105] The master node updates the meta information file, which contains the newly generated SSTTable file information and the logically deleted SSTTable file information before merging and compression.

[0106] In the embodiment of the present invention, the standby node reads the log file generated by the master node from the shared storage, and plays it back on the standby node to generate a Memtable consistent with the master node, including:

[0107] The standby node reads the meta information file;

[0108] The standby node creates a new LSM tree structure based on the metadata content;

[0109] The standby node determines whether the new LSM tree contains an unopened SSTTable file;

[0110] If it contains an unopened SSTTable file, the standby node opens it;

[0111] Shared storage updates the count file of the open SSTTable files, recording the changes in the number of open SSTTable files;

[0112] The standby node determines whether it contains the open SSTTable file, which does not exist in the created LSM tree;

[0113] If there is an SSTTable file that does not exist in the created LSM tree, the standby node calls the logical interface of the shared storage to delete the non-existent SSTTable file;

[0114] Shared storage updates the count file of the SSTTable file and records the changes in the number of SSTTable files;

[0115] When the shared storage determines that the count file content of the SSTTable file reaches a preset first value, the shared storage calls the physical interface to delete the corresponding SSTTable file;

[0116] The standby node determines whether the log file has been updated;

[0117] If the log file is updated, the updated content is read and replayed, and written into the Memtable of the standby node;

[0118] The standby node determines whether the Memtable flushing conditions are met;

[0119] The standby node deletes the Memtable that meets the flushing conditions.

[0120] like Figure 2 As shown, an embodiment of the present invention further provides a system for shared storage and synchronization of data, including a shared storage composed of a plurality of computing nodes, wherein the shared storage is divided into a primary node and a backup node;

[0121] The master node is configured to use the key value corresponding to the operation request as an index to determine whether there is a log file corresponding to the operation request in the master node; when the corresponding log file exists, the master node writes the execution content of the operation request in the log file; when the corresponding log file does not exist, the master node creates a log file for the operation request, and writes the execution content of the operation request in the created log file;

[0122] The master node is also configured to update the meta information file, record the changes in the log file, and perform Memtable write operations.

[0123] In the embodiment of the present invention, the system, the standby node, is configured to read the log file generated by the master node from the shared storage, and replay it on the standby node to generate a Memtable consistent with the master node.

[0124] like Figure 3 As shown, an embodiment of the present invention further provides a device for sharing and storing synchronous data, including:

[0125] A query module, configured to use the key value corresponding to the operation request as an index to determine whether a log file corresponding to the operation request exists in the primary node;

[0126] an execution module, configured to write the execution content of the operation request into the corresponding log file when there is one; and to create a log file for the operation request and write the execution content of the operation request into the created log file when there is no corresponding log file;

[0127] The update module is configured to update the meta information file, record the changes in the log file, and perform Memtable write operations.

[0128] An embodiment of the present invention further provides a device for shared storage and synchronization data, comprising a memory and a processor, wherein the memory stores a computer program for shared storage and synchronization data, and the processor implements the processing of the above method when executing the computer program.

[0129] An embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the method for implementing shared storage and synchronization of data is implemented.

[0130] Embodiment 1

[0131] The process of the master node processing user write requests is as follows: Figure 4 As shown:

[0132] (1) The master node creates a new log file as needed and increases the reference count of the file by 1.

[0133] (2) The master node records the write operation to the log file.

[0134] (3) The master node updates the metadata file and records the changes in the log file.

[0135] (4) The master node performs the Memtable write operation.

[0136] Embodiment 2

[0137] The master node refresh Memtable process is as follows Figure 5 As shown:

[0138] (1) The master node determines that the Memtable flushing conditions are met.

[0139] (2) The master node creates a new SSTTable file on the shared storage.

[0140] (3) Shared storage sets the reference count of the newly created file to 1.

[0141] (4) The master node calls the logical deletion interface of the shared storage to delete the log file corresponding to the Memtable.

[0142] (5) The shared storage reduces the reference count of the corresponding file by 1.

[0143] (6) If the reference count of the corresponding file is 0, the shared storage calls the physical deletion interface to delete the corresponding file.

[0144] (7) Update the meta-information file, which contains the newly created SSTTable file information and the logically deleted log file information.

[0145] Embodiment 3

[0146] The master node merges and compresses SSTTable files as follows Figure 6 As shown:

[0147] (1) The master node determines that the SSTTable file needs to be merged.

[0148] (2) The master node merges and compresses the SSTTable files and generates new SSTTable files.

[0149] (3) The shared storage sets the reference count of the corresponding newly generated file to 1.

[0150] (4) The master node updates the metadata file and adds the newly generated SSTTable file information.

[0151] (5) The master node calls the logical deletion interface to delete the old SSTTable file.

[0152] (6) The shared storage reduces the reference count of the corresponding file by 1.

[0153] (7) The shared storage determines whether the reference count of the corresponding file is 0. If it is 0, the physical deletion interface is called to delete the corresponding file.

[0154] (8) The master node updates the meta-information file and adds the logically deleted SSTTable file information.

[0155] Embodiment 4

[0156] The standby node LSM tree information and data update process is as follows Figure 7 As shown:

[0157] (1) The standby node reads the metadata file periodically.

[0158] (2) The standby node creates a new LSM tree structure based on the metadata content.

[0159] (3) The standby node determines whether there is an SSTTable file that has not been opened before in the new LSM tree.

[0160] (4) If there is a new unopened SSTTable file, the standby node opens it.

[0161] (5) Shared storage increases the reference count of the newly opened file by 1.

[0162] (6) The standby node determines whether there is a previously opened SSTTable file, which does not exist in the new LSM tree.

[0163] (7) If there is an SSTTable file that is not needed in the new LSM tree, the standby node calls the logical deletion interface to delete it.

[0164] (8) The shared storage reduces the reference count of the file to be deleted by 1.

[0165] (9) The shared storage determines whether the reference count of the file is 0. If it is 0, the physical deletion interface is called to delete it.

[0166] (10) The standby node determines whether the log file has been updated.

[0167] (11) If the log file is updated, the updated content is read and replayed and written to the Memtable of the standby node.

[0168] (12) The standby node determines whether any Memtable needs to be flushed. (13) The Memtable that needs to be flushed is directly deleted on the standby node.

[0169] Although the embodiments disclosed in the present invention are as above, the contents are only embodiments adopted for facilitating understanding of the technical solution of the present invention, and are not used to limit the present invention. Any technician in the technical field to which the present invention belongs can make any modifications and changes in the form and details of the implementation without departing from the core technical solution disclosed in the present invention, but the protection scope defined by the present invention shall still be subject to the scope defined in the attached claims.

Claims

1. A method for sharing and storing synchronous data, characterized in that: include: The master node uses the key value corresponding to the operation request as an index to determine whether there is a log file corresponding to the operation request on the master node; When a corresponding log file exists, the master node writes the execution content of the operation request into the log file; When there is no corresponding log file, the master node creates a log file for the operation request and writes the execution content of the operation request into the created log file; The master node updates the meta information file, records the changes in the log file, and performs the Memtable write operation; The standby node reads the log files and meta-information files generated by the master node from the shared storage; The standby node creates a new LSM tree structure based on the metadata content; The standby node determines whether the log file has been updated; If the log file is updated, the updated content is read and replayed, written into the Memtable of the standby node, and a Memtable consistent with the primary node is generated.

2. The method according to claim 1, characterized in that The method further comprises: When the Memtable flushing conditions are met, the master node performs the Memtable flushing operation.

3. The method according to claim 2, characterized in that The Memtable flushing conditions include: The amount of data written to the Memtable in memory reaches the preset first threshold.

4. The method according to claim 2, characterized in that: The master node performs the Memtable flushing operation including: The master node creates a new SSTTable file on the shared storage and updates the count file of the SSTTable file to record the change in the number of SSTTable files. The master node calls the logical interface of the shared storage to perform the Memtable flushing operation; and deletes the log file corresponding to the Memtable; The shared storage updates the count file of the Memtable and records the changes in the number of log files corresponding to the Memtable; If the count file content of the Memtable reaches a preset first value, the shared storage calls the physical interface to delete the log file corresponding to the corresponding Memtable; Update the meta information file, which contains the newly created SSTTable file information and the log file information corresponding to the logically deleted Memtable.

5. The method according to claim 1, characterized in that The method further comprises: When the SSTTable file merging conditions are met, the master node merges and compresses the SSTTable files.

6. The method according to claim 5, characterized in that The SSTTable file merging conditions include: The amount of data written to the SSTTable file in the master node reaches the preset second threshold.

7. The method according to claim 5, characterized in that The master node merges and compresses the SSTTable files including: The master node merges and compresses the SSTTable files whose data volume reaches the second threshold to generate new SSTTable files; The shared storage updates the count file of the SSTTable file and records the change in the number of SSTTable files; The master node updates the meta information file and adds the newly generated SSTTable file information; The master node calls the logical interface to delete the SSTTable file before merging and compression; Update the count file of the SSTTable file to record the change in the number of SSTTable files; When the shared storage determines that the count file content of the SSTTable file reaches a preset second value, the physical interface is called to delete the SSTTable file before merging and compression; The master node updates the meta information file, which contains the newly generated SSTTable file information and the logically deleted SSTTable file information before merging and compression.

8. The method according to claim 1, characterized in that The method further comprises: The standby node determines whether the new LSM tree contains an unopened SSTTable file; If it contains an unopened SSTTable file, the standby node opens it; Shared storage updates the count file of the open SSTTable files, recording the changes in the number of open SSTTable files; The standby node determines whether it contains the open SSTTable file, which does not exist in the created LSM tree; If there is an SSTTable file that does not exist in the created LSM tree, the standby node calls the logical interface of the shared storage to delete the non-existent SSTTable file; Shared storage updates the count file of the SSTTable file and records the changes in the number of SSTTable files; When the shared storage determines that the count file content of the SSTTable file reaches a preset first value, the shared storage calls the physical interface to delete the corresponding SSTTable file; The standby node determines whether the Memtable flushing conditions are met; The standby node deletes the Memtable that meets the flushing conditions.

9. A device for sharing and storing synchronous data, characterized in that: include: A query module, configured to use the key value corresponding to the operation request as an index to determine whether a log file corresponding to the operation request exists in the primary node; An execution module, configured to write the execution content of the operation request into the corresponding log file when there is one; When a corresponding log file does not exist, create a log file for the operation request, and write the execution content of the operation request into the created log file; Update module, which is set to update the meta information file, record the changes of the log file, and perform the memtable write operation; The device also includes: a module configured to read log files and meta information files generated by the master node from shared storage, create a new LSM tree structure based on the meta information content, determine whether the log file has been updated, and if the log file has been updated, read the updated content and replay it, write it into the Memtable of the standby node, and generate a Memtable consistent with the master node.

10. A device for sharing and storing synchronous data, characterized in that: It includes a memory and a processor, wherein the memory stores a computer program for synchronizing LSM tree data under shared storage, and the processor implements the processing of the method described in any one of claims 1 to 8 when executing the computer program.

11. A system for sharing storage and synchronizing data, characterized in that: include: A shared storage composed of multiple computing nodes, wherein the shared storage is divided into a primary node and a backup node; The master node is configured to use the key value corresponding to the operation request as an index to determine whether there is a log file corresponding to the operation request in the master node; when the corresponding log file exists, the master node writes the execution content of the operation request in the log file; When there is no corresponding log file, the master node creates a log file for the operation request and writes the execution content of the operation request into the created log file; The master node is also configured to update the meta information file, record the changes in the log file, and perform the Memtable write operation; The standby node is configured to read log files and meta information files generated by the master node from the shared storage; Create a new LSM tree structure based on the meta-information content; determine whether the log file has been updated; If the log file is updated, the updated content is read and replayed, written into the Memtable of the standby node, and a Memtable consistent with the primary node is generated.

12. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, the processing of the method according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Key value storage method based on log-structured merged tree

    CN105468298A

  • Log data storage system based on distributed file system and reading-writing method

    CN106682227A