Data storage method, electronic device and computer program product

By using persistent storage devices in the storage system to store log data and writing them to non-volatile storage devices when conditions are met, the problem of volatile memory data loss is solved and storage efficiency and data durability are improved.

CN114063883BActive Publication Date: 2024-08-23EMC IP HLDG CO LLC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010758278.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-31
Publication Date
2024-08-23
Estimated Expiration
2040-07-31

AI Technical Summary

Technical Problem

When existing storage systems store data in volatile memories, they are prone to losing data during power outages or failures, resulting in reduced storage efficiency.

Method used

A persistent storage device is used to store log data, and when specific conditions are met, the data is written from the log to a persistent storage table, and then merged from the persistent storage table into a non-volatile storage device to avoid data loss.

Benefits of technology

It improves the storage efficiency of the storage system, reduces data recovery delay and system resource occupation, and enhances the durability of data and the reliability of the storage system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114063883B
    Figure CN114063883B
Patent Text Reader

Abstract

The embodiments of the present disclosure provide a method for storing data, an electronic device, and a computer program product, the method comprising: determining the number of at least one first storage device of a storage system, each first storage device being persistent and storing a log, the log comprising a record entry of data to be stored; and if the determined number is greater than a threshold number, writing the data to be stored from the log where the data to be stored is located to a corresponding storage table, and the data in the storage table will be written to a second storage device of the storage system. In this way, the storage efficiency of the storage system can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure relate to the field of computers, and more particularly, to a method of storing data, an electronic device, and a computer program product. Background Art

[0002] In a storage system, data can be stored based on a tree structure. Conventional storage systems usually include one or more volatile memories and / or one or more non-volatile storage devices. Volatile memories may include, for example, random access memories, and non-volatile storage devices may include, for example, storage disks such as solid-state hard disks. In the process of storing data, IO (input / output) operations are involved between volatile memories and non-volatile storage devices. However, in current storage systems, volatile memories are usually used to process data to be processed. This method is prone to data loss when power is lost or failure occurs in the storage system, resulting in reduced system storage efficiency. Summary of the invention

[0003] Embodiments of the present disclosure provide a solution for managing data storage.

[0004] In a first aspect of the present disclosure, a method for storing data is provided. In the method, the number of at least one first storage device of a storage system is determined, each first storage device is persistent and stores a log, and the log includes a record entry of data to be stored. If the number is determined to be greater than a threshold number, the data to be stored is written from the log where the data to be stored is located to a corresponding storage table, and the data in the storage table will be written to a second storage device of the storage system.

[0005] In a second aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory coupled to the processor, the memory having instructions stored therein, the instructions causing the electronic device to perform an action when executed by the processor. The action comprises: determining the number of at least one first storage device of a storage system, each first storage device being persistent and storing a log, the log comprising record entries of data to be stored; and if it is determined that the number is greater than a threshold number, causing the data to be stored to be written from the log where the data to be stored is located to a corresponding storage table, and the data in the storage table will be written to a second storage device of the storage system.

[0006] In a third aspect of the present disclosure, there is provided a computer program product tangibly stored on a computer readable medium and comprising machine executable instructions which, when executed, cause a machine to perform any of the steps of the method according to the first aspect.

[0007] This Summary is provided to introduce a selection of concepts in a simplified form that are further described in the Detailed Description below. This Summary is not intended to identify key features or essential features of the disclosure, nor is it intended to limit the scope of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] The above and other purposes, features and advantages of the present disclosure will become more apparent by describing the exemplary embodiments of the present disclosure in more detail in conjunction with the accompanying drawings, wherein the same reference numerals generally represent the same components in the exemplary embodiments of the present disclosure. In the accompanying drawings:

[0009] Figure 1 A schematic diagram schematically illustrates an exemplary environment according to an embodiment of the present disclosure;

[0010] Figure 2 A block diagram schematically illustrates a process of storing data according to an embodiment of the present disclosure;

[0011] Figure 3 The block diagram of a distributed storage system according to an embodiment of the present disclosure is schematically shown.

[0012] Figure 4 A block diagram schematically illustrates a process of storing data in a second storage device according to an embodiment of the present disclosure; and

[0013] Figure 5 A block diagram schematically illustrates an example device that may be used to implement an embodiment of the present disclosure. DETAILED DESCRIPTION

