A node online upgrade method, device, equipment and medium

By recording metadata information and updating configuration files in the distributed storage system, stopping the service of the node to be upgraded, and monitoring and processing IO requests, the problem of IO performance degradation during online node upgrades is solved, ensuring the continuity of upper-layer services.

CN118433027BActive Publication Date: 2025-10-28JINAN INSPUR DATA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410706176.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-31
Publication Date
2025-10-28
Estimated Expiration
2044-05-31

AI Technical Summary

Technical Problem

In distributed storage systems, the IO performance degrades during online node upgrades, affecting the continuity of upper-layer services.

Method used

In the distributed storage system, identify the nodes to be upgraded and the non-upgraded nodes, record the first metadata information in the non-upgraded nodes, update the local configuration file of the nodes to be upgraded, stop their Internet Minicomputer System Interface service, monitor input and output requests, process them according to the request type and metadata information, and rejoin the nodes to be upgraded after the upgrade is completed.

Benefits of technology

This ensures that IO requests are processed normally during the upgrade process, avoiding IO performance degradation and reducing the impact on upper-layer business logic.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118433027B_ABST
    Figure CN118433027B_ABST
Patent Text Reader

Abstract

This invention discloses a method, apparatus, device, and medium for online node upgrades, relating to the field of distributed storage technology. During online upgrades, the non-upgraded node records first metadata information used to calculate the location of a temporary copy of the node to be upgraded during the upgrade process; it updates the local configuration file of the node to be upgraded and stops its iSCSI service, thereby preventing the node to be upgraded from providing services during the upgrade process, ensuring that only non-upgraded nodes provide iSCSI services during the upgrade. During the upgrade process, IO requests are processed according to the type of IO request and the first metadata information, ensuring normal IO request processing and avoiding performance degradation of the node to be upgraded during the upgrade process; after the node to be upgraded completes the upgrade and restarts, it rejoins the distributed storage system. The entire online upgrade process ensures normal IO request processing and avoids impacting upper-layer services.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of distributed storage technology, and in particular to a method, apparatus, device, and medium for online node upgrades. Background Technology

[0002] In distributed storage systems, the need for online upgrades is widespread. A key issue in online upgrades is how to handle input / output (I / O) requests. Typically, to ensure data reliability, systems employ a multi-replica strategy, and to guarantee consistency among replicas, a strong consistency model is used. This means that each I / O request must wait for all replicas to complete processing before returning a success message.

[0003] When online upgrades are required, some services, including data storage services, must be restarted for the upgraded system to take effect. However, during the restart of the storage service on the upgrade node and the service recovery period, the strong consistency model causes IO requests to wait indefinitely for the upgrade node's IO responses. This manifests as upper-layer business IOs not returning or returning timeouts, and in performance tests, short periods of zero write IO may occur. This issue can negatively impact system performance and business continuity.

[0004] Given the above issues, how to solve the problem of decreased IO performance during online node upgrades in distributed storage systems, which in turn affects upper-layer services, is an urgent problem for technical personnel in this field to solve. Summary of the Invention

[0005] The purpose of this invention is to provide a method, apparatus, device, and medium for online node upgrades to solve the problem of decreased IO performance during online node upgrades in distributed storage systems, which in turn affects upper-layer services.

[0006] To address the aforementioned technical problems, this invention provides an online node upgrade method applied to a distributed storage system; the method includes:

[0007] In the distributed storage system, nodes to be upgraded and non-upgraded nodes are identified, and first metadata information is recorded in the non-upgraded nodes; wherein, the first metadata information is used to calculate the location of a temporary copy of the node to be upgraded during the upgrade process;

[0008] Update the local configuration file of the node to be upgraded and stop the Internet Minicomputer System Interface service of the node to be upgraded;

[0009] Initiate the upgrade process for the node to be upgraded and monitor the input / output requests received during the upgrade process;

[0010] When the non-upgraded node receives the input / output request, it processes the input / output request according to the type of the input / output request and the first metadata information;

[0011] When the node to be upgraded completes the upgrade and restarts, the node to be upgraded is rejoined to the distributed storage system to complete the upgrade.

[0012] On the one hand, before recording the first metadata information in the non-upgraded node, and after determining the node to be upgraded and the non-upgraded node among the nodes of the distributed storage system, the method further includes:

[0013] Determine the version number to be upgraded for the node to be upgraded;

[0014] The upgrade request is sent from the node to be upgraded to the master node of the distributed storage system.

[0015] When the master node receives the upgrade request, it verifies the node to be upgraded based on the status, configuration information, and version number of the node to be upgraded.

[0016] If the verification fails, the upgrade process for the node to be upgraded is terminated.

[0017] When the verification passes, a broadcast message indicating that the upgrade verification has passed is sent through the master node;

[0018] When the node to be upgraded receives a broadcast message indicating that the upgrade verification has passed, it controls the node to be upgraded and the non-upgraded node to mark the node status of the node to be upgraded as "upgrading in progress" and proceeds to the step of recording the first metadata information in the non-upgraded node.

[0019] On the other hand, updating the local configuration file of the node to be upgraded includes:

[0020] Control the node to be upgraded to update its current version and the version to be upgraded;

[0021] Control the node to be upgraded to generate second metadata information corresponding to the first metadata information;

[0022] The second metadata information is used to determine the first metadata information.

[0023] On the other hand, when the input / output request is a read request, processing the input / output request according to the type of the input / output request and the first metadata information includes:

[0024] Determine the replica node of the data object accessed by the read request;

[0025] The replica node is read based on the read request;

[0026] The replica node is a non-upgrade node;

[0027] Correspondingly, when the input / output request is a write request, processing the input / output request according to the type of the input / output request and the first metadata information includes:

[0028] Calculate the replica node where the copy of the data object accessed by the write request is located based on the first metadata information;

[0029] Determine whether the node status of the replica node is "upgrading".

[0030] If the node status of the replica node is not in the process of upgrading, then a write operation is performed on the replica in the replica node based on the write request.

