Metadata storage method, device and equipment and readable storage medium
By introducing specific sets into the metadata operation transaction description structure and extending mirror pairs into mirror groups, the problem of insufficient metadata mirror protection in the storage system is solved, and business reliability and system availability are improved.
Patent Information
- Application Number
- CN202411126215.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-16
- Publication Date
- 2024-10-25
AI Technical Summary
Existing storage systems have insufficient business reliability in terms of metadata mirror protection. In particular, they cannot continue to process services when mirror pairs fail at the same time, and they lack the ability to expand the number of mirrors.
By introducing the set of nodes to be synchronized, the set of unresponsive nodes, and the set of failed lost nodes in the metadata operation transaction description structure, mirror synchronization of metadata records is achieved, and the mirror pair is expanded into a mirror group to accommodate more nodes, ensuring the integrity of metadata records. Reliable storage.
It effectively improves the business reliability of the storage system, reduces the possibility of simultaneous failure of all nodes in the mirror relationship, supports mirror relationships of more nodes, and ensures reliable storage of metadata and high availability of the system.
Smart Images

Figure CN118838554A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of storage technology, and in particular to a metadata storage method, device, equipment and readable storage medium. Background Art
[0002] In the storage system, the storage space actually occupied by the thin volume will increase as the actual capacity used by users increases, which is more flexible than the storage space occupied by the fully allocated volume.
[0003] In addition to storing user data, thin volumes also generate and store metadata, which is used to map the addresses of user available space and the addresses of the space actually occupied by the volume. The metadata is also stored in the hard disk, but in order to prevent access to metadata in the hard disk from becoming a performance bottleneck, frequently used or newly generated metadata needs to be cached in the memory. Metadata is crucial to correctly finding user data.
[0004] The metadata mirroring mechanism can provide redundant protection for metadata located in memory. That is, when there are two or more controllers in a storage server that are in a normal service state and every two controllers are in a team state, during the process of writing user data, the addition / modification operation of the metadata of a controller node will be synchronized to the controller node in the team through transactions to provide metadata backup.
[0005] When a node fails and can no longer provide services, the node paired with it will be left alone. If the number of nodes currently able to provide services online is greater than or equal to two, a new node will re-team with the node paired with the failed node to form a new mirror pair. When a previously failed node recovers and rejoins the cluster, the node will also form a mirror pair with a currently online node. This process is called re-mirroring.
[0006] Since metadata stores the mapping from the volume's user available space address to the real space address and is crucial for finding user data, if metadata is lost, a piece of user data may be lost. Metadata mirroring can provide metadata protection while minimizing the impact on performance. However, when both controllers of a mirror pair fail at the same time, even if there are multiple surviving nodes in the system, the entire system can no longer continue to process services, resulting in low service reliability of the storage system.
[0007] In summary, how to effectively solve the problem of improving the service reliability of the storage system is a technical problem that those skilled in the art urgently need to solve. Summary of the invention
[0008] The purpose of this application is to provide a metadata storage method, device, equipment and readable storage medium, which can effectively solve the metadata storage problem and effectively improve the business reliability of the storage system.
[0009] In order to solve the above technical problems, this application provides the following technical solutions:
[0010] A metadata storage method, comprising:
[0011] Responding to read and write requests, determining metadata records to be mirrored and synchronized;
[0012] Reading a set of nodes to be synchronized from a metadata operation transaction description structure corresponding to the read / write request; wherein the nodes in the set of nodes to be synchronized and the local node belong to the same mirror group;
[0013] Sending a metadata operation image to the nodes in the set of nodes to be synchronized;
[0014] After receiving the response message fed back by the node, delete the responded node from the unresponded node set in the metadata operation transaction description structure;
[0015] When it is determined that a node is faulty, adding the faulty node to the set of faulty lost nodes in the metadata operation transaction description structure;
[0016] In combination with the unresponsive node set and the failed lost node set, synchronization completion confirmation of the metadata recording in the mirror group is performed.
[0017] Preferably, sending the metadata operation mirror to the nodes in the set of nodes to be synchronized includes:
[0018] Sending the metadata operation image to the node;
[0019] Receive a callback about the metadata operation image, and use the callback variable to count the callback;
[0020] If the callback times are consistent with the number of nodes in the to-be-synchronized node set, the sending is completed.
[0021] Preferably, before responding to the read / write request and determining the metadata record to be mirrored and synchronized, the method further includes:
[0022] Obtain a unique identifier of a node in the mirror group from the system;
[0023] The unique identifier is stored in the set of nodes to be synchronized in the metadata operation transaction description structure.
[0024] Preferably, it includes:
[0025] In a multi-threaded operation scenario, thread locks are used to protect data during the modification process of the metadata operation transaction description structure.
[0026] Preferably, sending the metadata operation mirror to the nodes in the set of nodes to be synchronized includes:
[0027] In the process of sending the metadata operation mirror to the nodes in the set of nodes to be synchronized, obtaining the transaction information sent to each node;
[0028] Record the transaction information in a sent transaction linked list in the metadata operation transaction description structure;
[0029] Accordingly, after recording the transaction information, the re-imaging process includes:
[0030] After recovery from a failure or a new node is added, the node expansion phase begins;
[0031] In the node expansion phase, the mirror group pairing relationship is obtained from the system;
[0032] Using the mirror group pairing relationship, determine whether the newly added node belongs to the mirror group;
[0033] If yes, then obtain the sending transaction linked list;
[0034] Determine a surviving target node from the mirror group using the transaction information recorded in the sent transaction linked list;
[0035] Synchronize the metadata information in the target node to the newly added node;
[0036] Obtaining a unique identifier of the newly added node;
[0037] Storing the unique identifier in the set of nodes to be synchronized in the metadata operation transaction description structure;
[0038] During the exchange phase of fault recovery, adjust the mirror team relationship;
[0039] According to the new mirror group relationship, the changed node is removed from the mirror group.
[0040] Preferably, when a node failure is determined, adding a failed node to the failed lost node set in the metadata operation transaction description structure includes:
[0041] Get node failure information from the system;
[0042] Determine the faulty node using the node fault information;
[0043] Using the transaction information recorded in the sending transaction linked list, determining whether to send the metadata operation image to the faulty node;
[0044] If yes, then the faulty node is added to the set of faulty lost nodes in the metadata operation transaction description structure, and the faulty node is deleted from the set of unanswered nodes in the metadata operation transaction description structure.
[0045] Preferably, in combination with the unresponsive node set and the failed lost node set, performing synchronization confirmation of the metadata recording in the mirror group includes:
[0046] Determine whether the unanswered node set is empty;
[0047] If yes, determining that the metadata recording has been synchronously completed in the mirror group;
[0048] If not, obtaining the set of failed lost nodes;
[0049] If all nodes in the unresponsive node set belong to the failed lost node set, it is determined that the metadata record has been synchronously completed in the mirror group;
[0050] If the nodes in the unresponsive node set do not belong to the failed lost node set, it is determined that the metadata recording is not completed in the mirror group.
[0051] A metadata storage device, comprising:
[0052] The metadata update module is used to respond to read and write requests and determine the metadata records to be mirrored and synchronized;
[0053] A synchronization node determination module, used to read a set of nodes to be synchronized from a metadata operation transaction description structure corresponding to the read / write request; wherein the nodes in the set of nodes to be synchronized and the local node belong to the same mirror group;
[0054] A message sending module, used for sending a metadata operation image to the nodes in the set of nodes to be synchronized;
[0055] A response management module, configured to delete the responded node from the unresponded node set in the metadata operation transaction description structure after receiving the response message fed back by the node;
[0056] A fault management module, configured to add a faulty node to a set of faulty lost nodes in the metadata operation transaction description structure when a node fault is determined;
[0057] The synchronization completion determination module is used to determine that the synchronization of the metadata record in the mirror group is completed when the unresponsive node set is empty or the unresponsive node set is equal to the failed lost node set.
[0058] An electronic device, comprising:
[0059] Memory for storing computer programs;
[0060] A processor is used to implement the steps of the above-mentioned metadata storage method when executing the computer program.
[0061] A readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the metadata storage method are implemented.
[0062] A computer program product includes a computer program / instruction, which, when executed by a processor, implements the steps of the above-mentioned metadata storage method.
[0063] By applying the method provided in the embodiment of the present application, a metadata record to be synchronized with a mirror is determined in response to a read / write request; a node set to be synchronized is read from a metadata operation transaction description structure corresponding to the read / write request; wherein the nodes in the node set to be synchronized and the local node belong to the same mirror group; a metadata operation mirror is sent to the nodes in the node set to be synchronized; after receiving a response message fed back by the node, the responded node is deleted from the unresponsive node set in the metadata operation transaction description structure; when a node failure is determined, the failed node is added to the failed lost node set in the metadata operation transaction description structure; and the synchronization of the metadata record in the mirror group is confirmed to be completed by combining the unresponsive node set and the failed lost node set.
[0064] In the present application, response processing is performed for read-write transactions, and metadata records to be mirrored and synchronized can be generated. After determining that there are metadata records to be mirrored and synchronized, first read the set of nodes to be synchronized from the metadata operation transaction description result corresponding to the read-write transaction. The nodes in the set of nodes to be synchronized belong to the same mirror group as the local node. Then, the metadata operation mirror is sent to the nodes in the set of nodes to be synchronized and the response message of the receiving node is waited for. After receiving the response information fed back by the node, the responded node can be deleted from the set of unresponsive nodes in the metadata operation transaction description result. When it is determined that the node fails, the failed node is added to the failed lost node in the metadata operation error description result. Finally, by combining the unresponsive node set and the failed lost node set, the synchronization completion confirmation of the metadata record in the mirror group can be performed.
[0065] Technical effect: By adding a set of nodes to be synchronized, a set of unresponsive nodes, and a set of failed lost nodes in the metadata operation transaction description structure, and updating these sets during the mirror synchronization process of metadata records, the mirror pair can be expanded into a mirror group. The mirror group can accommodate more nodes, and through these sets, the reliable storage of metadata records can be guaranteed. Since the mirror group can accommodate more nodes, the possibility of all nodes in the mirror relationship failing at the same time can be reduced, which can effectively improve the business reliability of the storage system.
[0066] Accordingly, the embodiments of the present application also provide metadata storage devices, equipment, readable storage media and computer program products corresponding to the above-mentioned metadata storage method, which have the above-mentioned technical effects and are not described in detail here. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0068] Figure 1 This is a flowchart of an implementation method of metadata storage in an embodiment of the present application;
[0069] Figure 2 This is a normal implementation flow chart of a metadata storage method in an embodiment of the present application;
[0070] Figure 3 This is a flowchart of a metadata storage method for troubleshooting in an embodiment of the present application;
[0071] Figure 4 This is a schematic diagram of the structure of a metadata storage device in an embodiment of the present application;
[0072] Figure 5 This is a schematic diagram of the structure of an electronic device in an embodiment of the present application;
[0073] Figure 6 This is a schematic diagram of the specific structure of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION
[0074] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.
[0075] Please refer to Figure 1 , Figure 1 This is a flowchart of a metadata storage method in an embodiment of the present application, the method comprising the following steps:
[0076] S101, responding to a read / write request and determining metadata records to be mirrored and synchronized.
[0077] In this embodiment, the metadata may specifically be metadata generated by the thin volume and required to be stored. For ease of understanding, the metadata corresponding to the thin volume and the root cause of the specific problem to be solved by this application are briefly described below:
[0078] In the storage system, the storage space actually occupied by the thin volume will increase as the actual capacity used by the user increases. Compared with the storage space occupied by the fully allocated volume, the thin volume is more flexible. Therefore, the thin volume is increasingly widely used in user business.
[0079] In addition to storing user data, thin volumes also need to generate and store metadata to map the addresses of user available space and the addresses of the space actually occupied by the volume. The metadata will also exist on the hard disk, but in order to prevent access to metadata on the hard disk from becoming a performance bottleneck, frequently used or newly generated metadata needs to be cached in memory. Metadata is crucial to correctly finding user data.
[0080] Since memory is a volatile storage medium and memory data will be lost after power failure, there is a metadata mirroring mechanism to provide redundant protection for the metadata located in the memory. That is, when there are two or more controllers in a storage server that are in a normal service state and every two controllers are in a team state, during the process of writing user data, the addition / modification operation of the metadata of a controller node will be synchronized to the controller node in the team through transactions to provide metadata backup.
[0081] When a node fails and can no longer provide services, the node paired with it will be left alone. If the number of nodes that can currently provide services online is greater than or equal to two, a new node will be re-teamed with the node paired with the failed node to form a new mirror pair. When a previously failed node recovers and rejoins the cluster, the node will also form a mirror pair with a currently online node. This process is called re-mirroring. The most important step in the re-mirroring process is to synchronize metadata from the online node to the newly joined mirror pair node. Only when metadata synchronization is correct can subsequent metadata reading / addition / modification operations be carried out normally, and the newly joined node of the mirror pair can process business normally.
[0082] When a node fails or recovers, the system will first sense the failure and notify each module to start node regrouping. Since the speed of node regrouping of each module on the storage system software stack varies, in order to unify the pace of regrouping of each module, the entire regrouping process is divided into two stages: node expansion and node exchange. The main function of the node expansion stage is to synchronize metadata from the surviving node in the mirror pair to the newly added node, and the node exchange stage is mainly to make adjustments to make the business load of each node relatively balanced after the node regroups.
[0083] Currently, most systems only support dual-control mirror mode for metadata protection. That is, when new metadata modifications are generated during the write IO process, the operations on the metadata are recorded through transactions and sent to a single node that forms a mirror pair with it. The transaction receiving node executes the same operation on its own node and responds to the sender that the mirroring is completed.
[0084] The dual-controller mirroring protection capability for metadata may not be sufficient in some cases. Since metadata stores the mapping from the user available space address of the volume to the real space address and is crucial for finding user data, if metadata is lost, it may cause the loss of a piece of user data. Metadata mirroring can provide metadata protection while minimizing the impact on performance. The number of nodes involved in the mirroring is related to the protection capability. Only when all nodes in the mirror pair fail can the service be no longer provided. In a storage system using dual-controller mirroring mode, when both controllers of a mirror pair fail at the same time, the entire system can no longer continue to process services, even if there are multiple surviving nodes in the system.
[0085] The current dual-controller mirroring mode also lacks the ability to expand the number of mirrors, and it is not easy to change the dual-controller mirroring to a three-controller or four-controller mirroring.
[0086] If another node fails during node recovery, there is a scenario that cannot be handled, resulting in metadata loss. During the node failure and recovery process, metadata needs to be synchronized with the newly added nodes of the mirror pair during the expand phase. In order to wait for all modules on the storage software stack to complete the corresponding processing actions, the newly formed team state may need to be maintained for a period of time between the expand phase and the exchange phase. If there are three nodes in the mirror pair at this time, the current dual-control mirror mechanism cannot maintain the metadata mirror to the third node when processing IO during this period, resulting in the metadata of the newly added node not being the latest and valid. If there is a mirror pair with three nodes in the expand phase, a node will be removed when entering the exchange phase and eventually return to the mirror pair with two nodes. If a node that has been surviving during this phase fails for some reason and a new node needs to be added to handle the business, user data will be lost because the new node does not have all valid metadata.
[0087] In order to solve this problem, in an embodiment of the present application, the mirror pair is adjusted to a mirror group. It can be understood that, generally, the number of nodes in the mirror group is greater than the number of nodes in the mirror pair.
[0088] After the master node in the mirror group processes the IO request, if a metadata record that needs to be mirrored and synchronized in the mirror group is generated, step S102 may be executed.
[0089] The metadata record to be synchronized with the mirror image may be a newly generated record, or may be a modification or deletion of an existing record. In this embodiment, the metadata record to be synchronized with the mirror image is not specifically limited.
[0090] S102: Read a set of nodes to be synchronized from a metadata operation transaction description structure corresponding to a read / write request.
[0091] The nodes in the to-be-synchronized node set and the local node belong to the same mirror group.
[0092] In order to enable the metadata records to be synchronized by all mirror groups, the embodiment of the present application also expands the metadata operation transaction description structure. In this embodiment, the set of nodes to be synchronized (nodeindexSet), the set of unanswered nodes (nodeindexInflightSet) and the set of failed lost nodes (nodeindexLostSet) are expanded in the metadata operation transaction description structure.
[0093] After it is clear that the mirror synchronization of metadata records needs to be performed, the set of nodes to be synchronized is first read from the metadata operation transaction description structure corresponding to the read-write mirror.
[0094] It should be noted that the node set to be synchronized records the nodes that belong to the same mirror group as the local node. In other words, the metadata records generated by the local node need to be mirrored and synchronized to each node in the node set to be synchronized.
[0095] In a specific implementation of the present application, before responding to a read / write request and determining the metadata record to be mirrored and synchronized, the method further includes:
[0096] Get the unique ID of the node in the mirror group from the system;
[0097] The unique identifier is stored in the set of nodes to be synchronized in the metadata operation transaction description structure.
[0098] That is, the elements in the set of nodes to be synchronized correspond to the unique identifiers (indexes) of the nodes in the mirror group.
[0099] S103: Send the metadata operation image to the nodes in the set of nodes to be synchronized.
[0100] After the node to be synchronized is determined, the metadata operation image can be sent to the node to be synchronized.
[0101] In a specific implementation of the present application, sending a metadata operation image to a node in a set of nodes to be synchronized includes:
[0102] Send metadata operation image to the node;
[0103] Receive callbacks about metadata operation images and use callback variables to count callbacks;
[0104] If the number of callbacks is consistent with the number of nodes in the node set to be synchronized, the sending is completed.
[0105] For ease of description, the above three steps are combined for explanation below.
[0106] To send a metadata operation image to the nodes in the set of nodes to be synchronized, it is necessary to add all nodes to the nodeindexSet according to the nodeindexSet, add the metadata operation to be sent to the corresponding inflightList according to the receiving node index, and then package the messages in sequence and send them to the corresponding nodes using the system interface.
[0107] After each message is sent, a callback will be received from the system (indicating that the message has been sent). At this time, calledCount (callback variable) is used to record the number of callbacks received and compare it with the number of nodes in nodeindexSet. When all messages are sent, the message post-processing process is executed, so that it can be determined that all metadata operation images have been sent.
[0108] S104: After receiving the response message fed back by the node, delete the responded node from the unresponded node set in the metadata operation transaction description structure.
[0109] After the metadata operation image is sent to the node, the node that receives the metadata operation image can store the metadata record based on the metadata operation image and feed back a response message to the control node.
[0110] After receiving the response information, the control node may delete the responded node from the unanswered node set.
[0111] S105: When it is determined that a node is faulty, add the faulty node to the set of faulty lost nodes in the metadata operation transaction description structure.
[0112] When any node in the system fails, all nodes will receive a system notification. Therefore, when the control node determines that a node has failed, the failed node can be added to the failed lost node set.
[0113] In one embodiment of the present application, in a multi-threaded operation scenario, a thread lock is used to protect data during the modification of the metadata operation transaction description structure. When there are multi-threaded operations, in order to ensure data consistency, thread locks are required when modifying inflightList and nodeindexInflightSet to ensure that only one thread can operate these data structures at the same time.
[0114] In one implementation of the present application, sending a metadata operation image to a node in a set of nodes to be synchronized includes:
[0115] In the process of sending the metadata operation image to the nodes in the set of nodes to be synchronized, the transaction information sent to each node is obtained;
[0116] Record transaction information in the send transaction linked list in the metadata operation transaction description structure;
[0117] Accordingly, after recording the transaction information, the re-imaging process includes:
[0118] After recovery from a failure or a new node is added, the node expansion phase begins;
[0119] In the node expansion phase, the mirror group pairing relationship is obtained from the system;
[0120] Use the mirror group pairing relationship to determine whether the newly added node belongs to the mirror group;
[0121] If yes, get the sent transaction list;
[0122] Using the transaction information recorded in the sent transaction list, determine the surviving target node from the mirror group;
[0123] Synchronize the metadata information in the target node to the newly added node;
[0124] Get the unique identifier of the newly added node;
[0125] The unique identifier is stored in the set of nodes to be synchronized in the metadata operation transaction description structure;
[0126] During the exchange phase of fault recovery, adjust the mirror team relationship;
[0127] According to the new mirror team relationship, the changed nodes are removed from the mirror group.
[0128] For ease of description, the above steps are combined for explanation below.
[0129] When sending a message to each node, the specific content of the metadata operation recorded in the message is added to the inflightList (sending transaction list). This data structure can be indexed by the node index.
[0130] When the message sending node senses a node failure through system notification, it searches nodeindexSet to see if it is a message receiving node based on its index. If so, it is added to nodeindexLostSet.
[0131] After recording the transaction information, during the re-imaging process, the re-imaging process can be performed based on the sent transaction list. Specifically, it includes:
[0132] When the system recovers after a node failure or a new node joins the system, in the expand phase (expansion phase), the surviving nodes in the mirror group synchronize all the metadata information currently possessed by the newly joined node to the newly joined node according to the mirror pairing relationship provided by the system.
[0133] In the exchange phase of fault recovery, the system will adjust the mirroring team relationship again. Before that, IO can be processed to generate metadata information. At this time, all metadata operations need to be mirrored to all nodes currently in the mirroring team, even if some nodes may be removed from the mirror pair during the exchange phase. For the specific message sending and processing process involved here, please refer to the description of metadata record synchronization.
[0134] In a specific implementation of the present application, when a node failure is determined, adding a failed node to a failed lost node set in a metadata operation transaction description structure includes:
[0135] Get node failure information from the system;
[0136] Determine the faulty node using the node fault information;
[0137] Use the transaction information recorded in the sent transaction list to determine whether to send the metadata operation image to the failed node;
[0138] If yes, then the faulty node is added to the faulty lost node set in the metadata operation transaction description structure, and the faulty node is deleted from the unanswered node set in the metadata operation transaction description structure.
[0139] For ease of understanding, the above steps are combined for explanation below.
[0140] When any node in the system fails, all nodes will receive a system notification. When the master node senses a node failure, it first checks inflightList based on the failed node index to see if there is a message sent to it. If there is, it needs to be processed. First, the index is added to nodeindexLostSet, and then the message is removed from inflightList based on the index, and the index is removed from nodeindexInflightSet.
[0141] Subsequently, nodeindexInflightSet can be used to determine whether messages sent to all nodes have been responded to or have failed to respond. If there are still nodes alive but not responding to messages, continue waiting. Otherwise, nodeindexSet and nodeindexLostSet are equal to determine whether all nodes have failed to respond. If this happens, it is considered that the image cannot be completed, and then re-image or abandon the image. If there is no message waiting for a response and there are nodes alive and responding normally, the image is considered to be completed and the subsequent process can be started.
[0142] S106: Combine the unresponsive node set and the failed lost node set to confirm that the metadata record is synchronized and completed in the mirror group.
[0143] In a specific implementation of the present application, in combination with the unresponsive node set and the failed lost node set, the metadata record is synchronously confirmed in the mirror group, including:
[0144] Determine whether the unanswered node set is empty;
[0145] If yes, it is determined that the metadata recording has been synchronously completed in the mirror group;
[0146] If not, obtain the set of failed lost nodes;
[0147] If all nodes in the unanswered node set belong to the failed lost node set, it is determined that the metadata record has been synchronized and completed in the mirror group;
[0148] If the node in the unresponsive node set does not belong to the failed lost node set, it is determined that metadata recording is not completed in the mirror group.
[0149] For ease of description, the above steps are combined for explanation below.
[0150] When determining whether this synchronization has been completed, it is necessary to clarify whether all normal nodes in the same mirror group have completed the synchronization. Specifically, you can first determine whether the unresponsive node set is empty. If it is empty, it means that all nodes have fed back response messages. At this time, you can directly determine that the mirror group has completed the synchronization of metadata records. Otherwise, you can continue to wait until the waiting time reaches the preset threshold, and you can obtain the combination of faulty and lost nodes. If all the nodes in the unresponsive node set belong to the faulty and lost node set, it means that the unresponsive nodes are all faulty and cannot complete the response. At this time, it can be determined that all normal nodes in the mirror group have completed the synchronization of metadata records. If all the nodes in the unresponsive node set do not belong to the faulty and lost node set, it means that the unresponsive nodes are still normal, and may not respond due to busy transactions. At this time, it can be determined that the normal nodes in the mirror group have not completed the synchronization of metadata records, and you can continue to wait for the response message.
[0151] In a specific implementation of the present application, after the message is sent, timing is performed; when the waiting time reaches a threshold, the metadata record is synchronized and confirmed in the mirror group in combination with the unresponsive node set and the failed lost node set.
[0152] In this way, it is possible to avoid the situation where the synchronization of normal nodes is not completed and the synchronization completion confirmation is repeatedly checked, and it is also possible to avoid waiting too long. The size of the threshold corresponding to the waiting time can be set by counting the statistical time of the normal node feedback response information. For example, it is set to the mode time or average time of the normal node feedback response information.
[0153] If it is clear that the synchronization has been completed, other operations can be performed; if it is clear that the synchronization has not been completed, it is necessary to continue to wait for the response information. Of course, if the set of failed lost nodes is equal to the set of nodes to be synchronized, it is determined that the synchronization cannot be completed, and the metadata record processing is suspended, waiting for other normal nodes to re-mirror with the control node to form a new mirror group, and then perform metadata record synchronization.
[0154] By applying the method provided in the embodiment of the present application, a metadata record to be synchronized with a mirror is determined in response to a read / write request; a node set to be synchronized is read from a metadata operation transaction description structure corresponding to the read / write request; wherein the nodes in the node set to be synchronized and the local node belong to the same mirror group; a metadata operation mirror is sent to the nodes in the node set to be synchronized; after receiving a response message fed back by the node, the responded node is deleted from the unresponsive node set in the metadata operation transaction description structure; when a node failure is determined, the failed node is added to the failed lost node set in the metadata operation transaction description structure; and the synchronization of the metadata record in the mirror group is confirmed to be completed by combining the unresponsive node set and the failed lost node set.
[0155] In the present application, response processing is performed for read-write transactions, and metadata records to be mirrored and synchronized can be generated. After determining that there are metadata records to be mirrored and synchronized, first read the set of nodes to be synchronized from the metadata operation transaction description result corresponding to the read-write transaction. The nodes in the set of nodes to be synchronized belong to the same mirror group as the local node. Then, the metadata operation mirror is sent to the nodes in the set of nodes to be synchronized and the response message of the receiving node is waited for. After receiving the response information fed back by the node, the responded node can be deleted from the set of unresponsive nodes in the metadata operation transaction description result. When it is determined that the node fails, the failed node is added to the failed lost node in the metadata operation error description result. Finally, by combining the unresponsive node set and the failed lost node set, the synchronization completion confirmation of the metadata record in the mirror group can be performed.
[0156] Technical effect: By adding a set of nodes to be synchronized, a set of unresponsive nodes, and a set of failed lost nodes in the metadata operation transaction description structure, and updating these sets during the mirror synchronization process of metadata records, the mirror pair can be expanded into a mirror group. The mirror group can accommodate more nodes, and through these sets, the reliable storage of metadata records can be guaranteed. Since the mirror group can accommodate more nodes, the possibility of all nodes in the mirror relationship failing at the same time can be reduced, which can effectively improve the business reliability of the storage system.
[0157] To help those skilled in the art better understand and implement the metadata storage method provided in the embodiment of the present application, the metadata storage method is described in detail below with reference to a specific application scenario as an example.
[0158] To expand from the metadata mirroring state of two nodes to multiple nodes, it is necessary to support a transaction mechanism for recording metadata operations. It is necessary to support sending to multiple nodes, waiting for all node operations to complete and return. In addition, it is necessary to support the problem of node failure after sending to multiple nodes. When recovering after a node failure, it is necessary to support synchronizing metadata to newly added mirror pair nodes.
[0159] Support sending metadata operation transaction information to multiple nodes. First, you need to expand the relevant data structure to record the information of multiple information receiving end nodes. You can use the array or bitmap type variable nodeindexSet to record which nodes have sent messages, nodeindexInflightSet to record which nodes have not returned the sent messages, nodeindexLostSet to record which nodes have failed to send messages, and inflightList to record the specific transaction information sent to each node. The specific usage of each data structure is as follows:
[0160] The node node0 currently processing IO generates a record of the metadata that needs to be operated based on the received IO, obtains the unique identification index of all nodes of the current mirror pair from the system, these nodes except the current node node0 are the target nodes of the metadata operation mirror, and adds all nodes to the nodeindexSet record.
[0161] When all mirror nodes need to send metadata operation mirrors, that is, send according to the index in nodeindexSet, first add all nodes in nodeindexSet to nodeindexInflightSet for recording. Note that they must be recorded in InflightSet before sending messages to all nodes; when a node completes the mirror operation and returns a response, it will be removed from nodeindexInflightSet.
[0162] When sending a message to each node, the specific content of the metadata operation recorded in the message is added to inflightList. This data structure can be indexed by the node index.
[0163] When the message sending node senses a node failure through system notification, it searches nodeindexSet to see if it is a message receiving node based on its index. If so, it adds it to nodeindexLostSet.
[0164] Secondly, it is necessary to support multiple mirror nodes in the processes of sending metadata operation messages and responding to operation results of receiving nodes.
[0165] The overall execution process is as follows Figure 2As shown, node 0 sends a message to nodes 1 and 2 and waits. Nodes 1 and 2 perform metadata operations on their own nodes according to the message content. After the execution is completed, they send a response to node 0. When node 0 receives the response from node 1, it finds that node 2 has also responded, so it continues to wait. After the response from node 2 arrives, node 0 finds that all nodes have responded and starts to continue the subsequent execution.
[0166] When sending, all nodes need to be added to the nodeindexSet according to the nodeindexSet, and the metadata operation to be sent needs to be added to the corresponding inflightList according to the receiving node index. Then, the messages are packaged in sequence and sent to the corresponding nodes using the system interface.
[0167] After each message is sent, a callback will be received from the system (indicating that the message has been sent). At this time, the calledCount variable is used to record the number of callbacks received and compared with the number of nodes in nodeindexSet. Only when all messages have been sent will the original message sending post-processing flow be executed.
[0168] After receiving the message, the receiving node parses it into metadata according to the format of the sent message, and sets nodeindexSet to the message source node index; the receiving end performs the same operation according to the metadata operation process, and sends a response to the message source node according to nodeindexSet after the operation is completed. The process of sending the response message can refer to the process of the message source node above.
[0169] The metadata operation mirror is considered complete only after all destination nodes to which the same metadata operation message is sent have returned a response.
[0170] When the message sending node node0 receives a response from a node to a metadata mirroring operation message, it will know the index of the node. First, it will remove the message from inflightList according to the index, and then remove the index from nodeindexInflightSet. If all nodes return a response, that is, the element in nodeindexInflightSet is empty, it can be considered that the metadata operation has been completed in all node mirrors, and IO processing can be performed later.
[0171] In the case of multi-threaded operations, when modifying inflightList and nodeindexInflightSet, thread locks can be used to protect them to ensure that only one thread can operate these data structures at the same time.
[0172] Supports processing of node failure after sending metadata operation mirror information to multiple nodes. The specific execution process is as follows Figure 3 As shown, node 0 sends a message to nodes 1 and 2 and waits. Nodes 1 and 2 perform metadata operations on their respective nodes according to the message content and send responses to node 0 after the execution is completed. However, node 2 fails for some reason during the execution process. Node 0 therefore senses the loss of node 2, but finds that node 1 is still alive and has not responded, so it continues to wait. After node 1 returns a response, node 0 finds that all surviving nodes have responded and those that have not responded have failed, so it considers that the wait is over and starts to execute subsequent processes.
[0173] When node0 sends messages to multiple nodes and waits for all nodes to respond to the messages before continuing with subsequent processing, if all nodes can operate normally and respond to the messages smoothly, the above process can operate normally. However, if a node suddenly fails to operate normally due to hardware or software failure during the message processing, if no processing is performed at this time, node0 will continue to wait for the response of the failed node, which may cause the inability to continue subsequent processing.
[0174] The basic idea for handling such abnormal situations is to wait for the metadata mirroring operation to complete as long as there is a surviving node in the node, regardless of the order in which the surviving node responds to the message and the node fails. If all nodes fail, the mirroring operation is considered to be unsuccessful, and it is recorded and waited for subsequent retries. The details of the entire process design are as follows:
[0175] When any node in the system fails, all nodes will receive a system notification. When node0 senses a node failure, it first checks whether there is a message sent to it in inflightList according to the failed node index. If there is, it needs to be processed. First, the index is added to nodeindexLostSet, and then the message is removed from inflightList according to the index, and the index is removed from nodeindexInflightSet at the same time. Then, according to nodeindexInflightSet, it is determined whether the messages sent to all nodes have been responded to or have failed to respond. If there are still nodes alive but have not responded to the message, continue to wait. Otherwise, it is determined whether all nodes have failed to respond based on whether nodeindexSet and nodeindexLostSet are equal. If this happens, it is considered that the mirroring cannot be completed, and whether to re-mirror or abandon the mirroring will be considered later. If there is no message waiting for a response and there are nodes alive and responding normally, it is considered that the mirroring is completed and the subsequent process can be started.
[0176] That is to say, the metadata storage method provided in the embodiment of the present application can support multi-node metadata mirroring and has the ability to expand from two-node mirroring to all online node mirroring in the system. The more mirror nodes there are, the stronger the protection capability for metadata. It will also have an impact on performance. When all nodes in the system form mirror pairs, even if other nodes fail, as long as one node is still alive, the business can be processed normally, which greatly improves the system availability.
[0177] During the node failure recovery process, multiple node metadata synchronization and operation mirroring are supported, including: when the system recovers after a node failure or a new node joins the system, in the expand phase (expansion phase), the surviving node in the mirror pair synchronizes all the metadata information it currently has to the newly joined node according to the mirror pairing relationship provided by the system. In the exchange phase (exchange phase) of failure recovery, the system will adjust the mirror team relationship again, and IO can be processed before this to generate metadata information. At this time, all metadata operations need to be mirrored to all nodes currently in the mirror team, even if some nodes may be removed from the mirror pair in the exchange phase. For the specific message sending and processing process, please refer to the above description.
[0178] Based on the above process, when the expand phase is completed, all nodes in the mirror pair have complete metadata information and can handle business independently. If the previously surviving node fails, the newly added node can quickly take over the business.
[0179] In other words, three sets and one list can be used to record the receiving nodes of the message, the nodes to which the message has been sent but has not received a response, the nodes to which the message has been sent but has failed, and the specific message content sent to a certain node. At a specific stage, the relevant set / list operations can obtain enough information to control the entire process from sending to response to completion. The strategy of sending messages to multiple recipients and waiting for the receiving nodes to respond to determine that the waiting is over and subsequent processing can be performed, including considering the waiting to be over after all nodes return a response, considering the waiting to be over after a node returns a response and other nodes are all faulty, waiting until all surviving nodes return a response or the failure ends when some nodes fail but there are still surviving nodes that have not responded, and considering the waiting to be over after all nodes fail.
[0180] It can be seen that the metadata storage method provided in the embodiment of the present application includes but is not limited to the following technical effects:
[0181] 1. The dual-controller metadata mirroring capability has been expanded, and three or even more controller nodes can be mirrored, providing stronger and more multi-level protection capabilities for metadata for users to choose from.
[0182] 2. The system can still process business normally after multiple controllers in the mirror pair fail at the same time. For example, when the number of mirror pair nodes is expanded to four, the system can continue to process business even if all nodes in the mirror pair fail at the same time, which greatly reduces the impact of controller failure on business.
[0183] 3. When the node is restored, the new node can be used for metadata mirroring protection in time. Even if a surviving node fails at this time, the metadata will not be lost and the business can be processed normally.
[0184] Corresponding to the above method embodiment, the embodiment of the present application further provides a metadata storage device. The metadata storage device described below and the metadata storage method described above can refer to each other.
[0185] See also Figure 4 As shown, the device includes the following modules:
[0186] The metadata update module 101 is used to respond to the read and write requests and determine the metadata records to be mirrored and synchronized;
[0187] The synchronization node determination module 102 is used to read a set of nodes to be synchronized from the metadata operation transaction description structure corresponding to the read / write request; wherein the nodes in the set of nodes to be synchronized and the local node belong to the same mirror group;
[0188] A message sending module 103 is used to send a metadata operation image to nodes in the set of nodes to be synchronized;
[0189] The response management module 104 is used to delete the responded node from the unresponded node set in the metadata operation transaction description structure after receiving the response message fed back by the node;
[0190] The fault management module 105 is used to add the faulty node to the set of faulty lost nodes in the metadata operation transaction description structure when determining a node fault;
[0191] The synchronization completion determination module 106 is used to determine that the synchronization of metadata records in the mirror group is completed when the unresponsive node set is empty or the unresponsive node set is equal to the failed lost node set.
[0192] The device provided by the embodiment of the present application is applied to respond to a read / write request, determine the metadata record to be mirrored and synchronized; read the node set to be synchronized from the metadata operation transaction description structure corresponding to the read / write request; wherein the nodes in the node set to be synchronized and the local node belong to the same mirror group; send the metadata operation mirror to the nodes in the node set to be synchronized; after receiving the response message fed back by the node, delete the responded node from the unresponded node set in the metadata operation transaction description structure; when it is determined that the node is faulty, add the faulty node to the faulty lost node set in the metadata operation transaction description structure; and combine the unresponded node set and the faulty lost node set to confirm the completion of synchronization of the metadata record in the mirror group.
[0193] In the present application, response processing is performed for read-write transactions, and metadata records to be mirrored and synchronized can be generated. After determining that there are metadata records to be mirrored and synchronized, first read the set of nodes to be synchronized from the metadata operation transaction description result corresponding to the read-write transaction. The nodes in the set of nodes to be synchronized belong to the same mirror group as the local node. Then, the metadata operation mirror is sent to the nodes in the set of nodes to be synchronized and the response message of the receiving node is waited for. After receiving the response information fed back by the node, the responded node can be deleted from the set of unresponsive nodes in the metadata operation transaction description result. When it is determined that the node fails, the failed node is added to the failed lost node in the metadata operation error description result. Finally, by combining the unresponsive node set and the failed lost node set, the synchronization completion confirmation of the metadata record in the mirror group can be performed.
[0194] Technical effect: By adding a set of nodes to be synchronized, a set of unresponsive nodes, and a set of failed lost nodes in the metadata operation transaction description structure, and updating these sets during the mirror synchronization process of metadata records, the mirror pair can be expanded into a mirror group. The mirror group can accommodate more nodes, and through these sets, the reliable storage of metadata records can be guaranteed. Since the mirror group can accommodate more nodes, the possibility of all nodes in the mirror relationship failing at the same time can be reduced, which can effectively improve the business reliability of the storage system.
[0195] In a specific implementation of the present application, the message sending module is specifically used to send a metadata operation image to a node;
[0196] Receive callbacks about metadata operation images and use callback variables to count callbacks;
[0197] If the number of callbacks is consistent with the number of nodes in the node set to be synchronized, the sending is completed.
[0198] In a specific implementation of the present application, the preprocessing module is used to obtain the unique identifier of the node in the mirror group from the system before responding to the read and write request and determining the metadata record to be mirrored and synchronized; and store the unique identifier in the set of nodes to be synchronized in the metadata operation transaction description structure.
[0199] In a specific implementation of the present application, a lock processing module is used to use thread locks to protect data during the modification process of a metadata operation transaction description structure in a multi-threaded operation scenario.
[0200] In a specific implementation of the present application, the message sending module is specifically used to obtain transaction information sent to each node in the process of sending the metadata operation mirror to the nodes in the set of nodes to be synchronized;
[0201] Record transaction information in the send transaction linked list in the metadata operation transaction description structure;
[0202] Correspondingly, the re-image module is used to enter the node expansion phase after recording transaction information after recovery after a failure or after a new node is added;
[0203] In the node expansion phase, the mirror group pairing relationship is obtained from the system;
[0204] Use the mirror group pairing relationship to determine whether the newly added node belongs to the mirror group;
[0205] If yes, get the sent transaction list;
[0206] Using the transaction information recorded in the sent transaction list, determine the surviving target node from the mirror group;
[0207] Synchronize the metadata information in the target node to the newly added node;
[0208] Get the unique identifier of the newly added node;
[0209] The unique identifier is stored in the set of nodes to be synchronized in the metadata operation transaction description structure;
[0210] During the exchange phase of fault recovery, adjust the mirror team relationship;
[0211] According to the new mirror team relationship, the changed nodes are removed from the mirror group.
[0212] In a specific implementation of the present application, the fault management module is specifically used to obtain node fault information from the system;
[0213] Determine the faulty node using the node fault information;
[0214] Use the transaction information recorded in the sent transaction list to determine whether to send the metadata operation image to the failed node;
[0215] If yes, then the faulty node is added to the faulty lost node set in the metadata operation transaction description structure, and the faulty node is deleted from the unanswered node set in the metadata operation transaction description structure.
[0216] In a specific implementation of the present application, the synchronization completion determination module is specifically used to determine whether the unanswered node set is empty;
[0217] If yes, it is determined that the metadata recording has been synchronously completed in the mirror group;
[0218] If not, obtain the set of failed lost nodes;
[0219] If all nodes in the unanswered node set belong to the failed lost node set, it is determined that the metadata record has been synchronized and completed in the mirror group;
[0220] If the node in the unresponsive node set does not belong to the failed lost node set, it is determined that metadata recording is not completed in the mirror group.
[0221] Corresponding to the above method embodiment, the embodiment of the present application further provides an electronic device. The electronic device described below and the metadata storage method described above can refer to each other.
[0222] See also Figure 5 As shown, the electronic device includes:
[0223] A memory 332, for storing computer programs;
[0224] The processor 322 is configured to implement the steps of the metadata storage method of the above method embodiment when executing a computer program.
[0225] For details, please refer to Figure 6 , Figure 6A schematic diagram of the specific structure of an electronic device provided for this embodiment, which may have relatively large differences due to different configurations or performances, may include one or more processors (central processing units, CPU) (for example, one or more processors) and a memory 332, and the memory 332 stores one or more computer programs 342 or data 344. Among them, the memory 332 can be a temporary storage or a permanent storage. The program stored in the memory 332 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the data processing device. Furthermore, the processor 322 can be configured to communicate with the memory 332 to execute a series of instruction operations in the memory 332 on the electronic device 301.
[0226] The electronic device 301 may further include one or more power supplies 326 , one or more wired or wireless network interfaces 350 , one or more input and output interfaces 358 , and / or one or more operating systems 341 .
[0227] The steps in the metadata storage method described above can be implemented by the structure of an electronic device.
[0228] Corresponding to the above method embodiment, the embodiment of the present application further provides a readable storage medium. The readable storage medium described below and the metadata storage method described above can refer to each other.
[0229] A readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the metadata storage method of the above method embodiment are implemented.
[0230] The readable storage medium may specifically be a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or other readable storage medium that can store program codes.
[0231] Corresponding to the above method embodiment, the embodiment of the present application further provides a computer program product. The computer program product described below and the metadata storage method described above can refer to each other.
[0232] A computer program product includes a computer program / instruction. When the computer program / instruction is executed by a processor, the steps of the above-mentioned metadata storage method are implemented.
[0233] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0234] Those skilled in the art may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0235] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0236] Finally, it should be noted that, in this article, relationships such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms include, include or any other variations are intended to cover non-exclusive inclusion, so that a process, method, article or device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0237] Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for those skilled in the art, according to the idea of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A metadata storage method, characterized in that: include: Responding to read and write requests, determining metadata records to be mirrored and synchronized; Reading a set of nodes to be synchronized from a metadata operation transaction description structure corresponding to the read / write request; wherein the nodes in the set of nodes to be synchronized and the local node belong to the same mirror group; Sending a metadata operation image to the nodes in the set of nodes to be synchronized; After receiving the response message fed back by the node, delete the responded node from the unresponded node set in the metadata operation transaction description structure; When it is determined that a node is faulty, adding the faulty node to the set of faulty lost nodes in the metadata operation transaction description structure; In combination with the unresponsive node set and the failed lost node set, synchronization completion confirmation of the metadata recording in the mirror group is performed.
2. The method according to claim 1, characterized in that Sending a metadata operation image to the nodes in the set of nodes to be synchronized includes: Sending the metadata operation image to the node; Receive a callback about the metadata operation image, and use the callback variable to count the callback; If the callback times are consistent with the number of nodes in the to-be-synchronized node set, the sending is completed.
3. The method according to claim 1, characterized in that Before responding to the read / write request and determining the metadata record to be mirrored and synchronized, the following steps are also included: Obtain a unique identifier of a node in the mirror group from the system; The unique identifier is stored in the set of nodes to be synchronized in the metadata operation transaction description structure.
4. The method according to claim 1, characterized in that: include: In a multi-threaded operation scenario, thread locks are used to protect data during the modification process of the metadata operation transaction description structure.
5. The method according to claim 1, characterized in that Sending a metadata operation image to the nodes in the set of nodes to be synchronized includes: In the process of sending the metadata operation mirror to the nodes in the set of nodes to be synchronized, obtaining the transaction information sent to each node; Record the transaction information in a sent transaction linked list in the metadata operation transaction description structure; Accordingly, after recording the transaction information, the re-imaging process includes: After recovery from a failure or a new node is added, the node expansion phase begins; In the node expansion phase, the mirror group pairing relationship is obtained from the system; Using the mirror group pairing relationship, determine whether the newly added node belongs to the mirror group; If yes, then obtain the sending transaction linked list; Determine a surviving target node from the mirror group using the transaction information recorded in the sent transaction linked list; Synchronize the metadata information in the target node to the newly added node; Obtaining a unique identifier of the newly added node; Storing the unique identifier in the set of nodes to be synchronized in the metadata operation transaction description structure; During the exchange phase of fault recovery, adjust the mirror team relationship; According to the new mirror group relationship, the changed node is removed from the mirror group.
6. The method according to claim 5, characterized in that When a node failure is determined, adding the failed node to the failed lost node set in the metadata operation transaction description structure includes: Get node failure information from the system; Determine the faulty node using the node fault information; Using the transaction information recorded in the sending transaction linked list, determining whether to send the metadata operation image to the failed node; If yes, then the faulty node is added to the set of faulty lost nodes in the metadata operation transaction description structure, and the faulty node is deleted from the set of unanswered nodes in the metadata operation transaction description structure.
7. The method according to any one of claims 1 to 6, characterized in that: Combining the unresponsive node set and the failed lost node set, performing synchronization confirmation of the metadata recording in the mirror group includes: Determine whether the unanswered node set is empty; If yes, determining that the metadata recording has been synchronously completed in the mirror group; If not, obtaining the set of failed lost nodes; If all nodes in the unresponsive node set belong to the failed lost node set, it is determined that the metadata record has been synchronously completed in the mirror group; If the nodes in the unresponsive node set do not belong to the failed lost node set, it is determined that the metadata recording is not completed in the mirror group.
8. A metadata storage device, characterized in that: include: The metadata update module is used to respond to read and write requests and determine the metadata records to be mirrored and synchronized; A synchronization node determination module, used to read a set of nodes to be synchronized from a metadata operation transaction description structure corresponding to the read / write request; wherein the nodes in the set of nodes to be synchronized and the local node belong to the same mirror group; A message sending module, used for sending a metadata operation image to the nodes in the set of nodes to be synchronized; A response management module, configured to delete the responded node from the unresponded node set in the metadata operation transaction description structure after receiving the response message fed back by the node; A fault management module, configured to add a faulty node to a set of faulty lost nodes in the metadata operation transaction description structure when a node fault is determined; The synchronization completion determination module is used to determine that the synchronization of the metadata record in the mirror group is completed when the unresponsive node set is empty or the unresponsive node set is equal to the failed lost node set.
9. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the metadata storage method according to any one of claims 1 to 7 when executing the computer program.
10. A readable storage medium, characterized in that: The readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the metadata storage method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Metadata mirroring method and device, equipment and medium
CN120560673A
Metadata mirroring method, apparatus, device, and medium
CN120560673B
Fault processing method of storage controller and electronic equipment
CN120803798A
Data synchronization method and electronic equipment
CN122654220A