[0014] The principles of the present disclosure will be described below with reference to several example embodiments shown in the accompanying drawings.

[0015] As used herein, the term "including" and its variations mean open inclusion, i.e., "including but not limited to". Unless otherwise stated, the term "or" means "and / or". The term "based on" means "based at least in part on". The terms "an example embodiment" and "an embodiment" mean "a set of example embodiments". The term "another embodiment" means "a set of additional embodiments". The terms "first", "second", etc. may refer to different or the same objects. Other explicit and implicit definitions may also be included below.

[0016] In a storage system, a tree structure such as a log structured merge (LSM) tree may be used to store data, for example, to store associated metadata in the form of key-value pairs. In a tree structure such as an LSM, the data to be stored is generally first stored in a storage table (memtable), which is usually included in a volatile memory (in-volatile-memory), which is configured to store the data before the data stored in the storage table is written to (multiple) non-volatile storage devices such as solid-state drives (SSDs).

[0017] Since the data in the volatile memory is volatile, the data in the storage table will be lost in the event of data loss in the storage table, such as power outage or system crash. Moreover, in the storage system, the database transaction (i.e., the operation or sequence of operations on the data) should meet the ACID principle, i.e., atomicity, consistency, independence and durability. At least in order to ensure atomicity and durability, it is generally necessary to set up log storage space, or log blocks, or log disks on non-volatile storage devices to store logs associated with the storage table. In the following, logs are sometimes also referred to as log files or write-ahead logs.

[0018] For example, in the event of data loss in the storage table, the log can be used to recover the data (sometimes also called replay) to ensure durability. Therefore, before the data to be stored is written to the storage table, it is generally necessary to store it in the log file as a record entry. In order to recover the lost data in the storage table, it is necessary to obtain the required record entries from the log file to restore the storage table in the volatile memory. This will cause a certain delay, and the data in the log needs to be written to the volatile memory again, which occupies system resources and affects the IO performance of the storage system.

[0019] The embodiments of the present disclosure provide a method for data storage using persistent memory. In this method, the data to be written is first cached in a log file in the persistent memory of a storage system, and then, when a predetermined condition is met, the data to be written is written from the log file to a storage table in the same persistent memory, and the storage table will be merged into a large-capacity storage device of the storage system. In this way, the storage efficiency of the storage system can be effectively improved.

[0020] Figure 1 FIG. 1 is a schematic diagram of an exemplary environment 100 according to an embodiment of the present disclosure, in which the device and / or method according to an embodiment of the present disclosure may be implemented. Figure 1 As shown, the storage system 104 may receive a request from a user device to store data to be stored. According to the request, the storage system 104 may store the data to be stored in an appropriate location, for example, in the first storage device 106 or in the second storage device 108. In some embodiments, the management device 110 of the storage system may cause the data to be stored to be first stored in the first storage device 106, for example, in a storage table (not shown) in the first storage device 106. Then, as the storage system 104 operates to receive more data from the user device, the management device 110 may cause the data to be stored to be stored from the first storage device 106 to the second storage device 108 if a predetermined condition is met.

[0021] It is understandable that although Figure 1 Only one first storage device 106 and one second storage device 108 are shown, but the application does not limit the number. In some embodiments, as will be discussed in detail below, there may be multiple first storage devices at multiple storage system nodes, for example, to make the storage system more fault-tolerant. The storage system nodes may be located at different geographical locations and communicate via a network.

[0022] In some embodiments, the functionality of the management device 110 may be implemented by one of the multiple storage nodes in the storage system. In some embodiments, the management device 110 may be a component in the storage system, such as a controller in the storage system. In some other embodiments, the management device 110 may also be communicatively coupled with the storage system 104. It should be understood that the above structure is merely exemplary and the embodiments of the present disclosure are not limited thereto.

[0023] The term "first storage device" used in this article may refer to a persistent memory located on the bus. The persistent memory is persistent, that is, the data stored thereon will not be lost in situations such as power failure or system crash. The cost and capacity of the persistent memory are superior to conventional volatile memory. The persistent data structure in the persistent memory can be designed to replace the data structure in a conventional volatile memory such as RAM, so as to achieve byte-addressable in-place updates and durability.

[0024] The persistent memory can be accessed by applications using a persistent memory development kit, for example. The persistent memory can be configured to implement the functionality of a conventional memory, or it can be configured to implement the functionality of a conventional storage disk.