[0031] If the node status of the replica node is "upgrading", then the temporary replica node corresponding to the write request is determined through the first metadata information;

[0032] Write operations are performed on the temporary replica in the temporary replica node based on the write request;

[0033] Determine whether all replica nodes and temporary replica nodes have been written completely;

[0034] If all replica nodes and temporary replica nodes have been successfully written, a message indicating successful writing will be output.

[0035] On the other hand, the step of re-adding the node to be upgraded to the distributed storage system includes:

[0036] The temporary replicas are obtained from each of the non-upgrade nodes according to their flag bits to generate a temporary replica list;

[0037] The node to be upgraded that has completed the upgrade is designated as the upgraded node, and the upgraded node is controlled to synchronize data according to the temporary replica list;

[0038] The upgraded node sends a join request to the master node, and the master node verifies the join request.

[0039] When the verification is successful, the master node broadcasts information allowing the upgraded node to rejoin the distributed storage system.

[0040] On the other hand, after controlling the upgraded node to synchronize data according to the temporary replica list, the method further includes:

[0041] Mark the status of the data objects corresponding to each of the temporary copies as pending verification;

[0042] New input / output requests are monitored through the upgraded nodes;

[0043] When the upgraded node receives the new input / output request, it verifies whether the status of the data object corresponding to the new input / output request is pending verification.

[0044] If it is to be verified, then obtain the target metadata of the data object in the target non-upgrade node; wherein, the target non-upgrade node contains a complete copy of the data object corresponding to the new input / output request;

[0045] Determine whether the target metadata is the same as the data object in the upgraded node;

[0046] If the two are the same, the state of the data object in the upgraded node is changed to normal, and the corresponding new input / output request is processed through the upgraded node.

[0047] If the two are different, the upgraded node is controlled to obtain the complete data in the target non-upgraded node, and the corresponding new input / output request is processed through the upgraded node.

[0048] On the other hand, after broadcasting the information allowing the upgraded node to join via the master node, the following is also included:

[0049] When the non-upgraded node receives the information allowing the upgraded node to join, it changes the node status of the upgraded node to normal locally and deletes the data object of the temporary copy stored locally.

[0050] When the upgraded node receives the information allowing the upgraded node to join, it changes its node status to normal locally.

[0051] To address the aforementioned technical problems, the present invention also provides an online node upgrade device applied to a distributed storage system; the device includes:

[0052] A determination module is used to determine the node to be upgraded and the non-upgraded nodes among the nodes of the distributed storage system, and to record first metadata information in the non-upgraded nodes; wherein, the first metadata information is used to calculate the location of the temporary copy of the node to be upgraded during the upgrade process;

[0053] The update module is used to update the local configuration file of the node to be upgraded and stop the Internet Minicomputer System Interface service of the node to be upgraded.

[0054] The upgrade module is used to initiate the upgrade process for the node to be upgraded and to monitor the input and output requests received during the upgrade process.

[0055] The processing module is configured to process the input / output request according to the type of the input / output request and the first metadata information when the non-upgraded node receives the input / output request;

[0056] The add module is used to re-add the node to be upgraded to the distributed storage system when the upgrade is completed and the node restarts, so as to complete the upgrade.

[0057] To address the aforementioned technical problems, the present invention also provides an online node upgrade device, comprising:

[0058] Memory, used to store computer programs;

[0059] A processor is used to implement the steps of the above-described online node upgrade method when executing the computer program.

[0060] To address the aforementioned technical problems, the present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the above-described online node upgrade method.

[0061] The online node upgrade method provided by this invention is applied to a distributed storage system. Specifically, the method involves identifying nodes to be upgraded and non-upgraded nodes among the nodes in the distributed storage system, and recording first metadata information in the non-upgraded nodes. This first metadata information is used to calculate the location of the temporary copy of the node to be upgraded during the upgrade process. The method also includes updating the local configuration file of the node to be upgraded and stopping its Internet Minicomputer System Interface (IMSI) service. The upgrade process for the node to be upgraded is initiated, and input / output requests received during the upgrade process are monitored. When a non-upgraded node receives an input / output request, it processes the request according to the type of the request and the first metadata information. When the node to be upgraded completes the upgrade and restarts, it is rejoined to the distributed storage system to complete the upgrade. The beneficial effect of this invention is that, during online upgrades, the nodes to be upgraded and non-upgraded nodes are first identified, and the non-upgraded nodes record first metadata information used to calculate the location of the temporary copy of the node to be upgraded during the upgrade process. The local configuration file of the node to be upgraded is updated, and its IMSI service is stopped, thereby preventing the node to be upgraded from providing services during the upgrade process, ensuring that only the non-upgraded nodes provide the IMSI service during the upgrade process. During the upgrade process, when a non-upgraded node receives an IO request, it processes the request based on the request type and initial metadata information, ensuring normal IO request processing and preventing performance degradation during the upgrade of the node to be upgraded. Once the node to be upgraded completes its upgrade and restart, it is rejoined to the distributed storage system to complete the upgrade. The entire online upgrade process ensures normal IO request processing and avoids impacting upper-layer services.

