Data consistency processing method, distributed storage system and electronic device
By obtaining the current cluster status information and metadata information of the distributed storage system, determining the block data objects to be processed and formulating a processing strategy, the problem of user data loss caused by data inconsistency in the distributed storage system is solved, and data consistency processing is achieved. timeliness and stability.
Patent Information
- Application Number
- CN202411111879.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-14
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2044-08-14
AI Technical Summary
Distributed storage systems may face various errors during operation, resulting in data inconsistency and inability to perform data consistency processing in a timely manner, resulting in user data being at risk of loss.
By obtaining the current status information of the cluster of the distributed storage system, it is determined whether the consistency verification conditions are met, the metadata information of each storage node is obtained, the block data object to be processed is determined, and a data consistency processing strategy is formulated according to the cause of the exception, and the data is processed. Consistency processing to ensure the consistency of system data.
When the current status information of the cluster represents the risk of data consistency, timely data consistency verification and processing are realized, which avoids the loss of user data in the system and improves the integrity of the data and the stability of the storage system.
Smart Images

Figure CN118626507B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a data consistency processing method, a distributed storage system and an electronic device. Background Art
[0002] At present, in order to improve the fault tolerance of distributed storage systems, a multi-copy strategy is generally adopted for distributed storage of data. Therefore, data consistency verification and processing of distributed storage systems have become a key research topic.
[0003] In the related art, when a failure of any storage node in a distributed storage system is identified, data consistency processing is usually performed on different copies in the cluster to restore the data of the failed storage node.
[0004] However, distributed storage systems may face various errors during operation, and many of these errors may lead to data inconsistency. That is, data consistency processing is not only required when a storage node fails. If data consistency processing cannot be performed on the entire system in a timely manner, user data stored in the system will be at risk of loss. Summary of the invention
[0005] The present application provides a data consistency processing method, a distributed storage system and an electronic device to solve the defects that the related technology cannot timely process the data consistency of the entire system, resulting in the risk of loss of user data stored in the system.
[0006] The first aspect of the present application provides a data consistency processing method, comprising:
[0007] Get the current status information of the distributed storage system cluster;
[0008] When the current status information of the cluster indicates that the distributed storage system meets the consistency check condition, obtaining metadata information of each storage node in the distributed storage system;
[0009] Taking any of the storage nodes in the distributed storage system as a local storage node, and determining a number of to-be-processed block data objects of the local storage node according to local metadata information stored locally by the local storage node and other metadata information of other storage nodes in the distributed storage system except the local storage node;
[0010] For any of the block data objects to be processed, determining a data consistency processing strategy for the block data object to be processed according to the abnormality cause of the block data object to be processed;
[0011] According to the data consistency processing strategy of each block data object to be processed, data consistency processing is performed on the local storage node.
[0012] In an optional implementation, when the current state information of the cluster indicates that the distributed storage system satisfies a consistency check condition, obtaining metadata information of each storage node in the distributed storage system includes:
[0013] Determine the latest state value and steady-state state value of the distributed storage system according to the current state information of the cluster;
[0014] Determining whether the latest state value of the distributed storage system is equal to the steady-state state value;
[0015] In a case where it is determined that the latest state value of the distributed storage system is not equal to the steady-state state value and the distributed storage system has no data distribution task being executed, determining that the distributed storage system satisfies a consistency check condition;
[0016] When the current status information of the cluster indicates that the distributed storage system meets the consistency check condition, triggering a global data consistency check task to obtain metadata information of each storage node in the distributed storage system;
[0017] Among them, when all data distribution tasks of the distributed storage system are executed, the steady-state status value is updated based on the latest status value of the distributed storage system to indicate that the distributed storage system has reached a healthy steady state.
[0018] In an optional implementation, before triggering the global data consistency check task, the method further includes:
[0019] Acquire data distribution task execution status information within the interval between the latest status value and the steady-state status value;
[0020] According to the data distribution task execution status information, determining whether there is an abnormal task in the interval;
[0021] When it is determined that there is an abnormal task in the interval, after generating an abnormal task alarm, the step of triggering the global data consistency check task is executed;
[0022] When it is determined that there is no abnormal task within the interval, the step of triggering the global data consistency check task is directly executed.
[0023] In an optional implementation, the obtaining metadata information of each storage node in the distributed storage system includes:
[0024] A global data consistency check task is issued to each storage node in the distributed storage system to trigger a metadata collection thread of each storage node, so that each storage node obtains metadata information of all storage nodes in the distributed storage system based on the metadata collection thread.
[0025] In an optional implementation, determining a number of to-be-processed block data objects of the local storage node according to the local metadata information stored locally by the local storage node and other metadata information of other storage nodes other than the local storage node in the distributed storage system includes:
[0026] Generate a local metadata list according to the local metadata information stored locally by the local storage node;
[0027] Generate other metadata lists based on other metadata information of other storage nodes;
[0028] Comparing and analyzing the local metadata list and other metadata lists, determining a number of block data objects to be processed of the local storage node;
[0029] The local metadata list and other metadata lists include key metadata of multiple block data objects.
[0030] In an optional implementation manner, the comparing and analyzing the local metadata list and other metadata lists to determine a number of to-be-processed block data objects of the local storage node includes:
[0031] For any of the block data objects, when the block data object exists in both the local metadata list and the other metadata lists, if the latest status value of the block data object in the local metadata list is less than the latest status value of the block data object in the other metadata lists, then the block data object is used as the block data object to be processed;
[0032] The key metadata of the block data object includes the latest status value, the service request sent to the block data object carries the latest status value, and when the block data object receives the service request, the latest status value in the key metadata is updated.
[0033] In an optional implementation manner, the comparing and analyzing the local metadata list and other metadata lists to determine a number of to-be-processed block data objects of the local storage node includes:
[0034] For any of the block data objects, if the block data object does not exist in the local metadata list but exists in other metadata lists, the block data object is used as the block data object to be processed.
[0035] In an optional implementation manner, determining the data consistency processing strategy of the block data object to be processed according to the abnormal cause of the block data object to be processed includes:
[0036] If the latest status value of the block data object to be processed in the local metadata list is less than the latest status value of the block data object to be processed in the other metadata list, it is determined that the abnormal reason of the block data object to be processed is that the local version is not the latest version;
[0037] When it is determined that the abnormal reason of the block data object to be processed is that the local version is not the latest version, the data consistency processing strategy of the block data object to be processed is determined to be a local recovery strategy.
[0038] In an optional implementation manner, determining the data consistency processing strategy of the block data object to be processed according to the abnormal cause of the block data object to be processed includes:
[0039] If the block data object to be processed does not exist in the local metadata list but exists in other metadata lists, obtaining a write identifier of the block data object to be processed in other metadata lists;
[0040] When the write identifier of the block data object to be processed in other metadata lists indicates that the block data object to be processed has completed the overwrite operation in other storage nodes, determining that the data consistency processing strategy of the block data object to be processed is a local recovery strategy;
[0041] When the write identifier of the block data object to be processed in other metadata lists indicates that the block data object to be processed has not completed the overwrite operation in other storage nodes, determining that the data consistency processing strategy of the block data object to be processed is a local creation strategy;
[0042] The key metadata of the block data object includes the write flag.
[0043] In an optional implementation, before performing data consistency processing on the local storage node according to the data consistency processing strategy of each block data object to be processed, the method further includes:
[0044] In the case where it is determined that the storage resources of the distributed storage system have been created, determining the actual storage resource amount of the distributed storage system according to the total number of block data objects and the fixed size of the block data objects in the distributed storage system;
[0045] Determining whether a block data object is lost in the distributed storage system according to an actual storage resource amount of the distributed storage system;
[0046] When it is determined that a block data object is lost in the distributed storage system, a block data object loss alarm is generated.
[0047] In an optional implementation, performing data consistency processing on the local storage node according to the data consistency processing strategy of each block data object to be processed includes:
[0048] Determining the data consistency processing priority of each of the block data objects to be processed according to the access times and disk positions of each of the block data objects to be processed;
[0049] According to the data consistency processing strategy and data consistency processing priority of each block data object to be processed, the data consistency processing of each block data object to be processed is performed in sequence to complete the data consistency processing of the local storage node;
[0050] The key metadata of the block data object includes the access times and the disk location.
[0051] A second aspect of the present application provides a data consistency processing device, comprising:
[0052] The acquisition module is used to obtain the current status information of the cluster of the distributed storage system;
[0053] A judgment module, configured to obtain metadata information of each storage node in the distributed storage system when the current status information of the cluster indicates that the distributed storage system satisfies a consistency check condition;
[0054] A screening module, configured to use any of the storage nodes in the distributed storage system as a local storage node, and determine a number of to-be-processed block data objects of the local storage node according to the local metadata information stored locally by the local storage node and other metadata information of other storage nodes in the distributed storage system except the local storage node;
[0055] A determination module, configured to determine, for any of the block data objects to be processed, a data consistency processing strategy for the block data object to be processed according to the abnormality cause of the block data object to be processed;
[0056] The processing module is used to perform data consistency processing on the local storage node according to the data consistency processing strategy of each block data object to be processed.
[0057] A third aspect of the present application provides a distributed storage system, comprising: a plurality of storage nodes, wherein local metadata information is stored locally on the storage nodes;
[0058] The storage node performs data consistency processing based on the method described in the first aspect and various possible designs of the first aspect.
[0059] A fourth aspect of the present application provides an electronic device, comprising: at least one processor and a memory;
[0060] The memory stores computer-executable instructions;
[0061] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the method described in the first aspect and various possible designs of the first aspect.
[0062] A fifth aspect of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions. When a processor executes the computer-executable instructions, the method described in the first aspect and various possible designs of the first aspect are implemented.
[0063] The sixth aspect of the present application provides a computer program product, including computer instructions, which are used to enable a computer to execute the method described in the first aspect and various possible designs of the first aspect.
[0064] The technical solution of this application has the following advantages:
[0065] The present application provides a data consistency processing method, a distributed storage system and an electronic device, the method comprising: obtaining the current status information of the cluster of the distributed storage system; obtaining the metadata information of each storage node in the distributed storage system when the current status information of the cluster indicates that the distributed storage system satisfies the consistency verification condition; taking any storage node in the distributed storage system as a local storage node, and determining a number of block data objects to be processed of the local storage node according to the local metadata information stored locally by the local storage node and other metadata information of other storage nodes other than the local storage node in the distributed storage system; for any block data object to be processed, determining the data consistency processing strategy of the block data object to be processed according to the abnormal cause of the block data object to be processed; and performing data consistency processing on the local storage node according to the data consistency processing strategy of each block data object to be processed. The method provided by the above scheme performs data consistency verification and processing on each storage node when the current status information of the cluster indicates that the storage system may have a data consistency risk, so as to ensure that the entire system can be processed for data consistency in a timely manner, so as to avoid the risk of loss of user data stored in the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the following is a brief introduction to the drawings required for use in the embodiments or the related technical descriptions. Obviously, the drawings described below are some embodiments of the present application, and a person skilled in the art can also obtain other drawings based on these drawings.
[0067] Figure 1 This is a schematic diagram of the structure of the data consistency processing system based on the embodiment of the present application;
[0068] Figure 2 A flowchart of a data consistency processing method provided in an embodiment of the present application;
[0069] Figure 3 A schematic diagram of the structure of an exemplary distributed storage system provided in an embodiment of the present application;
[0070] Figure 4 A schematic diagram of a response flow of an I / O request provided in an embodiment of the present application;
[0071] Figure 5 A schematic diagram of the triggering process of the global data consistency check task provided in the embodiment of the present application;
[0072] Figure 6 A schematic diagram of the overall process of the data consistency processing method provided in the embodiment of the present application;
[0073] Figure 7 A logical diagram of data consistency processing provided in an embodiment of the present application;
[0074] Figure 8 A schematic diagram of the structure of a data consistency processing device provided in an embodiment of the present application;
[0075] Fig. 9 A schematic diagram of the structure of a distributed storage system provided in an embodiment of the present application;
[0076] Fig.10 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0077] The above drawings have shown clear embodiments of the present application, which will be described in more detail below. These drawings and text descriptions are not intended to limit the scope of the present disclosure in any way, but to illustrate the concepts of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0078] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0079] In addition, the terms "first", "second", etc. are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. In the description of the following embodiments, the meaning of "multiple" is more than two, unless otherwise clearly and specifically defined.
[0080] In the related art, the distributed storage system stores data on multiple independent devices in a dispersed manner, adopts an extensible system structure and multiple redundancy strategies, uses multiple storage servers to share the storage load, and searches for storage information according to the corresponding positioning algorithm. It can effectively solve the shortcomings of the centralized storage system, such as limited storage capacity and low fault tolerance, and is the mainstream storage solution in the industry. The distributed storage system usually divides the stored data into OBJ object data blocks of the same size and stores them on different cluster nodes. At the same time, in order to improve the fault tolerance and data security of the system, a data block multi-copy storage strategy is often adopted, that is, each data block stored in the system has N copies and is stored on different N nodes. Assume that when a node fails, other nodes in the system still have the OBJ objects of all the system data, so data I / O processing can be performed normally, and the copy data lost in the failure can be restored and re-balanced and stored on the remaining nodes. Distributed storage systems that use a multi-copy strategy are inherently fault-tolerant. The maximum number of faulty nodes that a distributed storage system can tolerate is the number of copies of the data in the system minus 1 (N-1). That is, if the number of faulty nodes in the system exceeds (N-1), the system is considered to be at risk of losing all copies of certain data blocks. This risk is catastrophic and unacceptable to both users and products. Therefore, in order to avoid this risk, distributed storage systems need some mechanisms to ensure the consistency of data copies in each storage node.
[0081] When a node or disk failure occurs in a distributed storage system cluster, a data recovery task is usually generated after the system recognizes the failure. Through the data recovery task, different copies of the OBJ object (block data object) in the cluster are checked and repaired for data consistency, so as to ensure the data consistency of the OBJ object copies of each storage node in the cluster. However, in the face of multiple fault superposition scenarios, how to ensure the data consistency of the OBJ object copies of each node is an urgent problem to be solved. For example, a single fault occurs in a distributed storage system cluster, and the cluster is globally restarted while the data recovery task is in progress. After the cluster restarts, the previous recovery task is not completed normally. At this time, the copy data of some OBJ objects in the storage system is inconsistent. Without any perception, continuing configuration or operation and maintenance operations may cause the existing data in the system to continue to be disordered and damaged, further damaging the storage system and greatly increasing the difficulty of system recovery. If data consistency check and repair are not performed in time, when the problematic copy is accessed, errors such as virtual machine downtime and data inconsistency will occur. More seriously, if the node where the normal OBJ copy is located fails again at this time, the user's data will be at risk of loss.
[0082] In response to the above problems, the embodiments of the present application provide a data consistency processing method, a distributed storage system and an electronic device, the method comprising: obtaining the current status information of the cluster of the distributed storage system; obtaining the metadata information of each storage node in the distributed storage system when the current status information of the cluster indicates that the distributed storage system meets the consistency verification condition; taking any storage node in the distributed storage system as a local storage node, and determining a number of block data objects to be processed of the local storage node according to the local metadata information stored locally by the local storage node and other metadata information of other storage nodes other than the local storage node in the distributed storage system; for any block data object to be processed, determining the data consistency processing strategy of the block data object to be processed according to the abnormal cause of the block data object to be processed; and performing data consistency processing on the local storage node according to the data consistency processing strategy of each block data object to be processed. The method provided by the above scheme performs data consistency verification and processing on each storage node when the current status information of the cluster indicates that the storage system may have a data consistency risk, so as to ensure that the entire system can be processed for data consistency in a timely manner, so as to avoid the risk of loss of user data stored in the system.
[0083] The following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. The embodiments of the present invention will be described below in conjunction with the accompanying drawings.
[0084] First, the structure of the data consistency processing system on which this application is based is described:
[0085] The data consistency processing method, distributed storage system and electronic device provided in the embodiments of the present application are suitable for performing data consistency processing on data copies of storage nodes in a distributed storage system. Figure 1 The figure is a schematic diagram of the structure of the data consistency processing system based on the embodiment of the present application, which mainly includes a distributed storage system, a data acquisition device and a data consistency processing device. Among them, the data acquisition device is used to collect the current status information of the cluster of the distributed storage system, and send the collected information to the data consistency processing device, which performs data consistency processing on the distributed storage system according to the obtained information.
[0086] The embodiment of the present application provides a data consistency processing method for performing data consistency processing on data copies of storage nodes in a distributed storage system. The execution subject of the embodiment of the present application is an electronic device, such as a server, a desktop computer, a laptop computer, a tablet computer, and other electronic devices that can be used for data consistency processing.
[0087] like Figure 2 FIG. 1 is a flow chart of a data consistency processing method provided in an embodiment of the present application, and the method includes:
[0088] Step 201: Obtain the current status information of the cluster of the distributed storage system.
[0089] The current status information of the cluster is used to characterize the status of the cluster and data distribution.
[0090] Step 202: When the current state information of the cluster indicates that the distributed storage system meets the consistency check condition, metadata information of each storage node in the distributed storage system is obtained.
[0091] Specifically, when the current state information of the cluster indicates that the distributed storage system is currently in an unhealthy state, it can be determined that the distributed storage system meets the consistency check condition.
[0092] Correspondingly, it is also possible to determine that the distributed storage system meets the consistency check condition after the response operation processing is completed in the scenarios of global restart of the distributed storage system and some manual operation and maintenance.
[0093] Among them, the global restart of the storage cluster (distributed storage system) is a scenario with certain risks. Before the restart, each node in the cluster is processing business data or doing various tasks. After the cluster is globally restarted, all memory data is reinitialized. Then the process that was interrupted by the restart may cause data damage in the cluster or inconsistent task processing progress of each node. Therefore, after the cluster is globally restarted and all nodes join the cluster, it is very necessary to trigger a global data consistency check. You can conduct a comprehensive health check on the data in the cluster in time, repair the problematic data in time, and avoid more serious problems later. After the relevant operations in some manual operation and maintenance scenarios are processed, such as manually plugging and unplugging disks, expanding the storage cluster, and generating abnormal high-risk alarms, it is necessary to perform consistency checks on the data in the storage cluster to ensure data security. At this time, you can call the relevant external interfaces provided by the distributed storage cluster. Calling the relevant interfaces will trigger the data consistency check task, which is simple and convenient while greatly improving the efficiency of operation and maintenance.
[0094] Step 203, taking any storage node in the distributed storage system as a local storage node, and determining a number of block data objects to be processed of the local storage node according to the local metadata information stored locally by the local storage node and other metadata information of other storage nodes in the distributed storage system except the local storage node.
[0095] Among them, Figure 3As shown, it is a schematic diagram of the structure of an exemplary distributed storage system provided in an embodiment of the present application, taking a distributed storage system including three storage nodes, Node A, Node B and Node C, as an example. In order to ensure the security of data, the distributed storage system adopts a multi-copy strategy when creating storage resources. Data copies are managed in units of OBJ (block data object) on different host nodes, and different copies are evenly distributed on different nodes. When a business uses the resources of a distributed storage system, it first needs to establish a session connection with the nodes in the cluster through relevant protocols. When an I / O request comes in, the node where the session is located will split the I / O in units of OBJ. The I / O request after the split is uniquely associated with the OBJ object, and then the node where the OBJ copy is located is found according to the corresponding positioning algorithm. After the I / O request reaches the node where the OBJ copy is located, the OBJ object's unique identifier oid is first used in the local OBJ object metadata management table to find the ENTRY entry management structure corresponding to the OBJ object. This structure records the metadata information of a specific OBJ object. The I / O request is placed on the physical disk based on the metadata information. Then, the ENTRY entry related information (metadata information) in the memory and persisted on the physical disk is updated, including the block data object unique identifier oid, the latest state value latest_epoch, the write identifier written, the number of accesses access_cnt, and the disk location osd. Finally, the result is returned to the business layer, and the I / O request is completed. When there is an I / O request or data recovery occurs due to various events, the management of storage resources is completed with the OBJ object as the smallest unit.
[0096] For example, Figure 4 As shown, it is a schematic diagram of the response process of the I / O request provided in the embodiment of the present application. The session is connected to node B, and the business request I / O is issued through node B. After receiving the I / O request, node B calculates the replica node where the OBJ corresponding to the request is located according to the node hash algorithm. For example, if the request corresponds to OBJ1, the request should be forwarded to node A and node C. After receiving the I / O request, node A and node C query the corresponding OBJ ENTRY metadata entry in the local ENTRY TABLE metadata entry table through the oid identifier, and then write the requested data to the corresponding disk location according to the osd disk metadata information in the metadata entry, and update the ENTRY metadata information in the memory and on the disk at the same time, and return the result to node B to complete this I / O.
[0097] Specifically, Figure 3As shown, metadata information can be obtained by accessing the metadata entry table of each storage node. Since communication links are set between different storage nodes, each storage node can not only obtain local metadata information, but also obtain other metadata information of other storage nodes, and then determine which block data objects to be processed of the local storage node by comparing the local metadata information with other metadata information.
[0098] Step 204: for any block data object to be processed, determine a data consistency processing strategy for the block data object to be processed according to the abnormal reason of the block data object to be processed.
[0099] The block data object to be processed is a block data object with data consistency defects. By analyzing the abnormal reasons causing the data consistency defects of the block data object to be processed, a targeted data consistency processing strategy is formulated to improve the data consistency processing efficiency.
[0100] Step 205: Perform data consistency processing on the local storage node according to the data consistency processing strategy of each block data object to be processed.
[0101] Specifically, the data consistency processing strategy of the block data object to be processed is divided into at least a local creation strategy and a local recovery strategy. Specifically, the block data object to be processed can be created or recovered in the local storage node according to the data consistency processing strategy of each block data object to be processed.
[0102] Among them, in actual applications, each storage node in the distributed storage system can be used as a local storage node, that is, each storage node can perform data consistency processing in parallel, which further improves the efficiency and timeliness of data consistency processing in the distributed storage system, avoids further disorder and other problems in the system data, and effectively protects the integrity of the data and the stability of the storage system.
[0103] On the basis of the above embodiments, since whether the distributed storage system is in a healthy state is affected by multiple factors, in order to improve the accuracy of the judgment result obtained in the embodiment of the present application and avoid missed judgments, so as to further avoid the risk of not timely processing data consistency for the entire system, as an implementable method, on the basis of the above embodiments, in one embodiment, when the current state information of the cluster indicates that the distributed storage system meets the consistency check condition, metadata information of each storage node in the distributed storage system is obtained, including:
[0104] Step 2021, determining the latest state value and steady-state state value of the distributed storage system according to the current state information of the cluster;
[0105] Step 2022, determining whether the latest state value of the distributed storage system is equal to the steady-state state value;
[0106] Step 2023: When it is determined that the latest state value of the distributed storage system is not equal to the steady-state state value, and the distributed storage system has no data distribution task being executed, determine that the distributed storage system meets the consistency check condition;
[0107] Step 2024: When the current state information of the cluster indicates that the distributed storage system meets the consistency check condition, a global data consistency check task is triggered to obtain metadata information of each storage node in the distributed storage system.
[0108] Among them, when all data distribution tasks of the distributed storage system are completed, the steady-state state value is updated based on the latest state value of the distributed storage system to indicate that the distributed storage system has reached a healthy steady state.
[0109] It should be noted that the distributed storage system will store some tasks persistently in the ETCD database, such as node joining, node leaving, disk unplugging, disk plugging, etc., to redistribute data in the distributed storage system based on these tasks. Each task will update a latest_epoch (latest status value) correspondingly. The latest_epoch represents the current cluster status and data distribution. The cluster status is unhealthy when the task is not completed. When the task is completed and the cluster status reaches a healthy steady state (task completion), the stable_epoch (steady-state status value) is updated with the latest_epoch value. At this time, stable_epoch records that the cluster is in a healthy state, and the cluster status and data distribution are normal. The latest status value and steady-state status value are updated in an incremental manner to record the status update of the distributed storage system.
[0110] Specifically, Figure 5 As shown, it is a schematic diagram of the triggering process of the global data consistency verification task provided in the embodiment of the present application. A task detection device can be set in the distributed storage system, and based on the task detection device, it is periodically detected whether the latest_epoch and stable_epoch of the cluster in the system are equal. If they are not equal, that is, the latest state value is greater than the steady-state state value, and the current cluster has no data recovery, that is, there is no data redistribution task being executed. At this time, there is likely to be a problem with the state of the cluster or the data distribution of the OBJ object, and it is necessary to trigger the global data consistency verification task to verify and recover the data in time.
[0111] Furthermore, in one embodiment, in order to further improve the efficiency of data consistency processing, before triggering the global data consistency verification task, the data distribution task execution status information within the interval between the latest status value and the steady-state status value can be obtained; based on the data distribution task execution status information, it is determined whether there is an abnormal task within the interval; when it is determined that there is an abnormal task within the interval, an abnormal task alarm is generated and then the step of triggering the global data consistency verification task is executed; when it is determined that there is no abnormal task within the interval, the step of triggering the global data consistency verification task is directly executed.
[0112] Among them, during the execution of the above-mentioned tasks such as node joining, node leaving, disk unplugging, and disk plugging, status information will be generated to indicate whether an abnormality occurs during the execution process.
[0113] Specifically, Figure 5 As shown in the figure, after determining that the latest state value is greater than the steady-state state value, check whether there is any abnormality in the historical task state carrying epoch in ETCD in the interval [stable_epoch,latest_epoch], that is, determine whether there is any abnormal task in the interval. If there is an abnormal task, an alarm message is generated, and the impact and scope of the failed task and the health status of the current storage cluster are checked in time.
[0114] Specifically, after the abnormal task is determined, an abnormal compensation task is generated according to information such as the abnormal occurrence point and task scope of the abnormal task, so that the distributed storage system can repair the adverse effects caused by the abnormal task by running the abnormal compensation task.
[0115] Among them, since even if the execution of the abnormal compensation task is completed, it cannot guarantee that the cluster state will be restored to a healthy steady state, a global data consistency check task can be further triggered to ensure the data consistency of the distributed storage system.
[0116] Specifically, in one embodiment, after the global data consistency verification task is triggered, a global data consistency verification task can be sent to each storage node in the distributed storage system to trigger the metadata collection thread of each storage node, so that each storage node obtains the metadata information of all storage nodes in the distributed storage system based on the metadata collection thread.
[0117] Specifically, the global data consistency check task sends the task message to each node in the cluster through ETCD broadcast. After receiving the task, the node updates the latest_epoch of the cluster and starts a separate metadata collection thread to collect key metadata information of OBJ objects on all nodes in the cluster. This information is obtained from the ENTRY TABLE metadata entry recorded in the I / O response process provided in the above embodiment.
[0118] On the basis of the above embodiment, in order to further improve the data consistency processing efficiency, as an implementable manner, on the basis of the above embodiment, in one embodiment, according to the local metadata information stored locally by the local storage node and other metadata information of other storage nodes other than the local storage node in the distributed storage system, a number of block data objects to be processed of the local storage node are determined, including:
[0119] Step 2031, generating a local metadata list according to the local metadata information stored locally by the local storage node;
[0120] Step 2032, generating other metadata lists according to other metadata information of other storage nodes;
[0121] Step 2033: Compare and analyze the local metadata list and other metadata lists to determine a number of block data objects to be processed of the local storage node.
[0122] The local metadata list and other metadata lists include key metadata of multiple block data objects.
[0123] Specifically, the collection thread will send a request to each node to obtain the metadata information of the OBJ object. Each node will create two lists to store the metadata information returned by each node. The local metadata information of this node (local storage node) will be stored separately in a list List1 (local metadata list), and the metadata information of all other nodes except this node will be put into a list List2 (other metadata list). In the process of obtaining the OBJ metadata information of other nodes, the list will be deduplicated and updated according to the oid. After the OBJ information of all other nodes is processed, the latest OBJ list List2 is obtained, and then compared and analyzed one by one with the OBJ list List1 obtained by this node through the oid identifier (unique identifier of the block data object), and the OBJ that needs to be processed (the block data object to be processed) is put into List3 (the list to be processed).
[0124] Specifically, in one embodiment, for any block data object, when the block data object exists in both the local metadata list and other metadata lists, if the latest status value of the block data object in the local metadata list is less than the latest status value of the block data object in other metadata lists, then the block data object is treated as a block data object to be processed.
[0125] Among them, the key metadata of the block data object includes the latest status value. The service request sent to the block data object carries the latest status value. When the block data object receives the service request, the latest status value in the key metadata is updated.
[0126] It should be noted that in a distributed storage system, each I / O request sent to a block data object carries the latest status value for the block data object to update the latest status value in the key metadata. The larger the latest status value, the newer the block data object. Therefore, if the latest status value of the block data object in the local metadata list is less than the latest status value of the block data object in other metadata lists, it indicates that the version of the block data object in other storage nodes has been updated, so it is treated as a block data object to be processed.
[0127] Specifically, in one embodiment, for any block data object, if the block data object does not exist in the local metadata list but exists in other metadata lists, the block data object is used as a block data object to be processed.
[0128] Specifically, if the block data object does not exist in the local metadata list but exists in other metadata lists, it indicates that the block data object may be accidentally deleted or other abnormalities may occur in the local storage node. Therefore, in order to restore the block data object in the local storage node, the block data object is treated as a block data object to be processed.
[0129] Specifically, in one embodiment, before performing data consistency processing on the local storage node according to the data consistency processing strategy of each block data object to be processed, when it is determined that the storage resources of the distributed storage system have been created, the actual storage resource amount of the distributed storage system is determined according to the total number of block data objects and the fixed size of the block data objects in the distributed storage system; based on the actual storage resource amount of the distributed storage system, it is determined whether a block data object is lost in the distributed storage system; and when it is determined that a block data object is lost in the distributed storage system, an alarm for the loss of the block data object is generated.
[0130] Specifically, Figure 6 As shown, it is a schematic diagram of the overall process of the data consistency processing method provided in the embodiment of the present application, such as Figure 6 The method shown is as follows Figure 2 An exemplary implementation of the method shown is shown, and the implementation principles of the two are the same and will not be repeated here.
[0131] Among them, Figure 6 As shown in the figure, after completing the traversal of all block data objects and adding the traversed block data objects to be processed to the pending list, if the storage resources of the distributed storage system have been created, that is, the storage resources of the distributed storage system are stable, the actual storage resources of the cluster can be calculated through the OBJ list. , Indicates the total number of block data objects in the system, Indicates that the block data object has a fixed size, and the expected size of the storage resource should be the sum of the sizes of all created virtual volumes LUN (target storage resource amount), that is, , Indicates the target storage resource amount. , it means that there is OBJ object loss in the current cluster. At this time, a data loss alarm will be generated, and operation and maintenance personnel need to intervene manually to investigate and analyze the cause.
[0132] Specifically, in one embodiment, data loss means the loss of a block data object. The storage area corresponding to the lost block data object can be analyzed based on the existing key information of the block data object metadata. Data loss may be caused by accidental deletion of data or by disk loading failure. After determining the storage area corresponding to the lost block data object, the target disk can be located, and the lost block data object can be restored by reloading the lost block data object in the target disk. If the lost block data object is not restored after reloading, it is determined that the lost block data object is deleted by mistake. In order to avoid the impact on the data security of the distributed storage system due to the accidental deletion of the lost block data object, a corresponding block data object loss alarm can be issued.
[0133] On the basis of the above embodiment, in order to further improve the data consistency processing efficiency, as an implementable manner, on the basis of the above embodiment, in one embodiment, according to the abnormal cause of the block data object to be processed, a data consistency processing strategy for the block data object to be processed is determined, including:
[0134] Step 2041: if the latest status value of the block data object to be processed in the local metadata list is less than the latest status value of the block data object to be processed in other metadata lists, it is determined that the abnormal reason for the block data object to be processed is that the local version is not the latest version;
[0135] Step 2042: When it is determined that the abnormal reason of the block data object to be processed is that the local version is not the latest version, the data consistency processing strategy of the block data object to be processed is determined to be a local recovery strategy.
[0136] Specifically, in one embodiment, if the block data object to be processed does not exist in the local metadata list, but exists in other metadata lists, the write identifier of the block data object to be processed in the other metadata lists is obtained; when the write identifier of the block data object to be processed in the other metadata lists indicates that the block data object to be processed has completed the write operation in other storage nodes, the data consistency processing strategy of the block data object to be processed is determined to be the local recovery strategy; when the write identifier of the block data object to be processed in the other metadata lists indicates that the block data object to be processed has not completed the write operation in other storage nodes, the data consistency processing strategy of the block data object to be processed is determined to be the local creation strategy;
[0137] Among them, the key metadata of the block data object includes a write flag.
[0138] Specifically, Figure 4 As shown, the logic of formulating the data consistency processing strategy for the block data object to be processed is as follows:
[0139] OBJ ENTRY (any data object) exists in both List1 and List2. The latest status value in List1 is greater than or equal to the latest status value in List2. The local status of the OBJ is normal.
[0140] OBJ ENTRY exists in both List1 and List2. The latest status value in List1 is less than the latest status value in List2. The OBJ needs to be restored locally. While it is used as a block data object to be processed, an OBJ request is generated to add it to List3.
[0141] OBJ ENTRY exists in List1 but not in List2. The local status of the OBJ is normal.
[0142] OBJ ENTRY does not exist in List1, but exists in List2 and its written flag is false. The OBJ needs to be created locally. When it is used as a block data object to be processed, an OBJ request is generated to add it to List3.
[0143] OBJ ENTRY does not exist in List1, but exists in List2 and the written flag is true. The OBJ needs to be recovered locally. While it is used as a block data object to be processed, an OBJ request is generated to add it to List3.
[0144] If the written flag is false, it indicates that the block data object to be processed has not completed the write operation in other storage nodes, and if the written flag is true, it indicates that the block data object to be processed has completed the write operation in other storage nodes.
[0145] Specifically, Figure 7As shown, it is a logical diagram of data consistency processing provided by the embodiment of the present application. After the traversal processing of the above embodiment, all nodes have obtained which OBJ object data of this node has problems under the latest_epoch. Different OBJ objects need to be processed differently according to the actual analysis situation, such as creation, recovery and other operations. The global data consistency verification task will submit a recovery class request task (OBJ recovery request processing task) to each problematic OBJ. The request will restore the corresponding OBJ object to normal at this node according to the specific operation identifier. After the verification tasks of all nodes are completed, the cluster status and OBJ object data distribution become normal, the status of the verification task is set to completed, and the stable_epoch value is updated to the latest latest_epoch.
[0146] Further, in one embodiment, the data consistency processing priority of each block data object to be processed can be determined according to the access count and disk position of each block data object to be processed; and the data consistency processing strategy and data consistency processing priority of each block data object to be processed are used to sequentially perform data consistency processing on each block data object to be processed, so as to complete the data consistency processing on the local storage node;
[0147] Among them, the key metadata of the block data object includes the access count and disk location.
[0148] Specifically, all pending block data objects in List3 are traversed and prioritized according to the number of accesses access_cnt and the disk location osd. The principle of sorting is that the pending block data objects that are in the cache disk and have a large access_cnt are the hot data that are most frequently accessed by the business. The recovery priority of such data is the highest. This strategy can ensure that the business I / O requests are minimally affected during the recovery process.
[0149] The data consistency processing method provided by the embodiment of the present application is by obtaining the current status information of the cluster of the distributed storage system; when the current status information of the cluster indicates that the distributed storage system meets the consistency verification condition, obtaining the metadata information of each storage node in the distributed storage system; taking any storage node in the distributed storage system as a local storage node, and determining a number of block data objects to be processed of the local storage node according to the local metadata information stored locally by the local storage node and other metadata information of other storage nodes other than the local storage node in the distributed storage system; for any block data object to be processed, determining the data consistency processing strategy of the block data object to be processed according to the abnormal reason of the block data object to be processed; and performing data consistency processing on the local storage node according to the data consistency processing strategy of each block data object to be processed. The method provided by the above scheme performs data consistency verification and processing on each storage node when the current status information of the cluster indicates that the storage system may have a data consistency risk, so as to ensure that the data consistency processing of the entire system can be performed in time, so as to avoid the risk of loss of user data stored in the system. In addition, it can automatically perform consistency checks on the global data of the storage system in scenarios where there are risks to data, such as global restarts, multiple fault superpositions, and disk unplugging and plugging during operation and maintenance, to screen out problematic data objects and repair them in a timely manner, thereby avoiding further disorder and other problems in the data within the system, and effectively protecting the integrity of the data and the stability of the storage system. In the process of triggering the data consistency check, unhealthy OBJ copy data can be quickly detected by collecting less metadata control information, and the repair of unhealthy copies can be prioritized, with priority given to repairing the hot data that is most frequently accessed by the business. This strategy can ensure that the business I / O requests are minimally affected during the recovery process. It also provides a simple and convenient external triggering method. After the operation and maintenance personnel complete the operation and maintenance operations, they can complete the data consistency check function by executing a command in the background of any node in the cluster, which effectively ensures the security of the data in the operation and maintenance scenario and greatly improves the efficiency of operation and maintenance.
[0150] An embodiment of the present application provides a data consistency processing device, which is used to execute the data consistency processing method provided in the above embodiment.
[0151] like Figure 8 , which is a schematic diagram of the structure of a data consistency processing device provided in an embodiment of the present application. The data consistency processing device 80 comprises: an acquisition module 801 , a judgment module 802 , a screening module 803 , a determination module 804 and a processing module 805 .
[0152] Among them, the acquisition module is used to obtain the current status information of the cluster of the distributed storage system; the judgment module is used to obtain the metadata information of each storage node in the distributed storage system when the current status information of the cluster indicates that the distributed storage system meets the consistency verification conditions; the screening module is used to take any storage node in the distributed storage system as a local storage node, and determine a number of block data objects to be processed of the local storage node according to the local metadata information stored locally by the local storage node and other metadata information of other storage nodes in the distributed storage system except the local storage node; the determination module is used to determine the data consistency processing strategy of any block data object to be processed according to the abnormal cause of the block data object to be processed; the processing module is used to perform data consistency processing on the local storage node according to the data consistency processing strategy of each block data object to be processed.
[0153] Regarding the data consistency processing device in this embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0154] The data consistency processing device provided in the embodiment of the present application is used to execute the data consistency processing method provided in the above embodiment. Its implementation method and principle are the same and will not be repeated here.
[0155] An embodiment of the present application provides a distributed storage system for executing the data consistency processing method provided in the above embodiment.
[0156] like Fig. 9 FIG. 1 is a schematic diagram of the structure of a distributed storage system provided in an embodiment of the present application. The distributed storage system includes: a plurality of storage nodes, such as Fig. 9 The shown one includes n storage nodes.
[0157] The local storage of the storage node contains local metadata information; the storage node performs data consistency processing based on the data consistency processing method provided in the above embodiment.
[0158] Regarding the distributed storage system in this embodiment, its specific implementation has been described in detail in the embodiment of the method, and will not be elaborated here.
[0159] The distributed storage system provided in the embodiment of the present application is used to execute the data consistency processing method provided in the above embodiment. Its implementation method and principle are the same and will not be repeated here.
[0160] An embodiment of the present application provides an electronic device for executing the data consistency processing method provided in the above embodiment.
[0161] like Fig.101 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 100 includes: at least one processor 1001 and a memory 1002.
[0162] The memory stores computer-executable instructions; at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the data consistency processing method provided in the above embodiment.
[0163] The electronic device provided in the embodiment of the present application is used to execute the data consistency processing method provided in the above embodiment. Its implementation method and principle are the same and will not be repeated here.
[0164] An embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, a data consistency processing method provided in any of the above embodiments is implemented.
[0165] The storage medium containing computer executable instructions provided in the embodiments of the present application can be used to store computer executable instructions of the data consistency processing method provided in the aforementioned embodiments. The implementation method and principle are the same and will not be repeated here.
[0166] An embodiment of the present application provides a computer program product, including computer instructions, wherein the computer instructions are used to enable a computer to execute the data consistency processing method provided in the aforementioned embodiment.
[0167] The computer program product provided in the embodiment of the present application can be used to execute computer instructions of the data consistency processing method provided in the aforementioned embodiment. The implementation method and principle are the same and will not be repeated here.
[0168] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0169] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0170] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0171] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes.
[0172] A part of the present application may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of computer program instructions in computer-readable media includes, but is not limited to, source files, executable files, installation package files, etc., and accordingly, the way in which computer program instructions are executed by a computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to the computer.
[0173] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example for illustration. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0174] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A data consistency processing method, characterized in that: include: Get the current status information of the distributed storage system cluster; When the current status information of the cluster indicates that the distributed storage system meets the consistency check condition, obtaining metadata information of each storage node in the distributed storage system; Taking any of the storage nodes in the distributed storage system as a local storage node, and determining a number of to-be-processed block data objects of the local storage node according to local metadata information stored locally by the local storage node and other metadata information of other storage nodes in the distributed storage system except the local storage node; For any of the block data objects to be processed, determining a data consistency processing strategy for the block data object to be processed according to the abnormality cause of the block data object to be processed; According to the data consistency processing strategy of each block data object to be processed, the local storage node is processed for data consistency; When the current state information of the cluster indicates that the distributed storage system satisfies the consistency check condition, obtaining metadata information of each storage node in the distributed storage system includes: Determine the latest state value and steady-state state value of the distributed storage system according to the current state information of the cluster; Determining whether the latest state value of the distributed storage system is equal to the steady-state state value; In a case where it is determined that the latest state value of the distributed storage system is not equal to the steady-state state value and the distributed storage system has no data distribution task being executed, determining that the distributed storage system satisfies a consistency check condition; When the current status information of the cluster indicates that the distributed storage system meets the consistency check condition, triggering a global data consistency check task to obtain metadata information of each storage node in the distributed storage system; Among them, when all data distribution tasks of the distributed storage system are executed, the steady-state status value is updated based on the latest status value of the distributed storage system to indicate that the distributed storage system has reached a healthy steady state.
2. The method according to claim 1, characterized in that Before triggering the global data consistency check task, the method further includes: Acquire data distribution task execution status information within the interval between the latest status value and the steady-state status value; According to the data distribution task execution status information, determining whether there is an abnormal task in the interval; When it is determined that there is an abnormal task in the interval, after generating an abnormal task alarm, the step of triggering the global data consistency check task is executed; When it is determined that there is no abnormal task within the interval, the step of triggering the global data consistency check task is directly executed.
3. The method according to claim 1, characterized in that The obtaining metadata information of each storage node in the distributed storage system includes: A global data consistency check task is issued to each storage node in the distributed storage system to trigger a metadata collection thread of each storage node, so that each storage node obtains metadata information of all storage nodes in the distributed storage system based on the metadata collection thread.
4. The method according to claim 1, characterized in that The determining, according to the local metadata information stored locally by the local storage node and other metadata information of other storage nodes except the local storage node in the distributed storage system, a plurality of to-be-processed block data objects of the local storage node comprises: Generate a local metadata list according to the local metadata information stored locally by the local storage node; Generate other metadata lists based on other metadata information of other storage nodes; Comparing and analyzing the local metadata list and other metadata lists, determining a number of block data objects to be processed of the local storage node; The local metadata list and other metadata lists include key metadata of multiple block data objects.
5. The method according to claim 4, characterized in that The comparing and analyzing the local metadata list and other metadata lists to determine a number of block data objects to be processed of the local storage node includes: For any of the block data objects, when the block data object exists in both the local metadata list and the other metadata lists, if the latest status value of the block data object in the local metadata list is less than the latest status value of the block data object in the other metadata lists, then the block data object is used as the block data object to be processed; The key metadata of the block data object includes the latest status value, the service request sent to the block data object carries the latest status value, and when the block data object receives the service request, the latest status value in the key metadata is updated.
6. The method according to claim 4, characterized in that The comparing and analyzing the local metadata list and other metadata lists to determine a number of block data objects to be processed of the local storage node includes: For any of the block data objects, if the block data object does not exist in the local metadata list but exists in other metadata lists, the block data object is used as the block data object to be processed.
7. The method according to claim 5, characterized in that Determining the data consistency processing strategy of the block data object to be processed according to the abnormal reason of the block data object to be processed includes: If the latest status value of the block data object to be processed in the local metadata list is less than the latest status value of the block data object to be processed in the other metadata list, it is determined that the abnormal reason of the block data object to be processed is that the local version is not the latest version; When it is determined that the abnormal reason of the block data object to be processed is that the local version is not the latest version, the data consistency processing strategy of the block data object to be processed is determined to be a local recovery strategy.
8. The method according to claim 6, characterized in that Determining the data consistency processing strategy of the block data object to be processed according to the abnormal reason of the block data object to be processed includes: If the block data object to be processed does not exist in the local metadata list but exists in other metadata lists, obtaining a write identifier of the block data object to be processed in other metadata lists; When the write identifier of the block data object to be processed in other metadata lists indicates that the block data object to be processed has completed the overwrite operation in other storage nodes, determining that the data consistency processing strategy of the block data object to be processed is a local recovery strategy; When the write identifier of the block data object to be processed in other metadata lists indicates that the block data object to be processed has not completed the overwrite operation in other storage nodes, determining that the data consistency processing strategy of the block data object to be processed is a local creation strategy; The key metadata of the block data object includes the write flag.
9. The method according to claim 1, characterized in that: Before performing data consistency processing on the local storage node according to the data consistency processing strategy of each block data object to be processed, the method further includes: In the case where it is determined that the storage resources of the distributed storage system have been created, determining the actual storage resource amount of the distributed storage system according to the total number of block data objects and the fixed size of the block data objects in the distributed storage system; Determining whether a block data object is lost in the distributed storage system according to an actual storage resource amount of the distributed storage system; When it is determined that a block data object loss occurs in the distributed storage system, a block data object loss alarm is generated.
10. The method according to claim 1, characterized in that The performing data consistency processing on the local storage node according to the data consistency processing strategy of each block data object to be processed includes: Determining the data consistency processing priority of each of the block data objects to be processed according to the access times and disk positions of each of the block data objects to be processed; According to the data consistency processing strategy and data consistency processing priority of each block data object to be processed, the data consistency processing of each block data object to be processed is performed in sequence to complete the data consistency processing of the local storage node; The key metadata of the block data object includes the access times and the disk location.
11. A distributed storage system, characterized in that: include: A plurality of storage nodes, wherein local metadata information is stored locally in the storage nodes; The storage node performs data consistency processing based on the method according to any one of claims 1 to 10.
12. An electronic device, characterized in that: include: at least one processor and memory; The memory stores computer-executable instructions; The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the method according to any one of claims 1 to 10.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when a processor executes the computer-executable instructions, the method according to any one of claims 1 to 10 is implemented.
14. A computer program product, characterized in that The method comprises computer instructions for causing a computer to execute the method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Distributed storage system construction method based on mimicry defense
CN111031096A
Distributed database synchronization consistency verification method, device and system and medium
CN117971964A