[0025] Generally speaking, the read / write latency of RAM can be in the order of tens of nanoseconds, the read / write latency of persistent memory can be in the order of hundreds of nanoseconds, and the read / write latency of SSD disk according to NVMe protocol can be in the order of microseconds. Therefore, persistent memory also has good latency characteristics. However, since the adopted protocols are different from conventional memories, their management methods will be very different. Therefore, there is a need for the design of data structures such as storage tables on persistent memory.

[0026] Hereinafter, the first storage device is sometimes also referred to as "persistent storage device" or PMEM.

[0027] The term "second storage device" used in this document may refer to a storage disk or a collection of storage disks, and the storage disk may be various types of devices with storage functions, including but not limited to a hard disk (HDD), a solid-state disk (SSD), a removable disk, a serial attached small computer system interface (SCSI) storage disk (SAS), a serial advanced technology attachment (SATA) storage disk, any other magnetic storage device, and any other optical storage device, or any combination thereof.

[0028] The following will combine Figures 2 to 4 The process of controlling data storage according to the embodiment of the present disclosure is described in detail. For ease of understanding, the specific data mentioned in the following description are exemplary and are not intended to limit the protection scope of the present disclosure.

[0029] Figure 2 A block diagram of a process 200 for storing data according to an embodiment of the present disclosure is schematically shown. Figure 3 The process 200 is described in detail with reference to the distributed storage system 300 according to an embodiment of the present disclosure. The process 200 may be performed in Figure 1 The management device 110 shown in Figure 3 It should be understood that process 200 may also include additional actions not shown and / or may omit the actions shown, and the scope of the present disclosure is not limited in this respect.

[0030] At block 202 , the management device 310 may determine a number of at least one first storage device of the storage system 304 , each first storage device being persistent and storing a log including record entries of data to be stored.

[0031] Reference now Figure 3, the storage system 304 may include multiple persistent storage devices. For example, the storage system 304 may include three persistent storage devices 3061, 3062, and 3063 as shown in the figure, and the persistent storage devices 3061, 3062, and 3063 are respectively set in three storage system nodes 3051, 3052, and 3053. The persistent storage device 3061 includes a log 3121 and a storage table 3141, the persistent storage device 3062 includes a log 3122 and a storage table 3142, and the persistent storage device 3063 includes a log 3123 and a storage table 3143. In some embodiments, the persistent storage device may be configured to function as a memory, but the data stored therein (e.g., logs and storage tables) will not be lost in situations such as power failure.

[0032] It is understandable that multiple storage system nodes and corresponding persistent storage devices are set to ensure the reliability and redundancy of the storage system 304. In some embodiments, for a storage system that does not have a high reliability requirement and does not need to be set up for redundancy, there may be only one storage system node (for example, storage system node 3052) in the storage system, and the embodiments of the present disclosure are still applicable to such a storage system.

[0033] In some embodiments, the storage tables 3141 , 3142 , and 3143 may be designed such that from the perspective of the user equipment or even the second storage device, the multiple storage tables are regarded as an integrated storage table.

[0034] exist Figure 3 In the distributed storage system with three nodes in FIG. 305 , one storage system node 3052 can be regarded as a primary storage system node, and the remaining two storage system nodes 3051 and 3053 can be regarded as auxiliary storage system nodes. The primary storage system node is configured to coordinate the operation of the auxiliary storage system node. Therefore, in some embodiments, the node where the management device 310 is located can be regarded as the primary storage system node.

[0035] The storage system 304 may receive a request from a user device to write data to be stored. In some embodiments, the storage system nodes 3051-3053 may receive the data to be stored simultaneously. In some embodiments, the data to be stored may first be received by the primary storage system node 3052, and then, for example, when the data to be stored is successfully included in the log 3122 of the persistent storage device 3062 as a record entry 3131, the management device 310 may forward the data to be stored to the storage system nodes 3051, 3053, and thus the corresponding persistent storage devices 3061, 3063.

[0036] The data to be stored is to be stored in the tree structure of the storage system 304. First, the data to be stored needs to be stored in the storage tables 3141, 3142, 3143. In order to ensure the atomicity of the transaction, before being stored in the storage table, the management device 310 first causes the logs 3121, 3122, 3123 in the persistent storage devices 3061, 3062, 3063 to record the data to be stored as a record entry.