[0062] Furthermore, in the specific implementation, the upgrade version number of the node to be upgraded is determined, and an upgrade request is sent to the master node of the distributed storage system. When the master node receives the upgrade request, it verifies the node to be upgraded based on its status, configuration information, and upgrade version number. If the verification fails, the upgrade process for the node to be upgraded is terminated. If the verification passes, the master node sends a broadcast message indicating that the upgrade verification has passed, thus realizing the legality verification of the upgrade for the node to be upgraded. When the node to be upgraded receives the broadcast message indicating that the upgrade verification has passed, it controls both the node to be upgraded and non-upgraded nodes to mark the node status of the node to be upgraded as "upgrading in progress," thus realizing the status marking of the node to be upgraded. By controlling the node to be upgraded to update its current version and the upgrade version, and by controlling the node to be upgraded to generate second metadata information corresponding to the first metadata information, the local configuration file of the upgrade node is updated. During the upgrade process of the node to be upgraded, the non-upgraded nodes handle IO requests. Specifically, when the IO request is a read request, it reads only from the non-temporary replica; when the IO request is a write request, it writes to the multi-replica node. If a replica node is an upgrade node, the node containing the temporary replica is calculated based on the first metadata information vinfo-upgrade and written. This achieves the handling of different types of IO requests during the upgrade process. By obtaining temporary replicas from each non-upgraded node according to the temporary replica flag, a temporary replica list is generated. The node to be upgraded that has completed the upgrade is designated as the upgraded node, and the upgraded node is controlled to synchronize data according to the temporary replica list. The upgraded node sends a join request to the master node, and the master node verifies the join request. When the verification is successful, the master node broadcasts the information that the upgraded node is allowed to join, thereby enabling the upgraded node to rejoin the distributed storage system and ensuring the normal operation of the upgraded node. When an upgraded node receives a new IO request, it verifies the state of the data object and compares the metadata of the data object in the non-ephemeral node with the data object in the upgraded node to determine the correctness of the upgraded node's data. Only when the upgraded node's data is confirmed to be correct is it allowed to process the new IO request, ensuring the correctness of IO request processing. When a non-upgraded node receives a message allowing an upgraded node to join, it can also change the upgraded node's node state to normal locally and delete the locally stored temporary copy of the data object, thereby saving storage space on the non-upgraded node. When an upgraded node receives a message allowing an upgraded node to join, it changes its own node state to normal locally, thus enabling the upgraded node to operate normally.

[0063] In addition, the present invention also provides a node online upgrade device, equipment and medium, with the same effect as above. Attached Figure Description

[0064] To more clearly illustrate the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0065] Figure 1 A flowchart of a node online upgrade method provided in an embodiment of the present invention;

[0066] Figure 2 This is a schematic diagram of an online node upgrade device provided in an embodiment of the present invention;

[0067] Figure 3 This is a schematic diagram of an online node upgrade device provided in an embodiment of the present invention. Detailed Implementation

[0068] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of the present invention.

[0069] The core of this invention is to provide a method, apparatus, device, and medium for online node upgrades, in order to solve the problem of decreased IO performance during online node upgrades in distributed storage systems, which in turn affects upper-layer services.

[0070] To enable those skilled in the art to better understand the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0071] Figure 1 A flowchart illustrating an online node upgrade method provided in an embodiment of the present invention. The method is applied to a distributed storage system; such as... Figure 1 As shown, the method includes:

[0072] S10: Determine the nodes to be upgraded and the nodes not to be upgraded among the nodes in the distributed storage system, and record the first metadata information in the nodes not to be upgraded.

[0073] The first metadata information is used to calculate the location of the temporary replica of the node to be upgraded during the upgrade process.

[0074] In practice, the first step is to identify the nodes to be upgraded and the nodes not to be upgraded within the distributed storage system. It can be understood that the nodes to be upgraded are those about to undergo the upgrade process, while the nodes not to be upgraded are those that will not undergo the upgrade process. Simultaneously, the first metadata information is recorded on the non-upgraded nodes.

[0075] It should be noted that the first metadata information is specifically the metadata information vinfo-upgrade, which is used to calculate the location of the temporary replica of the node to be upgraded during the upgrade process. While the node to be upgraded is in the upgrade process, IO requests are primarily processed through the temporary replica of the node to be upgraded.

[0076] S11: Update the local configuration file of the node to be upgraded and stop the Internet Minicomputer System Interface service of the node to be upgraded.

[0077] Furthermore, the node to be upgraded updates its local configuration file and stops its Internet Small Computer System Interface (iSCSI) service. iSCSI service on distributed nodes refers to the connection of storage devices to an IP network via the iSCSI protocol in a distributed storage system, making them accessible and usable by other computers on the network. iSCSI is a storage technology based on the Internet and the SCSI-3 protocol. It allows storage devices (such as hard drives or storage arrays) to be connected to an IP network, enabling them to be accessed and used by other computers on the network, thereby achieving data sharing and remote access.

[0078] In this embodiment, the iSCSI service of the node to be upgraded is switched off, and the iSCSI service is no longer provided, thereby avoiding the continued provision of services during the upgrade process. The specific process for updating the local configuration file of the node to be upgraded is not limited in this embodiment and will depend on the specific implementation.

[0079] S12: Initiate the upgrade process for the node to be upgraded and monitor the input / output requests received during the upgrade process.

[0080] After the strategy processing described above, the upgrade process for the node to be upgraded is initiated, specifically by updating the installation package online. Once the installation package update is complete, the node to be upgraded restarts its service, or a node restart achieves the same service restart effect. Furthermore, during the upgrade process, received IO requests need to be continuously monitored.

[0081] It is important to note that, in order for each node in the distributed cluster to clearly understand the upgrade status of the node to be upgraded, the node to be upgraded can also collect and wait for all nodes to complete marking the node status of the node to be upgraded before entering the installation package upgrade process. This ensures that all nodes have marked the node status of the node to be upgraded, avoiding data interaction with the node to be upgraded during the upgrade process.

[0082] S13: When a non-upgrade node receives an input / output request, it processes the input / output request according to the type of the input / output request and the first metadata information.

[0083] During the upgrade process, since the iSCSI service on the node to be upgraded is already disabled, the iSCSI service only exists on the non-upgraded nodes. Therefore, when a non-upgraded node receives an IO request, it needs to process the IO request based on the type of the IO request and the initial metadata information.

[0084] It should be noted that IO requests include write requests and read requests. In this embodiment, the processing of write and read requests for non-upgraded nodes is not restricted, and it depends on the specific implementation.

[0085] S14: When the node to be upgraded has completed the upgrade and restart, the node to be upgraded will be rejoined to the distributed storage system to complete the upgrade.

