Data storage method and apparatus, product, and non-volatile readable storage medium
By using a distributed hash table algorithm and a delayed recovery strategy in a distributed storage system, healthy and degraded replica nodes are identified, solving the problem of low IO write efficiency under node failure and achieving efficient data recovery and IO performance optimization in failure scenarios.
Patent Information
- Application Number
- PCT/CN2025/108229
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-07-12
- Filing Date
- 2025-07-11
- Publication Date
- 2026-01-15
AI Technical Summary
In the event of node failure, existing technologies suffer from reduced IO write operation efficiency and are affected by the data recovery process, leading to business interruption.
A distributed hash table algorithm is used to determine healthy and degraded replica nodes. Data recovery is performed on degraded replica nodes through a delayed recovery strategy. I/O read and write are implemented using a degraded replica list and data bitmap markers, thus eliminating the dependency between I/O and data recovery.
Optimize IO performance in fault scenarios, improve IO read and write efficiency, ensure data fault tolerance and consistency, and reduce the performance impact of faults on business.
Smart Images

Figure CN2025108229_15012026_PF_FP_ABST
Abstract
Description
A data storage method, product, apparatus, and non-volatile readable storage medium.
[0001] Cross-reference to related applications
[0002] This application claims priority to Chinese Patent Application No. 202410931650.1, filed on July 12, 2024, entitled “A Data Storage Method, Product, Apparatus and Medium”, the entire contents of which are incorporated herein by reference. Technical Field
[0003] This application relates to the field of data storage technology, and in particular, to a data storage method, product, apparatus, and non-volatile readable storage medium. Background Technology
[0004] The replication mechanism in Software Defined Storage (SDS) is a key data protection technology used to improve data reliability and availability.
[0005] Multiple replicas protect data by storing the same data on different nodes. In a failure scenario, if one node fails, the system can store or retrieve replicas from the remaining nodes. However, input / output (IO) write operations can only be completed after the lost or faulty replicas have been recovered. During the data recovery process, node failures can impact the efficiency of IO write operations; and for nodes that have failed and are interrupted, data recovery is required, which consumes additional bandwidth and also affects the IO write process.
[0006] Therefore, there are technical challenges in related technologies, namely, how to reduce the impact on the IO process and improve the efficiency of IO write operations in the event of node failure. Summary of the Invention
[0007] This application provides a data storage method, product, device, and non-volatile readable storage medium to address the problem of reduced IO write operation efficiency during the data recovery process in the event of node failure.
[0008] To address the aforementioned technical problems, according to a first aspect of this application, a data storage method is provided, comprising: when the health state of a current cluster node in a distributed storage system is in a degraded state, acquiring a faulty node and its corresponding replica data; determining, according to a distributed hash table algorithm, a healthy replica node and a degraded replica node for storing the replica data corresponding to the faulty node, so as to facilitate read / write operations of the replica data corresponding to the faulty node in the healthy replica node and the degraded replica node; wherein, the time during which the degraded replica of the degraded replica node occupies the input / output read / write capability during data recovery is less than the time during which the healthy replica of the healthy replica node occupies the input / output read / write capability; the degraded replica of the degraded replica node is obtained through a degraded replica list and data bitmap marking; and performing data recovery on the degraded replica of the degraded replica node according to a delayed recovery strategy to complete data storage.
[0009] In some embodiments, the write operation of replica data corresponding to a failed node is performed on healthy replica nodes and degraded replica nodes, including: when the current failed node enters a degraded state, calculating the node positions of the current failed node on healthy and degraded replica nodes according to a distributed hash table algorithm; forwarding the replica data corresponding to the failed node to healthy and degraded replica nodes to complete the write operation; wherein, during the write process on the degraded replica node, the tag and metadata attribute information of the degraded replica data corresponding to the replica data are added to the degraded replica list and the valid data bitmap to facilitate the reading operation.
[0010] In some embodiments, calculating the node positions of the healthy and degraded replica nodes where the replica data of the current faulty node is located based on a distributed hash table algorithm includes: calculating the node positions of the healthy and degraded replica nodes where the replica data of the current faulty node is located based on a node distributed hash table algorithm and a disk distributed hash table algorithm, wherein the distributed hash table algorithm includes a node distributed hash table algorithm and a disk distributed hash table algorithm.
[0011] In some embodiments, before the current faulty node fails and enters a degraded state, the method further includes: retrying to read the replica data of the current faulty node according to a first preset time from the start of the failure of the current faulty node; and performing the write service of the replica data of the current faulty node when the first preset time expires and the degraded state is entered.
[0012] In some embodiments, the process of reading replica data corresponding to a failed node in healthy replica nodes and degraded replica nodes includes: obtaining a degradation event record when the current failed node enters a degraded state; filtering each cluster node of the distributed storage system according to a distributed hash table algorithm and the degradation event record to obtain the location corresponding to the healthy replica node, so as to facilitate reading the replica data of the healthy replica node; reading the degraded replica node when the number of healthy replica nodes is 0; obtaining the valid data bitmap corresponding to the degraded replica node; and reading according to the valid data bitmap corresponding to the degraded replica node, so as to facilitate reading the replica data of the degraded replica node.
[0013] In some embodiments, before the current faulty node fails and enters a degraded state, the method further includes: reading healthy replica data on other faulty nodes besides the current faulty node from the start of the failure of the current faulty node.
[0014] In some embodiments, performing the replica data reading service corresponding to the failed node in healthy replica nodes and degraded replica nodes includes: selecting one replica node from healthy replica nodes and degraded replica nodes to perform the replica data reading service corresponding to the failed node based on the availability parameter of the replica data in healthy replica nodes and degraded replica nodes and the performance index parameter of healthy replica nodes and degraded replica nodes, wherein the availability parameter is used to indicate the availability of replica data, and the performance index parameter is used to indicate the performance of healthy replica nodes and degraded replica nodes.
[0015] In some embodiments, data recovery of the downgraded replica of the downgraded replica node according to the delayed recovery strategy to complete data storage includes: checking whether data recovery is required in the cluster node according to a second preset time; if data recovery is required in the cluster node, determining the list of data to be recovered corresponding to the cluster node according to the distributed hash table algorithm; and recovering the downgraded replica of the downgraded replica node according to the data object recovery request of the list of data to be recovered to complete data recovery.
[0016] In some embodiments, the downgraded replica of the downgraded replica node is restored according to the data object restoration request of the data list to be restored in order to complete the data restoration, including: traversing the data list to be restored to obtain the data object restoration request; and restoring the downgraded replica of the downgraded replica node according to the data object restoration request.
[0017] In some embodiments, checking whether data recovery is required in the cluster nodes according to a second preset time includes: determining whether the cluster nodes meet preset conditions according to the second preset time; if the cluster nodes meet the preset conditions, determining that the cluster nodes need to perform data recovery; wherein the preset conditions are at least one of the following: there is no data recovery task being executed in the cluster nodes; there is no data migration task being executed in the cluster nodes; and none of the nodes in the cluster nodes are in a degraded state.
[0018] In some embodiments, restoring a degraded replica of a degraded replica node based on a data object recovery request in a list of data to be restored includes: determining whether a data object needs to be restored; if a data object needs to be restored, reading the corresponding replica data from a healthy replica node; overwriting the data at the node location where the degraded replica node is located; and updating the data object from a degraded state to a healthy state to complete the recovery task of the data object recovery request.
[0019] In some embodiments, restoring a degraded replica of a degraded replica node based on a data object recovery request from a data list to be restored includes: obtaining the level corresponding to the business priority policy and the recovery task priority policy; and restoring the degraded replica of the degraded replica node based on the priority policy corresponding to the highest level and the data object recovery request from the data list to be restored.
[0020] In some embodiments, determining the health status of the current cluster node as a degraded state includes: monitoring the status information corresponding to each cluster node in the distributed storage system according to a third preset time; wherein the status information includes at least one or more types of information such as disk status information, node status information, and network fault information; in the case of a fault in the status information, a fault event is generated and a task trigger is triggered; the task trigger is controlled to generate a cluster degrade task, and the health status of the cluster node corresponding to the fault event is set to a degraded state.
[0021] In some embodiments, the control task trigger generates a cluster degradation task, including: the control task trigger generates a trigger instruction, wherein the trigger instruction is used to set the health status of the corresponding cluster node to a degradation state; the control task trigger sends the trigger instruction to the current cluster node.
[0022] In some embodiments, after determining that the current health status of the cluster node is in a degraded state, before obtaining the faulty node and its corresponding replica data, the method further includes: obtaining the degraded task generated by the fault event; updating the status information corresponding to the degraded task to facilitate entering the step of obtaining the faulty node and its corresponding replica data; wherein the status information corresponding to the degraded task includes at least one or more of the following: distributed hash table, version number of the distributed hash table, disk epoch, status of each node, disk status, and cluster node status.
[0023] In some embodiments, determining the health status of the current cluster node as a degraded state includes: monitoring the status information of each cluster node in the distributed storage system according to a fourth preset time; obtaining operation and maintenance instructions, and triggering corresponding operation and maintenance events according to the operation and maintenance instructions; wherein, the operation and maintenance events include at least disk mount and unmount events and / or cluster node addition and deletion events; triggering task triggers according to the operation and maintenance events; controlling the task triggers to generate cluster degrade tasks, and setting the health status of the cluster node corresponding to the operation and maintenance event to a degraded state.
[0024] In some embodiments, after determining that the current health status of the cluster node is in a degraded state, and before obtaining the faulty node and its corresponding replica data, the method further includes: obtaining the degraded task generated by the operation and maintenance event; updating the status information corresponding to the degraded task, wherein the status information corresponding to the degraded task includes at least one of the following: distributed hash table, version number of the distributed hash table, disk epoch, status of each node, disk status, and cluster node status; obtaining the data migration task and executing the data migration task.
[0025] To address the aforementioned technical problems, according to a second aspect of the embodiments of this application, this application also provides a computer program product, including a computer program / instructions, which, when executed by a processor, implements the steps of a data storage method.
[0026] To address the aforementioned technical problems, according to a second aspect of the embodiments of this application, this application also provides a data storage device, comprising: a memory configured to store a computer program; and a processor configured to implement the steps of the data storage method as described above when executing the computer program.
[0027] To address the aforementioned technical problems, according to a third aspect of the embodiments of this application, this application also provides a non-volatile readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of the data storage method described above.
[0028] This application provides a data storage method, comprising: when the health state of the current cluster node in a distributed storage system is in a degraded state, acquiring the faulty node and its corresponding replica data; determining the healthy replica node and degraded replica node for storing the replica data corresponding to the faulty node according to a distributed hash table algorithm, so as to facilitate read and write operations of the replica data corresponding to the faulty node in the healthy replica node and the degraded replica node; wherein, the time that the degraded replica of the degraded replica node occupies the input / output read / write capability during the data recovery process is less than the time that the healthy replica of the healthy replica node occupies the input / output read / write capability; the degraded replica of the degraded replica node is obtained through a degraded replica list and data bitmap marking; and performing data recovery on the degraded replica of the degraded replica node according to a delayed recovery strategy to complete data storage.
[0029] The beneficial effects of this application lie in utilizing a data distribution design based on a distributed hash table algorithm to create corresponding degraded replica nodes, enabling normal read and write operations without IO recovery. Through a degraded replica list and valid data bitmap marking, IO read and write operations are implemented after cluster degradation, eliminating the dependency between IO and data recovery and ensuring that data fault tolerance does not decrease after degradation. It supports delayed data recovery in fault scenarios to complete the data recovery process, minimizing the performance impact of faulty devices on business IO, optimizing IO performance, and improving IO read and write efficiency.
[0030] Secondly, an event-aware cluster degradation framework is established for fault scenarios to facilitate timely entry into cluster degradation state and ensure data recovery of subsequent faulty nodes. During the degradation write process, the configuration of the degradation replica list and the marking of the effective data bitmap ensure that data fault tolerance does not decrease after degradation, guaranteeing orderly data writing. Monitoring is performed according to a second preset time to ensure the accuracy of delayed recovery tasks, providing assurance during subsequent data recovery and reducing the impact on IO performance. The data recovery request process ensures the effectiveness of data recovery tasks, delaying the direct impact of faults on data recovery and guaranteeing IO performance and consistency after a fault. Fault tolerance after degradation is ensured by ensuring that the number of healthy replicas + degradation replicas is greater than or equal to the number of data replicas. Corresponding priority strategies are set based on different application scenarios to improve the flexibility and diversity of data recovery and enhance the user experience.
[0031] In addition, this application also provides a computer program product, a data storage device, and a non-volatile readable storage medium, which have the same beneficial effects as the data storage method described above. Attached Figure Description
[0032] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0033] Figure 1 is a flowchart of a data storage method provided in an embodiment of this application;
[0034] Figure 2 is a schematic diagram of an operation and maintenance and fault scenario corresponding to a degraded state provided in an embodiment of this application;
[0035] Figure 3 is a schematic diagram of a data storage scenario provided in an embodiment of this application;
[0036] Figure 4 is a schematic diagram of a write service scenario for a downgraded replica node provided in an embodiment of this application;
[0037] Figure 5 is a schematic diagram of a read service scenario for a downgraded replica node provided in an embodiment of this application;
[0038] Figure 6 is a schematic diagram of a data recovery process using a delay strategy provided in an embodiment of this application;
[0039] Figure 7 is a structural diagram of a data storage device provided in an embodiment of this application. Detailed Implementation
[0040] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.
[0041] The core of this application is to provide a data storage method, product, device, and non-volatile readable storage medium to solve the problem of reduced IO write operation efficiency during the data recovery process in the event of node failure.
[0042] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0043] Currently, SDS typically utilizes replication mechanisms to ensure high data reliability. Existing replication distribution strategies and indexing mechanisms are often implemented based on the Distributed Hash Table (DHT) algorithm. A mapping relationship between data replicas and nodes / disks can be constructed according to the DHT algorithm, and then a replication module ensures replica consistency and data synchronization between replicas. Distributed storage systems based on the DHT data distribution algorithm can eliminate the need to build metadata management services, achieving lightweight replica indexing through a two-level mapping relationship. They can also handle common disk failures (disk unloading, disk mounting, etc.) and node failures (node power failure, node restart, node network outage, etc.). Failures trigger recovery tasks, and the task flow generates batch data recovery requests, submitting them to the recovery queue. Data is then recovered from other available data object replicas, achieving high data availability. Furthermore, to ensure replica fault tolerance, SDS generally requires strong consistency for I / O; I / O only returns after all replicas have completed the write operation. In the event of a distributed storage cluster failure, the I / O write operation can only be completed after the lost or faulty replicas have been recovered. However, the process of waiting for data recovery leads to I / O interruptions and a significant performance drop, amplifying the original I / O writes to data recovery writes, thus impacting upper-layer services. For example, in a scenario with 100 nodes, 30 of which are faulty and require data recovery, the I / O write capacity will be partially consumed by data recovery, interrupting the I / O write capability of the remaining 30 nodes and affecting write efficiency. Verification shows that I / O performance drops by over 90% in typical disk and host failure scenarios. The data storage method provided in this application can solve the above-mentioned technical problems.
[0044] Figure 1 is a flowchart of a data storage method provided in an embodiment of this application. As shown in Figure 1, it includes:
[0045] S11: When the health status of the current cluster node in the distributed storage system is in a degraded state, obtain the faulty node and its corresponding replica data.
[0046] S12: Determine the healthy and degraded replica nodes for storing the replica data corresponding to the faulty node based on the distributed hash table algorithm, so as to facilitate read and write operations of the replica data corresponding to the faulty node in the healthy and degraded replica nodes.
[0047] Among them, the time that the degraded replica of the degraded replica node occupies the input / output read / write capability during the data recovery process is less than the time that the healthy replica of the healthy replica node occupies the input / output read / write capability; the degraded replica of the degraded replica node is obtained through the degraded replica list and data bitmap marking;
[0048] S13: Perform data recovery on the downgraded replica of the downgraded replica node according to the delayed recovery strategy to complete data storage.
[0049] In some embodiments, the degraded state of the current cluster node in a distributed storage system is required to trigger the subsequent data recovery process. This embodiment can set a degraded state for the current cluster node in any scenario requiring data recovery, and is not limited thereto. The determination of the degraded state can be achieved through monitoring using a timer, or it can be set based on different application scenarios; the setting can be adjusted according to the actual situation.
[0050] The event-aware cluster degradation framework can quickly detect node and disk anomalies, enabling the cluster to enter a degradation state, shortening the duration of faulty I / O interruptions, ensuring I / O continuity, and supporting I / O read and write processes after degradation.
[0051] The cluster health status indicates that the cluster is in a healthy state and can provide services normally. In this state, IO uses a strong consistency scheme, and IO must be written to all replicas to complete. The cluster degradation status is triggered by operational or fault events, causing the cluster to enter a degradation state. In this state, IO uses a degradation write scheme, and IO must be written to both healthy and degraded replicas to complete.
[0052] In some embodiments, determining that the health status of the current cluster node is in a degraded state includes:
[0053] The status information of each cluster node in the distributed storage system is monitored according to the third preset time; the status information includes at least one or more of the following: disk status information, node status information, and network fault information.
[0054] If there is a fault in the status information, a fault event is generated and the task trigger is activated;
[0055] The control task trigger generates a cluster degradation task, and the health status of the cluster node corresponding to the fault event is set to the degradation state.
[0056] In some embodiments, the degradation awareness module, targeting typical fault and maintenance scenarios, constructs an event-aware cluster degradation framework, supporting the execution of degradation write schemes through cluster degradation status. In fault scenarios, the anomaly detection module monitors and identifies the status information corresponding to each cluster node, which includes at least one or more of the following: disk status information, node status information, and network fault information. Upon fault detection, a fault event is generated, notifying the task trigger, which then generates a cluster degradation task. The task trigger is configured to trigger each task within the cluster node based on triggering instructions.
[0057] After generating the cluster degradation task, in some embodiments, after determining that the health status of the current cluster node is in a degraded state, and before obtaining the faulty node and its corresponding replica data, the process further includes:
[0058] Obtain the degradation tasks generated by the failure event;
[0059] The status information corresponding to the degradation task is updated to facilitate the step of obtaining the faulty node and its corresponding replica data; wherein, the status information corresponding to the degradation task includes at least one or more of the following: distributed hash table, version number of the distributed hash table, disk epoch, status of each node, disk status, and cluster node status.
[0060] After triggering the cluster degradation task, this task notifies all nodes to enter a cluster degradation state, which affects the IO strategy. The degradation task needs to record the event that caused the degradation and the node where it occurred, for troubleshooting during I / O read / write operations. Since the data will be directly restored and reconstructed in the failure scenario, the status information corresponding to the degradation task needs to be updated here. It should be noted that the status information corresponding to the degradation task for the failure event in this embodiment has a different meaning than the status information corresponding to the cluster node in the above embodiment. The status information corresponding to the degradation task for the failure event includes the status information of the cluster node (cluster node status).
[0061] The distributed hash table here is a commonly used data distribution algorithm, consisting of a node DHT and a disk DHT. Data objects can calculate their node and disk locations based on these two levels of DHT. The version number corresponding to the distributed hash table is the cluster epoch. In a healthy cluster state, the epoch corresponding to the cluster DHT can be understood as the DHT version number, indicating that all nodes in the cluster are functioning correctly, data replicas can calculate the correct node location through this epoch, and all data is up-to-date. The disk epoch, in a healthy cluster state, is the epoch corresponding to the disk DHT, indicating that all disks within a node are functioning correctly, data can calculate the correct disk location through this disk epoch, and all data on the disk is up-to-date. The individual node status and the cluster node status are different; the former is based on the individual node status, while the latter is the overall node status of all nodes in the cluster system.
[0062] This embodiment provides an event-aware cluster degradation framework for fault scenarios, which facilitates timely entry into cluster degradation state and ensures the subsequent data recovery process of faulty nodes.
[0063] In other embodiments, determining the health status of the current cluster node as a degraded state includes:
[0064] The status information of each cluster node in the distributed storage system is monitored according to the fourth preset time.
[0065] Obtain operation and maintenance instructions and trigger corresponding operation and maintenance events based on the operation and maintenance instructions; among them, operation and maintenance events include at least disk mount and unmount events and / or cluster node addition and deletion events;
[0066] Task triggers are activated based on maintenance events;
[0067] The control task trigger generates a cluster degradation task, and the health status of the cluster node corresponding to the operation and maintenance event is set to the degradation state.
[0068] In some embodiments, the operation and maintenance scenario is actively triggered by operation and maintenance instructions, such as mounting and unmounting disks, adding and deleting cluster nodes, etc. The operation and maintenance instructions will form an operation and maintenance event notification to the task trigger, which will then generate a cluster degradation task.
[0069] In some embodiments, after determining that the health status of the current cluster node is in a degraded state, and before obtaining the faulty node and its corresponding replica data, the method further includes:
[0070] Retrieve degradation tasks generated by operational events;
[0071] Update the status information corresponding to the degradation task; the status information corresponding to the degradation task includes at least one or more of the following: distributed hash table, version number of the distributed hash table, disk epoch, status of each node, disk status, and cluster node status.
[0072] Obtain and execute data migration tasks to meet the operational needs of the operation and maintenance event and proceed to obtain the faulty node and its corresponding copy data.
[0073] In some embodiments, unlike the fault scenarios described above, the operation and maintenance scenario in this embodiment cannot immediately perform the data recovery process and can only complete the data recovery through a data migration task. Therefore, the status information such as the operation and maintenance requirements corresponding to the data migration task is updated.
[0074] Figure 2 is a schematic diagram of an operation and maintenance and fault scenario corresponding to a degraded state provided in an embodiment of this application. As shown in Figure 2, the degrade awareness framework triggers operation and maintenance events through operation and maintenance commands and monitors the status information of operation and maintenance events to facilitate the triggering of cluster degrade tasks. For fault events, the corresponding cluster degrade task is triggered through anomaly monitoring.
[0075] This embodiment provides an event-aware cluster degradation framework for operation and maintenance scenarios, which facilitates timely entry into cluster degradation state and ensures the subsequent data recovery process of faulty nodes.
[0076] The degraded replica node in step S12 is used to store degraded replicas. These degraded replicas reside on the degraded device in the cluster and are responsible for writing and reading new data. This replica is located on the disk of the new cluster epoch node or the disk of the new disk epoch, and is created or marked during degraded write IO type writes. Compared to the healthy replica, the degraded replica is only for writing and reading new data, reducing the workload of IO read / write operations. This is evident from the fact that the time occupied by the degraded replica during data recovery is less than the time occupied by the healthy replica node. Furthermore, degraded replicas are obtained by marking them through a degraded replica list and a data bitmap. It should be noted that the degraded replica list stores the data corresponding to each degraded replica, and the data bitmap contains the metadata attribute information corresponding to the replica data, such as the storage space occupied by the node.
[0077] The read / write operations described here refer only to specific business operations. In actual fault-prone write operations, if a node fails, the system detects this and stores a new copy on the remaining healthy nodes. For example, in a three-replica system, if one node fails, the system stores data copies on the other two healthy nodes. Write operations ensure that the number of data copies is restored to the expected number to maintain data redundancy and reliability. During read operations, if a node fails, the system reads data copies from other healthy nodes. The system selects the best node for reading based on the availability and performance metrics of the remaining copies. The system may automatically trigger a data reconstruction process on the failed node, rebuilding the data copy on a new or repaired node to restore the full number of copies. Data reconstruction during read operations is initiated based on a preset strategy, copying data from other healthy nodes to a new hard drive or node, or, in some cases, using erasure coding technology to reconstruct the complete data from partial data and verification information.
[0078] This distributed hash table (DHT) algorithm calculates healthy and degraded replica nodes for the data stored on the failed node's replica data. This algorithm is an improved DHT structure that enhances the system's scalability, fault tolerance, and efficiency. Data is distributed across different nodes in the network for fast data location and retrieval. A hash function maps keys to a fixed-size address space (typically 128 or 160 bits). This address space is divided into segments, each corresponding to a node in the network. Each node is responsible for storing and managing a specific segment in the hash table. Node IDs are typically generated using a hash function to ensure even distribution of nodes. When data is added to the DHT, its key is mapped to a specific node using the hash function. The data is then either stored on that node or routed to the node responsible for it. Each node maintains a routing table recording the location information of other nodes. This allows nodes to know how to route requests to the correct node. The DHT is designed to be fault-tolerant; the system continues to operate even if some nodes fail. Data typically has multiple replicas distributed across different nodes to improve data reliability.
[0079] In step S12, read and write operations are performed on the degraded replica node data, which reduces the read and write time corresponding to the IO read and write capacity. After the actual write operation, data recovery is performed based on a delayed recovery strategy, offloading some of the original IO read and write tasks so that subsequent data recovery can proceed. It should be noted that this data recovery does not occupy the current IO read and write operations, but is based on the node's internal processes to recover data.
[0080] Figure 3 is a schematic diagram of a data storage scenario provided by an embodiment of this application. As shown in Figure 3, in a normal scenario of a distributed storage system, the cluster is in a healthy state, and data A is written to two replicas (replica 1 and replica 2) via write I / O. In the degradation awareness module, a cluster health status failure is detected, causing the cluster to change to a degradation state. In the degradation awareness module, data A is not written to replica 2, but instead written to the degradation replica 2. This degradation replica 2 is written to the degradation replica list, and at the same time, the valid data bitmap of data A on the corresponding storage node is also updated. When a delayed recovery task is triggered, degradation replica recovery is triggered, causing replica 1 to recover data. At this time, degradation replica 2 is restored to a healthy replica, resulting in replica 2'. The current cluster degradation state recovery is complete, and the cluster is in a healthy state.
[0081] This application provides a data storage method, including: when the current cluster node in a distributed storage system is in a degraded health state, acquiring the faulty node and its corresponding replica data; determining the healthy replica node and degraded replica node for storing the replica data corresponding to the faulty node according to a distributed hash table algorithm, so as to facilitate read and write operations of the replica data corresponding to the faulty node in the healthy replica node and the degraded replica node; wherein, the time that the degraded replica of the degraded replica node occupies the input / output read / write capability during the data recovery process is less than the time that the healthy replica of the healthy replica node occupies the input / output read / write capability; the degraded replica of the degraded replica node is obtained through a degraded replica list and data bitmap marking; and data recovery is performed on the degraded replica of the degraded replica node according to a delayed recovery strategy to complete data storage. By utilizing a data distribution design based on a distributed hash table algorithm, corresponding degraded replica nodes are designed to enable normal read and write operations without IO recovery. Through the degraded replica list and valid data bitmap marking, IO read and write operations are realized after cluster degrade, eliminating the dependency between IO and data recovery, and ensuring that data fault tolerance does not decrease after degrade. It supports delayed data recovery in fault scenarios to complete the data recovery process, ensuring that the performance impact of faulty devices on business I / O is minimized, optimizing I / O performance, and improving I / O read and write efficiency.
[0082] In some embodiments, the write service for replica data corresponding to the failed node is performed on healthy replica nodes and degraded replica nodes, including:
[0083] When the current failed node enters a degraded state, the node location of the healthy replica node and the degraded replica node where the replica data of the current failed node is located is determined by the distributed hash table algorithm.
[0084] The corresponding replica data of the faulty node is forwarded to the healthy replica node and the degraded replica node to complete the write operation;
[0085] During the write process of the degraded replica node, the tag and metadata attribute information of the degraded replica data corresponding to the replica data are added to the degraded replica list and valid data bitmap to facilitate the reading of the read business.
[0086] In some embodiments, when the current failed node enters a degraded state, the location of the replicas is calculated based on the DHT algorithm. This location includes healthy replica nodes and degraded replica nodes, and the entire process is written to the service. During the write process, the degraded replica list needs to be added and a valid data bitmap recorded. The degraded replica list records markers for multiple degraded replica data to facilitate direct access to the data object later. The valid data bitmap records the metadata attribute information corresponding to the replica data to determine the occupied space.
[0087] Figure 4 is a schematic diagram of a write business scenario for a degraded replica node provided in an embodiment of this application. As shown in Figure 4, in a normal scenario of a distributed storage system, the cluster is in a healthy state, and data A is written to two replicas (replica 1 and replica 2) via I / O. In the degrade awareness module, a cluster health status failure is detected, causing the cluster to change to a degraded state. In the degrade awareness module, data A is not written to replica 2, but instead written to degraded replica 2. Degraded replica 2 is written to the degraded replica list. After the degraded replica list returns the data object, degraded replica 2 writes data and marks it as a degraded replica to the storage engine. The storage engine updates it to a valid data bitmap and successfully returns to degraded replica 2. Degraded replica 2 then returns to data A, and the degraded write is completed. The core idea is that I / O writes to all replicas, and all should return successfully, although it is not required that all will succeed. Data object management corresponds to all I / Os returning successfully, and success is determined by all successful returns. For degraded data objects, all I / Os return successfully, and any one of them returns a degraded identifier, and success is determined by all I / Os returning successfully.
[0088] Understandably, after degradation, for normal data objects, if one replica completes the write, the IO is considered to have returned. However, there may be inconsistencies caused by the power outage or restart of the corresponding storage node when another replica has not been written. Therefore, in order to avoid this phenomenon, the actual number of replicas written needs to be greater than the actual number of replicas to be written in some scenarios.
[0089] In some embodiments, before the current faulty node fails and enters a degraded state, the method further includes:
[0090] Starting from the time the current faulty node fails, retry reading the replica data of the current faulty node according to the first preset time.
[0091] Until the first preset time expires and the system enters a degraded state, the write operation of the replica data of the currently faulty node is executed.
[0092] In some embodiments, there is a certain time interval between the failure of the current faulty node and the entry into the degraded state. When the cluster is not in the degraded state, it maintains consistency in the health state, and IO will be in a state of continuous retry until the degraded state is entered. Then, the write of the degraded replica is performed through the IO exception handling logic.
[0093] The degradation write process provided in this embodiment ensures that data fault tolerance does not decrease after degradation by setting a degradation replica list and marking the effective data bitmap, thus guaranteeing that data is written in an orderly manner.
[0094] In some embodiments, the process of reading replica data corresponding to a failed node in healthy replica nodes and degraded replica nodes includes:
[0095] When the current faulty node enters a degraded state, retrieve the degraded event record;
[0096] The location of the healthy replica node is obtained by filtering each cluster node of the distributed storage system based on the distributed hash table algorithm and the degradation event record, so as to facilitate the reading of the replica data of the healthy replica node;
[0097] If the number of healthy replica nodes is 0, read the degraded replica nodes;
[0098] Obtain the valid data bitmap corresponding to the downgraded replica node;
[0099] The data is read from the valid data bitmap corresponding to the downgraded replica node to facilitate the reading of the replica data of the downgraded replica node.
[0100] In some embodiments, during cluster degradation, the location of the cluster epoch node corresponding to the healthy state (excluding the node where the failure occurred), i.e., the location of the healthy replica node, is read first to facilitate subsequent reading of replica data from the healthy replica node. This reading process is also determined based on the cluster DHT algorithm and the location of the healthy replica node corresponding to the degradation event record. Furthermore, if multiple failures exist and the system is in maintenance mode (i.e., the number of healthy replica nodes is 0), the portion of the bitmap marking valid data in the degraded replica can be read to ensure data validity and facilitate subsequent data recovery.
[0101] In some embodiments, before the current faulty node fails and enters a degraded state, the method further includes:
[0102] Starting from the moment the current faulty node fails, read the healthy replica data on other faulty nodes besides the current faulty node.
[0103] In some embodiments, when the cluster is in a healthy state, if a failure occurs but the cluster has not entered a degraded state, the IO read will be forwarded to another healthy replica node for reading after the failure, so as to ensure the validity of the data reading process and the integrity of the data reconstruction during the subsequent data recovery process.
[0104] Figure 5 is a schematic diagram of a read service scenario for a degraded replica node provided in an embodiment of this application. As shown in Figure 5, in a normal scenario of a distributed storage system, the cluster is in a healthy state, and data A is written to two replicas (replica 1 and replica 2) via write I / O. In the degrade awareness module, a cluster health status failure is detected, causing the cluster to change to a degraded state. In the degrade awareness module, data A corresponding to replica 2 is not written. In the super-fault domain awareness scenario, i.e., the data loss scenario, data A is written to degraded replica 2. Degraded replica 2 sends a read request to the storage engine, which queries the corresponding valid data bitmap and successfully returns it to degraded replica 2. Degraded replica 2 then returns it to data A, and the degraded write is completed.
[0105] In some embodiments, step S13, which involves restoring the degraded replica of the degraded replica node according to a delayed recovery strategy to complete data storage, includes:
[0106] Check whether data recovery is needed in the cluster nodes according to the second preset time;
[0107] When data recovery is required in a cluster node, the list of data to be recovered for the corresponding cluster node is determined according to the distributed hash table algorithm.
[0108] Based on the data object recovery requests in the list of data to be recovered, the downgraded replicas of the downgraded replica nodes are recovered to complete the data recovery.
[0109] In some embodiments, a second preset time is used to check whether data recovery is needed in the cluster nodes. The core idea is to reduce the impact of direct data recovery on IO performance by delaying data recovery. The checking process can be monitored using a timer or watchdog mechanism.
[0110] In some embodiments, checking whether data recovery is needed in the cluster nodes according to a second preset time includes:
[0111] Determine whether the cluster nodes meet the preset conditions based on the second preset time.
[0112] If the cluster nodes meet the preset conditions, it is determined that the cluster nodes need to perform data recovery;
[0113] The preset conditions shall be determined by at least one of the following methods:
[0114] There are no data recovery tasks running within the cluster nodes;
[0115] There are no data migration tasks running within the cluster nodes;
[0116] None of the nodes in the cluster are in a degraded state.
[0117] In some embodiments, a timer is configured to periodically check whether cluster nodes can perform data recovery. If the cluster nodes meet preset conditions, a recovery task is generated. These preset conditions include: no ongoing data recovery tasks to avoid bandwidth consumption; and no ongoing data migration tasks (data migration tasks generated during data maintenance, which conflict with the delayed recovery task in this embodiment). The cluster nodes must not be in a degraded state. It should be noted that this embodiment only performs data recovery in a degraded state; data recovery will not be performed in other healthy states. Of course, other situations may occur, which are not limited here, and can be set according to actual conditions.
[0118] This embodiment monitors according to a second preset time to ensure the accuracy of the delayed recovery task, provide assurance during subsequent data recovery, and reduce the impact on IO performance.
[0119] During the data recovery process, the list of data to be recovered corresponding to the cluster nodes is determined according to the distributed hash table algorithm, and the recovery work of the downgraded replica nodes is carried out based on the data object recovery request.
[0120] In some embodiments, restoring a degraded replica of a degraded replica node based on a data object recovery request from a list of data to be restored includes:
[0121] Determine whether the data object needs to be restored;
[0122] If a data object needs to be restored, read the corresponding replica data from the healthy replica node;
[0123] Overwrite the location of the node where the degraded replica node is located;
[0124] Update the data object from a degraded state to a healthy state to complete the recovery task of the data object recovery request.
[0125] In some embodiments, a recovery list generates multiple data object (OBJ) data recovery requests. Each request first checks if the data object can be recovered through the data object management module. If the data object can be recovered, it reads the replica data from the node containing the healthy replica, then overwrites the data at the location of the degraded replica, updating the data object to a healthy state, thus completing the recovery task for one data object request. Figure 6 is a schematic diagram of a delayed strategy data recovery process provided in an embodiment of this application. As shown in Figure 6, the recovery task process includes:
[0126] 1. The delayed recovery task generates a recovery data list to store recovery requests for each data object;
[0127] 2. Iterate through the list to generate data objects in batches to restore the request;
[0128] 3. After the recovery is complete, the cluster will be restored to a healthy state.
[0129] The recovery request process is as follows:
[0130] a. Generate an OBJ recovery request;
[0131] b. Inspect and retrieve the data object;
[0132] c. Return the data object through the data object management module;
[0133] d. Read the healthy copy in copy 1;
[0134] e. Return data;
[0135] f. Modify the state of the data object in the downgraded replica 2 and resume writing;
[0136] g. Resuming write complete;
[0137] h. Update the data object;
[0138] i. Complete the recovery request.
[0139] The data recovery request process provided in this embodiment ensures the effectiveness of the data recovery task, delays the direct impact of failures on data recovery, and guarantees IO performance and consistency after a failure. By ensuring that the number of healthy copies + degraded copies is greater than or equal to the number of data copies, data fault tolerance after degradation is guaranteed.
[0140] In some embodiments, restoring a degraded replica of a degraded replica node based on a data object recovery request from a list of data to be restored includes:
[0141] Obtain the corresponding level of the business priority strategy and the recovery task priority strategy;
[0142] The downgraded replica of the node is restored based on the priority strategy corresponding to the highest level and the data object recovery request in the data list to be restored.
[0143] It should be noted that this embodiment considers multiple application scenarios during the data recovery process, including business priorities and recovery task priorities, which need to be considered according to the actual situation. For example, recovery task priorities can be considered based on bandwidth conditions, and business priority strategies can be considered based on the current upper-layer business situation. In this embodiment, different strategies have different corresponding bandwidth usage, which can be analyzed according to the actual situation.
[0144] In this embodiment, corresponding priority strategies are set based on different application scenarios to improve the flexibility and diversity of data recovery and enhance the user experience.
[0145] In some embodiments, the list of data to be recovered includes a list of downgraded copies.
[0146] It should be noted that, considering that all data in the degraded replica list needs to be written to the degraded replica node, for other degraded replica data besides the replica data in the degraded replica list, a corresponding replication mechanism is established to ensure that data is not lost and to facilitate subsequent data redundancy.
[0147] The various embodiments corresponding to the data storage method have been described in detail above. Based on this, this application also discloses a data storage device corresponding to the above method, the device comprising:
[0148] The first acquisition module is configured to acquire the faulty node and its corresponding replica data when the health status of the current cluster node in the distributed storage system is in a degraded state.
[0149] The determination module is configured to identify healthy and degraded replica nodes for the data storage of the failed node based on a distributed hash table algorithm. This facilitates read and write operations for the failed node's replica data between the healthy and degraded replica nodes. Specifically, the time a degraded replica occupies input / output read / write capabilities during data recovery is shorter than the time a healthy replica occupies input / output read / write capabilities during data recovery. The degraded replicas are obtained through a degraded replica list and data bitmap marking.
[0150] The data recovery module is configured to perform data recovery on the downgraded replicas of the downgraded replica nodes according to the delayed recovery strategy in order to complete data storage.
[0151] In some embodiments, after determining that the health status of the current cluster node is in a degraded state, and before obtaining the faulty node and its corresponding replica data, the method further includes:
[0152] The first acquisition submodule is set up to acquire the degradation tasks generated by the fault event;
[0153] The first update submodule is configured to update the status information corresponding to the degradation task in order to proceed to the step of obtaining the faulty node and the corresponding replica data of the faulty node; wherein, the status information corresponding to the degradation task includes at least one or more of the following: distributed hash table, version number of the distributed hash table, disk epoch, status of each node, disk status, and cluster node status.
[0154] Since the embodiments of the device part correspond to the embodiments described above, please refer to the embodiments of the method part for details on the embodiments of the device part, and will not be repeated here.
[0155] For a description of the data storage device provided in this application, please refer to the above method embodiments. This application will not repeat the description here, as it has the same beneficial effects as the above data storage method.
[0156] Figure 7 is a structural diagram of a data storage device provided in an embodiment of this application. As shown in Figure 7, the device includes:
[0157] Memory 21 is configured to store computer programs;
[0158] Processor 22 is configured to implement the steps of a data storage method when executing a computer program.
[0159] The data storage device provided in this embodiment may include, but is not limited to, smartphones, tablets, laptops, or desktop computers.
[0160] The processor 22 may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor 22 may be implemented using at least one of the following hardware forms: Digital Signal Processor (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 22 may also include a main processor and a coprocessor. The main processor, also known as the Central Processing Unit (CPU), is configured to process data in the wake-up state; the coprocessor is a low-power processor configured to process data in the standby state. In some embodiments, the processor 22 may integrate a Graphics Processing Unit (GPU), which is configured to render and draw the content required to be displayed on the screen. In some embodiments, the processor 22 may also include an Artificial Intelligence (AI) processor, which is configured to handle computational operations related to machine learning.
[0161] The memory 21 may include one or more non-volatile readable storage media, which may be non-transitory. The memory 21 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In this embodiment, the memory 21 is at least configured to store the following computer program 211, which, after being loaded and executed by the processor 22, is capable of implementing the relevant steps of the data storage method disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 21 may also include an operating system 212 and data 213, and the storage method may be temporary storage or permanent storage. The operating system 212 may include Windows, Unix, Linux, etc. The data 213 may include, but is not limited to, the data involved in the data storage method.
[0162] In some embodiments, the data storage device may further include a display screen 23, an input / output interface 24, a communication interface 25, a power supply 26, and a communication bus 27.
[0163] Those skilled in the art will understand that the structure shown in Figure 7 does not constitute a limitation on the data storage device and may include more or fewer components than shown.
[0164] The processor 22 implements the data storage method provided in any of the above embodiments by calling instructions stored in the memory 21.
[0165] For a description of the data storage device provided in this application, please refer to the above method embodiments. This application will not repeat the description here, as it has the same beneficial effects as the above data storage method.
[0166] This application also provides a non-volatile readable storage medium on which a computer program is stored, and when the computer program is executed by the processor 22, it implements the steps of the data storage method described above.
[0167] It is understood that if the methods in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in a non-volatile readable storage medium. Based on this understanding, the technical solution of this application, 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. This computer software product is stored in a non-volatile readable storage medium and executes all or part of the steps of the methods in the various embodiments of this application. The aforementioned non-volatile readable storage medium includes various media capable of storing program code, such as USB flash drives, mobile hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0168] For an introduction to the non-volatile readable storage medium provided in this application, please refer to the above method embodiments. This application will not repeat the details here, as it has the same beneficial effects as the above data storage method.
[0169] This application also provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps of the above-described data storage method.
[0170] For an introduction to the computer program product provided in this application, please refer to the above method embodiments. This application will not repeat the details here, as it has the same beneficial effects as the above data storage method.
[0171] The foregoing has provided a detailed description of a data storage method, product, apparatus, and non-volatile readable storage medium provided in this application. The various embodiments in the specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section. It should be noted that those skilled in the art can make several improvements and modifications to this application without departing from the principles of this application, and these improvements and modifications also fall within the protection scope of this application.
[0172] It should also be noted that, in this specification, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.
Claims
1. A data storage method, characterized in that, include: When the health status of the current cluster node in the distributed storage system is in a degraded state, obtain the faulty node and its corresponding replica data. The healthy and degraded replica nodes corresponding to the failed node are determined based on a distributed hash table algorithm, so that read and write operations for the replica data corresponding to the failed node can be performed on the healthy and degraded replica nodes. The degraded replica of the degraded replica node occupies the input / output read / write capability for a shorter period during data recovery than the healthy replica of the healthy replica node. The degraded replica of the degraded replica node is obtained through a degraded replica list and data bitmap marking. Data recovery is performed on the downgraded replica of the downgraded replica node according to the delayed recovery strategy to complete data storage.
2. The data storage method according to claim 1, characterized in that, The process of writing replica data corresponding to the failed node to the healthy replica node and the degraded replica node includes: When the current faulty node enters a degraded state, the distributed hash table algorithm is used to calculate the node positions of the healthy replica node and the degraded replica node where the replica data of the current faulty node is located. The corresponding replica data of the faulty node is forwarded to the healthy replica node and the degraded replica node to complete the write operation; During the writing process of the degraded replica node, the tag and metadata attribute information of the degraded replica data corresponding to the replica data are included in the degraded replica list and the valid data bitmap to facilitate the reading of the read service.
3. The data storage method according to claim 2, characterized in that, The step of calculating the node locations of healthy and degraded replica nodes where the replica data of the current failed node resides based on the distributed hash table algorithm includes: The node location of the healthy replica node and the degraded replica node where the replica data of the current faulty node is located is determined by calculating the node distributed hash table algorithm and the disk distributed hash table algorithm based on the node distributed hash table algorithm and the disk distributed hash table algorithm.
4. The data storage method according to claim 2, characterized in that, Before the current faulty node fails and before entering the degraded state, the following steps are also included: Starting from the time the current faulty node fails, the copy data of the current faulty node will be retried according to the first preset time. Until the first preset time expires and the system enters the degraded state, the write operation of the replica data of the currently faulty node is executed.
5. The data storage method according to claim 1, characterized in that, The process of reading replica data corresponding to the failed node from the healthy replica node and the degraded replica node includes: When the current faulty node enters a degraded state, retrieve the degraded event record; The location of the healthy replica node is obtained by filtering each cluster node of the distributed storage system according to the distributed hash table algorithm and the degradation event record, so as to facilitate the reading of the replica data of the healthy replica node; If the number of healthy replica nodes is 0, read the degraded replica node; Obtain the valid data bitmap corresponding to the downgraded replica node; The data is read from the valid data bitmap corresponding to the downgraded replica node to facilitate the reading of the replica data of the downgraded replica node.
6. The data storage method according to claim 5, characterized in that, Before the current faulty node fails and before entering the degraded state, the following steps are also included: Starting from the time the current faulty node fails, read the healthy replica data on other faulty nodes besides the current faulty node.
7. The data storage method according to claim 1, characterized in that, The process of reading replica data corresponding to the failed node from the healthy replica node and the degraded replica node includes: Based on the availability parameters of the replica data in the healthy replica node and the degraded replica node, as well as the performance index parameters of the healthy replica node and the degraded replica node, a replica node is selected from the healthy replica node and the degraded replica node to perform the replica data reading service corresponding to the faulty node. The availability parameters are used to indicate the availability of the replica data, and the performance index parameters are used to indicate the performance of the healthy replica node and the degraded replica node.
8. The data storage method according to claim 1, characterized in that, Data recovery is performed on the degraded replicas of the degraded replica nodes according to the delayed recovery strategy to complete data storage, including: Check whether data recovery is needed in the cluster nodes according to the second preset time; In the event that data recovery is required in the cluster node, the list of data to be recovered corresponding to the cluster node is determined according to the distributed hash table algorithm. The downgraded replica of the downgraded replica node is restored according to the data object recovery request in the data list to be restored, so as to complete the data recovery.
9. The data storage method according to claim 8, characterized in that, The step of restoring the downgraded replica of the degraded replica node according to the data object recovery request in the data list to be restored, in order to complete the data recovery, includes: The data to be recovered is traversed to obtain the data object recovery request; The downgraded replica of the downgraded replica node is restored according to the data object recovery request.
10. The data storage method according to claim 9, characterized in that, Based on the second preset time, check whether data recovery is needed in the cluster nodes, including: Determine whether the cluster node meets the preset conditions based on the second preset time; If the cluster node meets the preset conditions, it is determined that the cluster node needs to perform data recovery; The preset conditions are at least one of the following: There are no data recovery tasks being executed within the cluster node; There are no data migration tasks being executed within the cluster node; None of the nodes in the cluster are in a degraded state.
11. The data storage method according to claim 9 or 10, characterized in that, The degraded replica of the node is restored according to the data object recovery request in the data list to be restored, including: Determine whether the data object needs to be restored; If a data object needs to be restored, the corresponding replica data is read from the healthy replica node; Overwrite the node location where the downgraded replica node is located; The data object is updated from the degraded state to a healthy state to complete the recovery task of the data object recovery request.
12. The data storage method according to claim 11, characterized in that, The degraded replica of the node is restored according to the data object recovery request in the data list to be restored, including: Obtain the corresponding level of the business priority strategy and the recovery task priority strategy; The downgraded replica of the node is restored according to the priority strategy corresponding to the highest level and the data object recovery request of the data list to be restored.
13. The data storage method according to claim 1, characterized in that, Determine the current health status of the cluster nodes to be in a degraded state, including: The status information of each cluster node in the distributed storage system is monitored according to a third preset time; wherein, the status information includes at least one or more of the following: disk status information, node status information, and network fault information. If there is a fault in the status information, a fault event is generated and the task trigger is activated; The task trigger is controlled to generate a cluster degradation task, and the health status of the cluster node corresponding to the fault event is set to the degradation state.
14. The data storage method according to claim 13, characterized in that, The process of controlling the task trigger to generate a cluster degradation task includes: The task trigger is controlled to generate a trigger instruction, wherein the trigger instruction is used to set the health status of the corresponding cluster node to a degraded state; The task trigger is controlled to send the triggering instruction to the current cluster node.
15. The data storage method according to claim 14, characterized in that, After determining that the current cluster node's health status is in a degraded state, and before obtaining the faulty node and its corresponding replica data, the process also includes: Obtain the degradation tasks generated by the failure event; The status information corresponding to the degradation task is updated to facilitate the step of obtaining the faulty node and its corresponding replica data; wherein, the status information corresponding to the degradation task includes at least one or more of the following: distributed hash table, version number of the distributed hash table, disk epoch, status of each node, disk status, and cluster node status.
16. The data storage method according to claim 1, characterized in that, Determine the current health status of the cluster nodes to be in a degraded state, including: The status information of each cluster node in the distributed storage system is monitored according to the fourth preset time. Obtain operation and maintenance instructions, and trigger corresponding operation and maintenance events according to the operation and maintenance instructions; wherein, the operation and maintenance events include at least disk mount and unmount events and / or cluster node addition and deletion events; The task trigger is activated based on the aforementioned maintenance event; The task trigger is controlled to generate a cluster degradation task, and the health status of the cluster node corresponding to the operation and maintenance event is set to the degradation state.
17. The data storage method according to claim 16, characterized in that, After determining that the current cluster node's health status is in a degraded state, and before obtaining the faulty node and its corresponding replica data, the process also includes: Retrieve degradation tasks generated by operational events; The status information corresponding to the degradation task is updated, wherein the status information corresponding to the degradation task includes at least one of the following: distributed hash table, version number of the distributed hash table, disk epoch, status of each node, disk status, and cluster node status; Obtain the data migration task and execute the data migration task.
18. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the data storage method according to any one of claims 1 to 17.
19. A data storage device, characterized in that, include: The memory is configured to store computer programs; The processor is configured to implement the steps of the data storage method as described in any one of claims 1 to 17 when executing the computer program.
20. A non-volatile readable storage medium, characterized in that, The non-volatile readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the data storage method as described in any one of claims 1 to 17.
Citation Information
Patent Citations
Copy exception recovery method and device based on storage cluster, and computer equipment
CN108647118A
Distributed storage redundancy method and device, electronic equipment and storage medium
CN116662081A
Management method and system for distributed storage of cloud platform
CN118175075A
Data storage method, product, device and medium
CN118466862A
Dynamic replica failure detection and healing
US9304815B1