[0037] The term "log" used in this document may have a data structure, which is designed to record a sequence of record entries in the order of writing. For example, taking log 3122 as an example, a sequence of record entries 3131, 3132, and 3133 are recorded in sequence, and each record entry is associated with corresponding data to be stored. For example, the most recently written data to be stored is recorded in the record entry 3131 at the end of the log queue. In some embodiments, the log may use the form of a write-ahead log, and therefore other relevant information, such as a sequence number, etc., should also be recorded in the record entry.

[0038] In some embodiments, determining the number of at least one first storage device may include: receiving a confirmation message from one of the multiple persistent storage devices 3061, 3062, 3063, the confirmation message indicating that the log stored in the persistent storage device includes record entries of data to be stored; and determining the persistent storage device as the first storage device.

[0039] Still Figure 3 . When the data to be stored is sent to the persistent storage devices 3061, 3062, and 3063 and has been included in the corresponding log, the corresponding persistent storage device may send a confirmation message to the management device 310 of the primary storage system node 3052. For example, assume that the management device 310 receives a confirmation message from the persistent storage device 3061 in addition to the confirmation message from the persistent storage device 3062, but does not receive a confirmation message from the persistent storage device 3063 due to reasons such as network interruption. In the above situation, the management device 310 may determine the persistent storage devices 3061 and 3062 as first storage devices, and determine that the number of at least one first storage device is 2.

[0040] Back to reference Figure 2 , in block 204 , the management device 310 may determine whether the number of at least one first storage device is greater than a threshold number.

[0041] The threshold number may be set according to the reliability requirements of the storage system. In some embodiments, the threshold number may be set so that when most nodes have logs containing data to be stored, the management device 310 may write the data to be stored into the storage table. Figure 3 In the example in , in a storage system with 3 nodes, the threshold number can be set to 1 while tolerating a single node being unresponsive.

[0042] In box 206, if it is determined that the number of at least one first storage device is greater than the threshold number, the management device 310 can write the data to be stored from the log where the data to be stored is located to the corresponding storage table, and the data in the storage table will be written to the second storage device of the storage system.

[0043] Again Figure 3 In the example of a storage system with three nodes, if the threshold number is set to 1, the management device 310 may determine that the number of at least one first storage device is greater than the threshold number when at least two first storage devices exist. In some embodiments, the management device may determine that the number of at least one first storage device is greater than the threshold number only when a confirmation message is received from the persistent storage device 3062 in the primary storage system node 3052.

[0044] Then, the management device 310 may send a write request to at least one first storage device so that the data to be stored is written from the log of at least one first storage device to the corresponding storage table. For example, upon receiving a confirmation message from the persistent storage devices 3061, 3062, 3063, the management device 310 may send a command (e.g., a commit command) to the persistent storage devices 3061, 3062, 3063 so that the data to be stored associated with the record entries in the logs 3121, 3122, 3123 in the persistent storage devices 3061, 3062, 3063 are written to the storage tables 3141, 3142, 3143, respectively. In some embodiments, the storage table may, for example, store a plurality of key-value pairs written during a period of time in an ordered manner.

[0045] In some embodiments, when all the above actions are completed, the management device 310 may send a message to the user indicating that the writing is successful.

[0046] In some embodiments, if it is determined that the number of the at least one first storage device is not greater than the threshold number, the management device 310 causes the record entry of the data to be stored to be removed from each log.

[0047] In this case, the reliability of the storage system cannot be guaranteed. Figure 33062 to write the data to be stored into the storage table 3142. In this case, the management device 310 removes the record entry 3131 associated with the data to be stored from the log 3122. And the user request will be rejected and fail. In some embodiments, when all the above actions are completed, the management device 310 can send a message to the user indicating that the write failed.

[0048] In this way, when the number of at least one first storage device is not greater than a threshold number, the data to be stored can be revoked using a log, thereby ensuring the consistency of data on multiple nodes and ensuring the atomicity of data write operations.