[0086] Finally, once the node to be upgraded has completed the upgrade and restarted, it is rejoined to the distributed storage system to complete the upgrade. The upgraded node then becomes the upgraded node and is used to handle subsequent received IO requests.

[0087] It should be noted that this embodiment does not restrict the specific process of re-adding the node to be upgraded to the distributed storage system, and it depends on the specific implementation situation.

[0088] In this embodiment, during online upgrades, the nodes to be upgraded and those not to be upgraded are first determined. Simultaneously, the non-upgraded nodes record first metadata information used to calculate the location of the temporary copy of the node to be upgraded during the upgrade process. The local configuration file of the node to be upgraded is updated, and its Internet Minicomputer System Interface (IMSI) service is stopped, thus preventing the node to be upgraded from providing services during the upgrade process. This ensures that only the non-upgraded nodes provide I / O interface services during the upgrade. During the upgrade process, when a non-upgraded node receives an IO request, it processes the IO request according to the IO request type and the first metadata information, ensuring normal IO request processing and preventing a decrease in IO performance during the upgrade of the node to be upgraded. When the node to be upgraded completes the upgrade and restarts, it is rejoined to the distributed storage system to complete the upgrade. The entire online upgrade process ensures normal IO request processing and avoids impacting upper-layer services.

[0089] Based on the above embodiments, in some embodiments, before recording the first metadata information in the non-upgraded nodes, after determining the nodes to be upgraded and the non-upgraded nodes among the nodes of the distributed storage system, the method further includes:

[0090] S101: Determine the upgrade version number of the node to be upgraded.

[0091] S102: Send an upgrade request to the master node of the distributed storage system through the node to be upgraded.

[0092] S103: When the master node receives an upgrade request, it verifies the node to be upgraded based on the node's status, configuration information, and upgrade version number.

[0093] S104: If the verification fails, terminate the upgrade process of the node to be upgraded.

[0094] S105: When the verification passes, a broadcast message indicating that the upgrade verification has passed is sent through the master node.

[0095] S106: When the node to be upgraded receives a broadcast message indicating that the upgrade verification has passed, it controls the node to be upgraded and the non-upgrade nodes to mark the node status of the node to be upgraded as "upgrading in progress" and proceed to the step of recording the first metadata information in the non-upgrade nodes.

[0096] In practice, after determining the node to be upgraded, the version number to be upgraded can be further determined, and an upgrade request can be sent to the master node of the distributed storage system through the node to be upgraded. The master node is generated through a specific strategy to ensure that only one master node exists at any given time; in this embodiment, there are no restrictions on the selection of the master node.

[0097] When the master node receives an upgrade request, it verifies the node to be upgraded based on its status, configuration information, and version number. This embodiment does not impose restrictions on the verification process. If the verification fails, the upgrade process for the node to be upgraded is terminated; if the verification passes, the master node sends a broadcast message indicating that the upgrade verification has succeeded.

[0098] After receiving the broadcast message indicating that the upgrade verification has passed, both the node to be upgraded and the non-upgrade nodes will mark the node status of the node to be upgraded as "upgrading in progress". After that, the step of recording the first metadata information in the non-upgrade nodes can be carried out.

[0099] In this embodiment, the upgrade version number of the node to be upgraded is determined, and an upgrade request is sent to the master node of the distributed storage system. When the master node receives the upgrade request, it verifies the node to be upgraded based on its status, configuration information, and upgrade version number. If the verification fails, the upgrade process of the node to be upgraded is terminated. If the verification passes, the master node sends a broadcast message indicating that the upgrade verification has passed, thus realizing the legality verification of the upgrade of the node to be upgraded. When the node to be upgraded receives the broadcast message indicating that the upgrade verification has passed, it controls the node to be upgraded and non-upgraded nodes to mark the node status of the node to be upgraded as "upgrading in progress," thus realizing the status marking of the node to be upgraded.

[0100] Based on the above embodiments, in some embodiments, updating the local configuration file of the node to be upgraded includes:

[0101] S111: Controls the update of the current version and the version to be upgraded of the node to be upgraded.

[0102] S112: Control the node to be upgraded to generate second metadata information corresponding to the first metadata information.

[0103] The second metadata information is used to determine the first metadata information.

[0104] In practice, the local configuration file of the node to be upgraded is updated to control the updating of the current version and the version to be upgraded. Simultaneously, the node to be upgraded is controlled to generate second metadata information corresponding to the first metadata information.

[0105] It is important to note that the second metadata information is specifically the metadata information epoch-upgrade, which is used to determine and construct the first metadata information, namely the metadata information vinfo-upgrade.

[0106] In this embodiment, by controlling the node to be upgraded to update its current version and the version to be upgraded, and by controlling the node to be upgraded to generate second metadata information corresponding to the first metadata information, the local configuration file of the upgrade node is updated.

[0107] Based on the above embodiments, in some embodiments, when the input / output request is a read request, the input / output request is processed according to the type of the input / output request and the first metadata information, including:

[0108] S131: Determine the replica node of the data object accessed by the read request.

[0109] S132: Read the replica node based on the read request.

[0110] Among them, the replica nodes are non-upgrade nodes.

[0111] Correspondingly, when the input / output request is a write request, the input / output request is processed according to the type of the input / output request and the first metadata information, including:

[0112] S133: Calculate the replica node where the replica of the data object accessed by the write request is located based on the first metadata information.

[0113] S134: Determine whether the replica node's node status is "Upgrading". If the replica node's node status is not "Upgrading", proceed to step S135; if the replica node's node status is "Upgrading", proceed to step S136.

[0114] S135: Perform write operations on replicas in the replica node based on write requests.

[0115] S136: Determine the temporary replica node corresponding to the write request through the first metadata information.

[0116] S137: Perform a write operation on the temporary replica in the temporary replica node based on the write request.

[0117] S138: Determine whether all replica nodes and temporary replica nodes have been written; if all replica nodes and temporary replica nodes have been written, proceed to step S139.

[0118] S139: Output a message indicating successful write.