[0049] When the predetermined conditions are met, the data in the storage table will be written into the second storage device ( Figure 3 This will be referred to below. Figure 4 for a more detailed discussion.

[0050] In a conventional distributed storage system using volatile memory, log files generally need to be copied to blocks or storage disks of multiple storage system nodes (e.g., 3 or more) so that log files can still be obtained when one or more storage system nodes in the multiple storage system nodes cannot be used. In this case, when the log is replayed, the log file may need to be loaded from a remote storage node across the network, which will introduce higher latency.

[0051] According to the embodiments of the present disclosure, the storage table in the first storage device itself can provide data persistence, so there is no need to set up a block or storage disk for storing log files in the second storage device, and thus the process of using the log files in the second storage device to recover (i.e., replay) data in the case of system restart can be omitted, thereby saving the time spent on the process and the system resources occupied. In addition, since the log files are also stored in the first storage device in the same storage system node, there is no need to load the log files from the remote storage system node across the network, thereby further reducing the delay.

[0052] In some embodiments, the storage system 304 may also receive a read request for data to be read. The read request will be processed, for example, at the storage system node 3052 including the management device 310. For example, the storage system node 3052 may coordinate the storage system nodes 3051 and / or 3053 to retrieve the data to be read from the storage table of the persistent storage device therein or the second storage device, thereby providing consistency for the read request.

[0053] In the following, reference will be made to Figure 1 and Figure 4 To describe how to store data from a first storage device to a second storage device. Figure 4 The block diagram schematically shows a process of storing data in a second storage device according to an embodiment of the present disclosure.

[0054] like Figure 4 As shown, in block 402, the management device 110 may determine the size of the stored data in the storage table. Here, since the storage table has a certain capacity, after the data is written into the storage table in the first storage device 106, it may not be immediately written into the second storage device 108 such as a solid state drive.

[0055] In box 404, the management device 110 can determine whether the size of the stored data is greater than a threshold size. The threshold size can indicate the size of the data that the storage table can store. Since the first storage device 106 uses persistent memory, its maximum capacity is relatively large compared to conventional volatile memory, so the size of the data that the storage table therein can store can also be relatively large. In some embodiments, the threshold size can be determined based on the maximum capacity of the first storage device 106 where the storage table is located. For example, the threshold size can be equal to 128GB, but other sizes are also possible. The threshold size can be selected so that when the data to be stored (e.g., a key-value pair associated with metadata, such as a size of 1KB) is written to the storage table, the management device 110 determines that the size of the stored data is greater than the threshold size, and the storage table is just filled.

[0056] In block 406 , if it is determined that the size of the stored data is greater than the threshold size, the management device may cause the stored data in the storage table to be written from the first storage device 106 where the storage table is located to the second storage device 108 .

[0057] The storage table may be part of a tree structure in the storage system. Since the data that the storage table can store is limited, when the storage table 108 in the first storage device 106 is full, the storage table 108 will be stored in a second storage device 108 with a larger capacity. This process may be called a dump, which may be implemented, for example, by merging the storage table into another table on the second storage device 108 in the tree structure. These other tables may store sorted data (e.g., sorted key-value pairs).

[0058] In some embodiments, the tree structure may adopt an LSM tree structure, the storage table 108 in the first storage device 106 may be located at the first level in the LSM tree structure, and the other tables on the second storage device 108 may be located at the second level or higher level in the LSM tree structure. Whenever a predetermined condition is met, the management device 110 will trigger the merging of table files in a lower level to table files in a higher level. It is understandable that merging a file to a higher level may require writing multiple files, and there is a certain degree of write amplification.

[0059] In some embodiments, after block 406 is executed, the management device 110 may clear the storage table 108 to prepare for subsequent writing of new data to be stored.

[0060] As discussed above, storing data from one storage device (e.g., persistent memory) to another storage device (e.g., (multiple) storage disks) can be referred to as dumping. Since there will be data to be stored that is continuously written in the storage system of cloud storage systems, it can be considered that a dump is performed approximately at predetermined intervals in the storage system. The dump process will occupy a large amount of system resources (e.g., IO resources), affect the write speed and cause write amplification, so frequent dumping is not desired.

[0061] The dump time between two adjacent dumps can be calculated using the following formulas (1) and (2):

[0062] TPS=N / L (1)

[0063] T=(C*r) / (K*TPS) (2)

[0064] Wherein TPS represents the number of transactions per second; N represents the number of parallel threads, generally, 1 thread per table on a single node; L represents the delay for a write request; K represents the size of the key value, in a typical storage system, K may be, for example, equal to 1KB; r represents the utilization ratio of the total capacity of the memory (e.g., dynamic random access memory, or persistent storage device), in a typical storage system, r may be, for example, equal to 0.8 or greater; C represents the total capacity of the storage table, that is, the total size of the data that can be stored in the storage table; T represents the dump time, which may indicate the interval time between two adjacent dumps. The following Table 1 shows a typical example of the above parameters of a storage system using a dynamic random access memory and a persistent storage device (i.e., the first storage device described above).

[0065] Table 1 Exemplary parameters of storage tables in DRAM and PMEM

[0066]

[0067]

[0068] Since the capacity of PMEM is much larger than that of DRAM, the capacity of the storage table in PMEM is in the order of GB (e.g., 128 GB), which is much larger than the capacity of the storage table in DRAM (e.g., 128 MB) which is in the order of MB. At the same time, due to the reasons discussed above, the delay (e.g., 200 us) of the storage system using the storage table in PMEM is much smaller than the delay (e.g., 2 ms) of the storage system using the storage table in DRAM. In one example, when K is the same as r, it can be calculated using the above equations (1) and (2) and the exemplary parameters in Table 1 that the dump time of the storage system using the storage table in PMEM is about 20,000 seconds, while the dump time of the storage system using the storage table in DRAM is about 200 seconds. Therefore, the dump time of the storage system using the storage table in PMEM is much larger than that of the storage system using the storage table in DRAM.

[0069] According to an embodiment of the present disclosure, using a storage table in a first storage device such as PMEM for data storage can significantly increase the dump time, thereby reducing the dump frequency of storage from the first storage device to the second storage device. A smaller dump frequency can further reduce write amplification and achieve higher storage system stability, so the storage efficiency of the storage system can be improved.

[0070] Figure 5 1 is a schematic block diagram of an example electronic device 500 that can be used to implement an embodiment of the present disclosure. For example, the electronic device 500 can be used to implement Figure 1 or Figure 3 500 is a management device shown in FIG. As shown, device 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes according to computer program instructions stored in a read-only memory (ROM) 502 or computer program instructions loaded from a storage unit 508 into a random access memory (RAM) 503. In RAM 503, various programs and data required for the operation of device 500 can also be stored. CPU 501, ROM 502 and RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to bus 504.

[0071] A number of components in the device 500 are connected to the I / O interface 505, including: an input unit 506, such as a keyboard, a mouse, etc.; an output unit 507, such as various types of displays, speakers, etc.; a storage unit 508, such as a disk, an optical disk, etc.; and a communication unit 509, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 509 allows the device 500 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0072] The processing unit 501 performs the various methods and processes described above, such as any one of the processes 200, 400, and 500. For example, in some embodiments, any one of the processes 200, 400, and 500 may be implemented as a computer software program or a computer program product, which is tangibly contained in a machine-readable medium, such as a storage unit 508. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 500 via the ROM 502 and / or the communication unit 509. When the computer program is loaded into the RAM 503 and executed by the CPU 501, one or more steps in any of the processes 200, 400, and 500 described above may be performed. Alternatively, in other embodiments, the CPU 501 may be configured to perform any one of the processes 200 and 400 by any other suitable means (e.g., by means of firmware).