[0119] In practice, IO requests include write requests and read requests. When a non-upgraded node receives a read request, it determines the replica node of the data object accessed by the read request, and further reads the replica node based on the read request to process the read request. It is understood that the replica node is the non-upgraded node.

[0120] When a non-upgrade node receives a write request, it calculates the replica node where the replica of the data object accessed by the write request resides based on the first metadata information, vinfo-upgrade. It then determines whether the replica node's node status is "upgrading". If the replica node's node status is not "upgrading", it performs a write operation on the replica in the replica node based on the write request. If the replica node's node status is "upgrading", it determines the temporary replica node corresponding to the write request using the first metadata information and performs a write operation on the temporary replica in the temporary replica node based on the write request.

[0121] It is important to note that a write operation is considered successful only when all replicas (including temporary replicas) have been written. Therefore, it is necessary to check whether all replica nodes and temporary replica nodes have been written. If all replica nodes and temporary replica nodes have been written, a write success message should be output; otherwise, wait until all replicas have been written before outputting the write success message.

[0122] In this embodiment, during the upgrade process of the node to be upgraded, the non-upgraded node processes the IO requests; specifically, when the IO request is a read request, it is read only from the non-temporary replica; when the IO request is a write request, it is written according to the multiple replica nodes; if there is a replica node that is an upgrade node, the node where the temporary replica is located is calculated based on the first metadata information vinfo-upgrade and written; thus, the processing of different types of IO requests is realized during the upgrade process.

[0123] Based on the above embodiments, in some embodiments, the node to be upgraded is re-added to the distributed storage system, including:

[0124] S141: Obtain temporary copies from each non-upgrade node according to the temporary copy flag to generate a temporary copy list.

[0125] S142: Designate the node to be upgraded as the upgraded node after the upgrade is completed, and control the upgraded node to synchronize data according to the temporary replica list.

[0126] S143: The upgraded node sends a join request to the master node, and the master node verifies the join request.

[0127] S144: When the verification is successful, the master node broadcasts a message allowing the upgraded node to rejoin the distributed storage system.

[0128] To rejoin the upgraded nodes to the distributed system, temporary replicas are retrieved from each non-upgraded node based on their flags to generate a temporary replica list. It's important to note that to prevent flag loss due to non-upgraded nodes encountering errors during the upgrade process, the corresponding flags are persisted to disk along with write I / O and loaded into memory upon service restart, ensuring consistency between data objects on disk and in memory.

[0129] Furthermore, the node awaiting upgrade is designated as the upgraded node, and the upgraded node is controlled to synchronize data based on the temporary replica list. It's important to note that during data synchronization, data is preferentially retrieved from the temporary replica because it writes incremental data—specifically, incremental data after the node awaiting upgrade has been marked—resulting in a smaller amount of synchronized data. If data recovery occurs in the cluster due to an anomaly of a non-upgraded node, the recovered data can only be obtained from non-temporary replica nodes (nodes with full replicas). In other words, the data in the temporary replica is only available to the upgrade node.

[0130] Once all temporary replicas have been restored, the upgraded node sends a join request to the master node. The master node verifies the join request, checking information such as version number and data status to determine if the node is allowed to join. If the verification is successful, the master node broadcasts permission for the upgraded node to rejoin the distributed storage system.

[0131] In this embodiment, a temporary replica list is generated by obtaining temporary replicas from each non-upgraded node according to the flag of the temporary replica; the node to be upgraded after completion is designated as the upgraded node, and the upgraded node is controlled to synchronize data according to the temporary replica list; the upgraded node sends a join request to the master node, and the master node verifies the join request; when the verification is successful, the master node broadcasts the information that the upgraded node is allowed to join, thereby enabling the upgraded node to rejoin the distributed storage system and ensuring the normal operation of the upgraded node.

[0132] Based on the above embodiments, in some embodiments, after controlling the upgraded nodes to synchronize data according to the temporary replica list, the method further includes:

[0133] S145: Mark the status of the data objects corresponding to each temporary copy as pending verification.

[0134] S146: Monitor new input / output requests through upgraded nodes.

[0135] S147: When an upgraded node receives a new input / output request, it verifies whether the status of the data object corresponding to the new input / output request is pending verification; if it is pending verification, proceed to step S148.

[0136] S148; Obtain the target metadata of the data object in the target non-upgrade node; wherein the target non-upgrade node contains a complete copy of the data object corresponding to the new input / output request.

[0137] S149: Determine whether the target metadata is the same as the data object in the upgraded node; if they are the same, proceed to step S150; if they are different, proceed to step S151.

[0138] S150: Change the state of the data objects in the upgraded node to normal, and process the corresponding new input / output requests through the upgraded node.

[0139] S151: Control the upgraded node to obtain complete data from the target non-upgraded node, and process the corresponding new input / output requests through the upgraded node.

[0140] In practice, to ensure the correctness of upgraded nodes in handling new IO requests, after the upgraded nodes synchronize data based on the temporary replica list, the status of the data objects corresponding to each temporary replica needs to be marked as pending verification. New IO requests are then monitored through the upgraded nodes.

[0141] When an upgraded node receives a new IO request, it verifies whether the status of the data object corresponding to the new IO request is pending verification. If it is not pending verification, the new IO request is processed directly. If it is pending verification, the target metadata of the data object in the target non-upgraded node is obtained. It should be noted that the target non-upgraded node contains a complete copy of the data object corresponding to the new IO request.

[0142] The system further determines whether the target metadata is identical to the data object in the upgraded node. If they are identical, the status of the data object in the upgraded node is changed to normal, and the corresponding new IO request is processed by the upgraded node. If they are different, the upgraded node is controlled to obtain the complete data from the target non-upgraded node, and the corresponding new IO request is processed by the upgraded node. This ensures the correctness of the upgraded node's handling of new IO requests.

[0143] In this embodiment, when an upgraded node receives a new IO request, it verifies the state of the data object and compares the metadata of the data object in the non-temporary node with the data object in the upgraded node to determine the correctness of the upgraded node's data. Only when the upgraded node's data is confirmed to be correct is it allowed to process the new IO request, thus ensuring the correctness of the IO request processing.

[0144] Based on the above embodiments, in some embodiments, after broadcasting information allowing upgraded nodes to join via the master node, the method further includes:

[0145] S152: When a non-upgraded node receives a message allowing an upgraded node to join, it changes the node status of the upgraded node to normal locally and deletes the data object of the temporary copy stored locally.

[0146] S153: When an upgraded node receives a message allowing other upgraded nodes to join, it changes its own node status to normal locally.

[0147] In practice, when a non-upgraded node receives a message allowing an upgraded node to join, it can change the node status of the upgraded node to normal locally and delete the data object of the temporary copy stored locally, thereby saving storage space for the non-upgraded node. When an upgraded node receives a message allowing an upgraded node to join, it changes its own node status to normal locally, thus enabling the upgraded node to operate normally.

[0148] In the above embodiments, the node online upgrade method has been described in detail. The present invention also provides embodiments of the node online upgrade device.

[0149] Figure 2 This is a schematic diagram of an online node upgrade device provided in an embodiment of the present invention. The device is applied to a distributed storage system; such as... Figure 2 As shown, the device includes:

[0150] The determination module 10 is used to determine the node to be upgraded and the non-upgraded nodes among the nodes of the distributed storage system, and to record the first metadata information in the non-upgraded nodes; wherein, the first metadata information is used to calculate the location of the temporary copy of the node to be upgraded in the upgrade process.

[0151] Update module 11 is used to update the local configuration file of the node to be upgraded and stop the Internet Minicomputer System Interface service of the node to be upgraded.

[0152] Upgrade module 12 is used to initiate the upgrade process for the node to be upgraded and to monitor the input and output requests received during the upgrade process.

[0153] The processing module 13 is used to process the input / output request according to the type of the input / output request and the first metadata information when the non-upgrade node receives the input / output request.

[0154] Add module 14 to re-add the node to be upgraded to the distributed storage system when the node to be upgraded has completed the upgrade and restarted, so as to complete the upgrade.

[0155] In some embodiments, it also includes:

[0156] The first determination submodule is used to determine the upgrade version number of the node to be upgraded;

[0157] The first sending submodule is used to send an upgrade request to the master node of the distributed storage system through the node to be upgraded.

[0158] The first verification submodule is used to verify the node to be upgraded based on its status, configuration information and version number when the master node receives an upgrade request.

[0159] The End submodule is used to terminate the upgrade process of the node to be upgraded when the verification fails.

[0160] The second sending submodule is used to send a broadcast message indicating that the upgrade verification has passed through the master node when the verification passes.

[0161] The first marking submodule is used to control the node to be upgraded and non-upgraded nodes to mark the node status of the node to be upgraded as "upgrading" when the node to be upgraded receives a broadcast message indicating that the upgrade verification has passed.

[0162] In some embodiments, the updating module 11 includes:

[0163] The first update submodule is used to control the update of the current version and the version to be upgraded of the node to be upgraded;

[0164] The first generation submodule is used to control the generation of second metadata information corresponding to the first metadata information by the node to be upgraded.

[0165] The second metadata information is used to determine the first metadata information.

[0166] In some embodiments, the processing module 13 includes:

[0167] The second determination submodule is used to determine the replica node of the data object accessed by the read request;

[0168] The first read submodule is used to read replica nodes based on read requests;

[0169] Among them, the replica nodes are non-upgrade nodes;

[0170] Correspondingly, processing module 13 includes:

[0171] The first calculation submodule is used to calculate the replica node where the replica of the data object accessed by the write request is located based on the first metadata information.

[0172] The first judgment submodule is used to determine whether the node status of the replica node is in the process of upgrading; if the node status of the replica node is not in the process of upgrading, the first write submodule is triggered; if the node status of the replica node is in the process of upgrading, the third determination submodule is triggered.

[0173] The first write submodule is used to perform write operations on replicas in replica nodes based on write requests;

[0174] The third determination submodule is used to determine the temporary replica node corresponding to the write request through the first metadata information;

[0175] The second write submodule is used to write temporary replicas in the temporary replica node based on write requests;

[0176] The second judgment submodule is used to determine whether all replica nodes and temporary replica nodes have been written. If all replica nodes and temporary replica nodes have been written, the first output submodule is triggered.

[0177] The first output submodule is used to output a message indicating successful write.

[0178] In some embodiments, module 14 is added, including:

[0179] The first acquisition submodule is used to acquire temporary copies from each non-upgrade node according to the temporary copy flag to generate a temporary copy list;

[0180] The data synchronization submodule is used to identify nodes that have completed the upgrade as upgraded nodes and control the upgraded nodes to synchronize data according to the temporary replica list.

[0181] The third sending submodule is used to send a join request to the master node through the upgraded node, and the master node verifies the join request;

[0182] The first addition submodule is used to broadcast information allowing the upgraded node to rejoin the distributed storage system via the master node when the verification is successful.

[0183] In some embodiments, it also includes:

[0184] The second marking submodule is used to mark the status of the data objects corresponding to each temporary copy as pending verification.

[0185] The monitoring submodule is used to monitor new input / output requests through upgraded nodes;

[0186] The first verification submodule is used to verify whether the status of the data object corresponding to the new input / output request is pending verification when the upgraded node receives a new input / output request; if it is pending verification, the second acquisition submodule is triggered.

[0187] The second acquisition submodule is used to acquire the target metadata of the data objects in the target non-upgrade node; wherein, the target non-upgrade node contains a complete copy of the data object corresponding to the new input / output request;

[0188] The third judgment submodule is used to determine whether the target metadata is the same as the data object in the upgraded node; if they are the same, the first change submodule is triggered; if they are different, the third acquisition submodule is triggered.