[0073] The present disclosure may be a method, an apparatus, a system and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present disclosure.

[0074] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, any non-temporary storage device, or any suitable combination of the above. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the above. The computer-readable storage medium used herein is not to be interpreted as a transient signal itself, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.

[0075] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.

[0076] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.

[0077] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.

[0078] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0079] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0080] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.

[0081] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.

[0082] According to some embodiments of the present disclosure, a computer readable medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method according to the present disclosure is implemented.

[0083] Those skilled in the art should understand that the various steps of the method disclosed above can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a first storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present disclosure is not limited to any specific combination of hardware and software.

[0084] It should be understood that although several devices or sub-devices of the device are mentioned in the detailed description above, this division is only exemplary and not mandatory. In fact, according to an embodiment of the present disclosure, the features and functions of two or more devices described above can be embodied in one device. Conversely, the features and functions of one device described above can be further divided into multiple devices to be embodied.

[0085] The above description is only an optional embodiment of the present disclosure and is not intended to limit the present disclosure. For those skilled in the art, the present disclosure may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A method for storing data, comprising: Receiving, by a primary storage system node of a storage system including a processor, a request to write a record entry, wherein the primary storage system node includes a management device; The primary storage system node writes the record entry into a log in a local storage of the primary storage system node; Instructing, by the primary storage system node, each of a group of secondary storage system nodes to write the record entry into each log of the secondary storage system node, wherein each log is configured to store a record entry of data to be stored, and wherein each log is persistent; The master storage system node determines the number of storage system nodes that have completed writing the record entry; Determining, by the primary storage system node, that the number is greater than a threshold number; as well as In response to determining that the number is greater than the threshold number, the main storage system node instructs the storage system node that has completed writing the record entry to write the record entry from the various logs where the data to be stored is located into the corresponding storage tables, and the data in the corresponding storage tables will be written to the second storage device of the storage system.