[0189] The first modification submodule is used to change the state of data objects in the upgraded node to normal and process the corresponding new input and output requests through the upgraded node.

[0190] The third acquisition submodule is used to control the upgraded node to acquire complete data from the target non-upgraded node and process the corresponding new input / output requests through the upgraded node.

[0191] In some embodiments, it also includes:

[0192] The second modification submodule is used to change the node status of the upgraded node to normal locally and delete the data object of the temporary copy stored locally when the non-upgraded node receives the information that allows the upgraded node to join.

[0193] The third modification submodule is used to change the node status to normal locally when the upgraded node receives a message allowing the upgraded node to join.

[0194] In this embodiment, the node online upgrade device includes a determination module, an update module, an upgrade module, a processing module, and a joining module. The node online upgrade device can implement all the steps of the above-described node online upgrade method during operation. During online upgrade, the node to be upgraded and the non-upgraded nodes are first determined. Simultaneously, the non-upgraded node records first metadata information used to calculate the location of the temporary copy of the node to be upgraded during the upgrade process. The local configuration file of the node to be upgraded is updated, and its Internet Minicomputer System Interface (IMSI) service is stopped, thereby preventing the node to be upgraded from providing services during the upgrade process, ensuring that only the non-upgraded node provides IMSI services during the upgrade. During the upgrade process, when the non-upgraded node receives an IO request, it processes the IO request according to the type of the IO request and the first metadata information, ensuring normal processing of the IO request and avoiding a decrease in IO performance during the upgrade of the node to be upgraded. When the node to be upgraded completes the upgrade and restarts, it is rejoined to the distributed storage system to complete the upgrade. The entire online upgrade process ensures normal processing of IO requests and avoids the impact of online upgrades on upper-layer services.

[0195] Furthermore, the present invention also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the above-described node online upgrade method.

[0196] Figure 3 This is a schematic diagram of an online node upgrade device provided in an embodiment of the present invention. Figure 3 As shown, the node online upgrade equipment includes:

[0197] Memory 20 is used to store computer programs.

[0198] The processor 21 is used to execute computer programs to implement the steps of the node online upgrade method mentioned in the above embodiments.

[0199] The node online upgrade device provided in this embodiment may include, but is not limited to, smartphones, tablets, laptops, or desktop computers.

[0200] The processor 21 may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor 21 may be implemented using at least one of the following hardware forms: Digital Signal Processor (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 21 may also include a main processor and a coprocessor. The main processor, also known as the Central Processing Unit (CPU), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 21 may integrate a Graphics Processing Unit (GPU), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, the processor 21 may also include an Artificial Intelligence (AI) processor, which handles computational operations related to machine learning.

[0201] The memory 20 may include one or more computer-readable storage media, which may be non-transitory. The memory 20 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In this embodiment, the memory 20 is used to store at least the following computer program 201, which, after being loaded and executed by the processor 21, is capable of implementing the relevant steps of the node online upgrade method disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 20 may also include an operating system 202 and data 203, and the storage method may be temporary or permanent storage. The operating system 202 may include Windows, Unix, Linux, etc. The data 203 may include, but is not limited to, the data involved in the node online upgrade method.

[0202] In some embodiments, the node online upgrade device may further include a display screen 22, an input / output interface 23, a communication interface 24, a power supply 25, and a communication bus 26.

[0203] Those skilled in the art will understand that Figure 3 The structure shown does not constitute a limitation on the node online upgrade device and may include more or fewer components than illustrated.

[0204] In this embodiment, the node online upgrade device includes a memory and a processor. The memory stores computer programs. The processor executes the computer programs to implement the steps of the node online upgrade method mentioned in the above embodiments. During online upgrade, the node to be upgraded and the non-upgraded nodes are first determined. Simultaneously, the non-upgraded node records first metadata information used to calculate the location of the temporary copy of the node to be upgraded during the upgrade process. The local configuration file of the node to be upgraded is updated, and its Internet Minicomputer System Interface (IMSI) service is stopped, thereby preventing the node to be upgraded from providing services during the upgrade process, ensuring that only the non-upgraded node provides IMSI services during the upgrade. During the upgrade process, when the non-upgraded node receives an IO request, it processes the IO request according to the type of the IO request and the first metadata information, ensuring normal processing of the IO request and avoiding a decrease in IO performance during the upgrade of the node to be upgraded. When the node to be upgraded completes the upgrade and restarts, it is rejoined to the distributed storage system to complete the upgrade. The entire online upgrade process ensures normal processing of IO requests and avoids the impact of online upgrades on upper-layer services.

[0205] Finally, the present invention also provides an embodiment corresponding to a computer-readable storage medium. The computer-readable storage medium stores a computer program, which, when executed by a processor, performs the steps described in the above method embodiments.

[0206] It is understood that if the methods in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and executes all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0207] In this embodiment, a computer program is stored on a computer-readable storage medium. When the computer program is executed by a processor, it implements the steps described in the above method embodiment. During online upgrades, the node to be upgraded and the non-upgraded nodes are first determined. Simultaneously, the non-upgraded node records first metadata information used to calculate the location of a temporary copy of the node to be upgraded during the upgrade process. The local configuration file of the node to be upgraded is updated, and its Internet Minicomputer System Interface (IMSI) service is stopped, thereby preventing the node to be upgraded from providing services during the upgrade process. This ensures that only the non-upgraded node provides the IMSI service during the upgrade. During the upgrade process, when the non-upgraded node receives an IO request, it processes the IO request according to the type of the IO request and the first metadata information, ensuring normal processing of the IO request and avoiding a decrease in IO performance during the upgrade of the node to be upgraded. When the node to be upgraded completes the upgrade and restarts, it is rejoined to the distributed storage system to complete the upgrade. The entire online upgrade process ensures normal processing of IO requests and avoids the impact of online upgrades on upper-layer services.

[0208] The present invention has provided a detailed description of a node online upgrade method, apparatus, device, and medium. The various embodiments in the specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section. It should be noted that those skilled in the art can make several improvements and modifications to the present invention without departing from its principles, and these improvements and modifications also fall within the protection scope of the present invention.

[0209] It should also be noted that, in this specification, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

Claims

1. A method for online node upgrades, characterized in that, Applied to distributed storage systems; the method includes: In the distributed storage system, nodes to be upgraded and non-upgraded nodes are identified, and first metadata information is recorded in the non-upgraded nodes; wherein, the first metadata information is used to calculate the location of a temporary copy of the node to be upgraded during the upgrade process; Update the local configuration file of the node to be upgraded and stop the Internet Minicomputer System Interface service of the node to be upgraded; Initiate the upgrade process for the node to be upgraded and monitor the input / output requests received during the upgrade process; When the non-upgraded node receives the input / output request, it processes the input / output request according to the type of the input / output request and the first metadata information; When the node to be upgraded completes the upgrade and restarts, the node to be upgraded is rejoined to the distributed storage system to complete the upgrade.

2. The node online upgrade method according to claim 1, characterized in that, Before recording the first metadata information in the non-upgraded node, after determining the node to be upgraded and the non-upgraded node among the nodes of the distributed storage system, the process further includes: Determine the version number to be upgraded for the node to be upgraded; The upgrade request is sent from the node to be upgraded to the master node of the distributed storage system. When the master node receives the upgrade request, it verifies the node to be upgraded based on the status, configuration information, and version number of the node to be upgraded. If the verification fails, the upgrade process for the node to be upgraded is terminated. When the verification passes, a broadcast message indicating that the upgrade verification has passed is sent through the master node; When the node to be upgraded receives a broadcast message indicating that the upgrade verification has passed, it controls the node to be upgraded and the non-upgraded node to mark the node status of the node to be upgraded as "upgrading in progress" and proceeds to the step of recording the first metadata information in the non-upgraded node.

3. The node online upgrade method according to claim 2, characterized in that, The process of updating the local configuration file of the node to be upgraded includes: Control the node to be upgraded to update its current version and the version to be upgraded; Control the node to be upgraded to generate second metadata information corresponding to the first metadata information; The second metadata information is used to determine the first metadata information.

4. The node online upgrade method according to claim 1, characterized in that, When the input / output request is a read request, the process of processing the input / output request according to the type of the input / output request and the first metadata information includes: Determine the replica node of the data object accessed by the read request; The replica node is read based on the read request; The replica node is a non-upgrade node; Correspondingly, when the input / output request is a write request, processing the input / output request according to the type of the input / output request and the first metadata information includes: Calculate the replica node where the copy of the data object accessed by the write request is located based on the first metadata information; Determine whether the node status of the replica node is "upgrading". If the node status of the replica node is not in the process of upgrading, then a write operation is performed on the replica in the replica node based on the write request. If the node status of the replica node is "upgrading", then the temporary replica node corresponding to the write request is determined through the first metadata information; Write operations are performed on the temporary replica in the temporary replica node based on the write request; Determine whether all replica nodes and temporary replica nodes have been written completely; If all replica nodes and temporary replica nodes have been successfully written, a message indicating successful writing will be output.

5. The node online upgrade method according to claim 1, characterized in that, The step of re-adding the node to be upgraded to the distributed storage system includes: The temporary replicas are obtained from each of the non-upgrade nodes according to their flag bits to generate a temporary replica list; The node to be upgraded that has completed the upgrade is designated as the upgraded node, and the upgraded node is controlled to synchronize data according to the temporary replica list; The upgraded node sends a join request to the master node, and the master node verifies the join request. When the verification is successful, the master node broadcasts information allowing the upgraded node to rejoin the distributed storage system.

6. The node online upgrade method according to claim 5, characterized in that, After controlling the upgraded node to synchronize data according to the temporary replica list, the method further includes: Mark the status of the data objects corresponding to each of the temporary copies as pending verification; New input / output requests are monitored through the upgraded nodes; When the upgraded node receives the new input / output request, it verifies whether the status of the data object corresponding to the new input / output request is pending verification. If it is to be verified, then obtain the target metadata of the data object in the target non-upgrade node; wherein, the target non-upgrade node contains a complete copy of the data object corresponding to the new input / output request; Determine whether the target metadata is the same as the data object in the upgraded node; If the two are the same, the state of the data object in the upgraded node is changed to normal, and the corresponding new input / output request is processed through the upgraded node. If the two are different, the upgraded node is controlled to obtain the complete data in the target non-upgraded node, and the corresponding new input / output request is processed through the upgraded node.

7. The node online upgrade method according to claim 6, characterized in that, Following the broadcast of permission for the upgraded node to join via the master node, the following is also included: When the non-upgraded node receives the information allowing the upgraded node to join, it changes the node status of the upgraded node to normal locally and deletes the data object of the temporary copy stored locally. When the upgraded node receives the information allowing the upgraded node to join, it changes its node status to normal locally.

8. A node online upgrade device, characterized in that, Applied to a distributed storage system; the device includes: A determination module is used to determine the node to be upgraded and the non-upgraded nodes among the nodes of the distributed storage system, and to record first metadata information in the non-upgraded nodes; wherein, the first metadata information is used to calculate the location of the temporary copy of the node to be upgraded during the upgrade process; The update module is used to update the local configuration file of the node to be upgraded and stop the Internet Minicomputer System Interface service of the node to be upgraded. The upgrade module is used to initiate the upgrade process for the node to be upgraded and to monitor the input and output requests received during the upgrade process. The processing module is configured to process the input / output request according to the type of the input / output request and the first metadata information when the non-upgraded node receives the input / output request; The add module is used to re-add the node to be upgraded to the distributed storage system when the upgrade is completed and the node restarts, so as to complete the upgrade.

9. A node online upgrade device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the node online upgrade method as described in any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the node online upgrade method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Online upgrading method and device, storage node and distributed cluster

    CN114428627A

  • Temporary storage copy management method, system and equipment and storage medium

    CN115167782A