2. The method of claim 1 , wherein determining the number of the storage system nodes comprises: receiving a confirmation message from one of the storage system nodes, the confirmation message indicating that a log stored in the storage system node includes the record entry; as well as Determining the number of storage system nodes includes the one storage system node.

3. The method of claim 1 , wherein writing the log entry comprises: In response to determining that the number is greater than the threshold number, a write request is sent from the primary storage system node to the secondary storage system node so that the record entries are written from the respective logs to the corresponding respective storage tables, wherein the primary storage system node is configured to store the record entries.

4. The method according to claim 1, further comprising: In response to determining that the number is not greater than the threshold number, the record entry is removed from the respective log.

5. The method according to claim 1, further comprising: Determine the size of the stored data in the first storage table of each corresponding storage table; as well as In response to determining that the size of the stored data is greater than a threshold size, the stored data in the first storage table is written from one of the auxiliary storage system nodes to the second storage device, wherein the one auxiliary storage system node is the auxiliary storage system node where the first storage table is located. 6 . The method according to claim 5 , wherein the threshold size is determined based on a maximum capacity of the auxiliary storage system node where the first storage table is located. 7 . The method according to claim 1 , wherein the corresponding storage tables are parts of tree structures of the storage system.

8. An electronic device comprising: processor; as well as A memory coupled to the processor, the memory having instructions stored therein, wherein when the instructions are executed by the processor, the electronic device performs actions, the actions comprising: Determining, by a primary storage system node of the storage system, a group of secondary storage system nodes and the number of storage system nodes in the primary storage system node that have completed writing record entries of the data to be stored into respective logs, wherein each secondary storage system node in the group of secondary storage system nodes is persistent, and wherein each storage system node in the number of storage system nodes is configured to store a corresponding log in the respective logs; as well as Based on the main storage system node determining that the number is greater than a threshold number, the main storage system node instructs the storage system node to write the record entry from the respective logs where the record entry is located into the corresponding storage tables, wherein the main storage system node is configured to store the record entry, and wherein the data in the respective storage tables will be written to another storage device of the storage system that is different from the main storage system node and the group of auxiliary storage system nodes.

9. The electronic device of claim 8, wherein determining the number of the storage system nodes comprises: receiving a confirmation message from one of the storage system nodes, the confirmation message indicating that a log stored in the storage system node includes the record entry; as well as Determining the number of storage system nodes includes the one storage system node.

10. The electronic device according to claim 8, wherein writing the record entries from the respective logs into the corresponding respective storage tables comprises: In response to determining that the number is greater than the threshold number, a write request is sent from the primary storage system node to the secondary storage system node so that the record entries are written from the respective logs to the corresponding respective storage tables, wherein the storage table of the primary storage system node is configured to store the record entries.

11. The electronic device of claim 8, wherein writing the log entry comprises: The record entry is removed from the respective log.

12. The electronic device according to claim 8, wherein the actions further comprise: Determine the size of the stored data in the first storage table of each storage table; as well as Based on determining that the size of the stored data is greater than a threshold size, the stored data in the first storage table is written from one of the secondary storage system nodes to the other storage device. 13 . The electronic device according to claim 12 , wherein the threshold size is determined based on a maximum capacity of the auxiliary storage system node where the first storage table is located.

14. The electronic device according to claim 8, wherein the respective storage tables are part of respective tree structures of the storage system.

15. A non-transitory computer-readable storage medium storing machine-executable instructions, which, when executed by a device, cause the device to perform the method according to any one of claims 1 to 7.