A data processing method and device, equipment, and medium

By receiving response information from the storage cluster and updating the liveness status of the dual-active storage cluster, the resource overhead and waiting time issues during network failures in the dual-active storage cluster are resolved, thus achieving efficient storage system management.

CN119781682BActive Publication Date: 2025-12-12INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411865266.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-17
Publication Date
2025-12-12
Estimated Expiration
2044-12-17

AI Technical Summary

Technical Problem

In a dual-active storage cluster, heartbeat connections during network failures can lead to high resource overhead and extended client wait times.

Method used

Instead of establishing a heartbeat connection, the system updates the liveness status by receiving response information from the storage cluster. It uses the response information to identify the target storage cluster and stop its service, and combines the status monitoring and configuration information of the arbitration server to quickly update the liveness status.

Benefits of technology

It effectively reduces network resource overhead, shortens client waiting time, and improves the operating efficiency of the storage system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119781682B_ABST
    Figure CN119781682B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a data processing method and device, equipment and medium, comprising: receiving a write data request of a client for a first storage cluster, and sending the write data request to the first storage cluster and a second storage cluster; receiving response information returned by the first storage cluster and the second storage cluster for the write data request, wherein the response information is used to indicate whether the write data is successful; and updating a survival state of a dual-active storage cluster according to the response information. Through the embodiments of the present application, the resource overhead of the storage system and the waiting time of the client can be effectively reduced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, and in particular, to a data processing method and device, equipment and medium. BACKGROUND

[0002] With the advancement of the digital process of various industries, data has gradually become the core of enterprise operation, and distributed storage technology has gradually become one of the main research directions of the industry due to its advantages of high availability and reliability.

[0003] The double-active (Active-Active) storage cluster is a resource-saving disaster recovery solution in a distributed storage system, and its implementation mode is to let the primary storage cluster and the backup storage cluster both bear the data business of the user. At this time, the two storage clusters are backup to each other and are real-time backup, and at the same time provide data read and write services to the user. Since the two storage clusters are in working state and backup to each other, not only the resource utilization is improved, but also the business continuity is guaranteed, which can meet the requirements of business stability and business continuity of the user.

[0004] In the related art, the survival state of the double-active storage cluster needs to be adjusted by the heartbeat connection established between the storage clusters in the double-active storage cluster, so that the double-active storage cluster meets the actual business requirements. However, when a network failure occurs, a large amount of heartbeat information in the heartbeat connection between the storage clusters will cause a great resource overhead, and also prolong the waiting time of the client. SUMMARY

[0005] In view of the above problems, a data processing method and device, equipment and medium are provided to overcome the above problems or at least partially solve the above problems, comprising:

[0006] A data processing method applied to a storage system, the storage system comprising a first storage cluster and a second storage cluster, the first storage cluster and the second storage cluster constituting a double-active storage cluster, the method comprising:

[0007] receiving a write data request of a client for the first storage cluster, and sending the write data request to the first storage cluster and the second storage cluster;

[0008] receiving response information returned by the first storage cluster and the second storage cluster for the write data request; wherein the response information is used to indicate whether the write data is successful;

[0009] updating the survival state of the double-active storage cluster according to the response information.

[0010] Optionally, the updating the alive state of the dual-active storage cluster according to the response information comprises:

[0011] determining a target storage cluster from the first storage cluster and the second storage cluster according to the response information, and stopping service of the target storage cluster;

[0012] updating the alive state of the target storage cluster to a non-alive state.

[0013] Optionally, the storage system further comprises an arbitration server, and the first storage cluster and the second storage cluster respectively establish a state monitoring connection with the arbitration server, and the determining a target storage cluster from the first storage cluster and the second storage cluster according to the response information, and stopping service of the target storage cluster comprises:

[0014] determining whether an arbitration service provided by the arbitration server is normal through the state monitoring connection;

[0015] if the arbitration service is normal, determining the target storage cluster from the first storage cluster and the second storage cluster according to the response information, and notifying the first storage cluster to stop service, and / or notifying the arbitration server to stop service of the second storage cluster;

[0016] if the arbitration service is abnormal, obtaining preset configuration information;

[0017] determining the target storage cluster from the first storage cluster and the second storage cluster according to the configuration information and the response information, and notifying the target storage cluster to stop service.

[0018] Optionally, the determining the target storage cluster from the first storage cluster and the second storage cluster according to the response information, and notifying the first storage cluster to stop service, and / or notifying the arbitration server to stop service of the second storage cluster if the arbitration service is normal comprises:

[0019] if the response information indicates that the first storage cluster and the second storage cluster both fail to write data, determining the first storage cluster and the second storage cluster as the target storage cluster;

[0020] notifying the first storage cluster to stop service, and notifying the arbitration server to stop service of the second storage cluster;

[0021] if the response information indicates that the first storage cluster fails to write data and the second storage cluster succeeds in writing data, determining the first storage cluster as the target storage cluster, and notifying the first storage cluster to stop service;

[0022] if the response information indicates that the first storage cluster writes data successfully and the second storage cluster fails to write data, determining whether the network connection between the first storage cluster and the second storage cluster is normal;

[0023] if the network connection is abnormal, determining the second storage cluster as the target storage cluster, and notifying the arbitration server to stop the service of the second storage cluster.

[0024] Optionally, the determining the target storage cluster in the first storage cluster and the second storage cluster according to the configuration information and the response information comprises:

[0025] if the response information indicates that the first storage cluster and the second storage cluster fail to write data, determining the first storage cluster and the second storage cluster as the target storage cluster;

[0026] if the response information indicates that the first storage cluster fails to write data and the second storage cluster writes data successfully, determining the first storage cluster as the target storage cluster;

[0027] if the response information indicates that the first storage cluster writes data successfully and the second storage cluster fails to write data, determining whether the first storage cluster is a preferred end through the configuration information;

[0028] if the first storage cluster is the preferred end, determining the second storage cluster as the target storage cluster;

[0029] if the first storage cluster is not the preferred end, determining the first storage cluster and the second storage cluster as the target storage cluster.

[0030] Optionally, the state monitoring connection is a heartbeat connection of a plurality of nodes in the at least two storage clusters and the arbitration server, and the determining whether the service provided by the arbitration server is normal through the state monitoring connection comprises:

[0031] obtaining a judgment result of whether the arbitration service is normal judged by the plurality of nodes through the heartbeat connection;

[0032] determining a number of target nodes in which the arbitration service is judged to be abnormal according to the judgment result;

[0033] if the number of target nodes is greater than or equal to a preset number, determining that the arbitration service is abnormal;

[0034] if the number of target nodes is less than the preset number, determining that the arbitration service is normal, and stopping the service of the target nodes.

[0035] Optionally, after determining whether the network connection between the first storage cluster and the second storage cluster is normal, further comprising:

[0036] If the network connection is normal, retrying sending the write data request to the second storage cluster;

[0037] When the number of retries reaches a preset number, determining the second storage cluster as the target storage cluster, and notifying the arbitration server to stop service of the second storage cluster.

[0038] A data processing apparatus applied to a storage system, the storage system comprising a first storage cluster and a second storage cluster, the first storage cluster and the second storage cluster constituting a dual-active storage cluster, the apparatus comprising:

[0039] A write data processing module, configured to receive a write data request of a client for the first storage cluster, and send the write data request to the first storage cluster and the second storage cluster;

[0040] A response information receiving module, configured to receive response information returned by the first storage cluster and the second storage cluster for the write data request; wherein the response information is used to indicate whether the write data is successful;

[0041] A survival state updating module, configured to update a survival state of the dual-active storage cluster according to the response information.

[0042] An electronic device comprising a processor, a memory, and a computer program stored on the memory and capable of running on the processor, the computer program being executed by the processor to implement the data processing method as described above.

[0043] A computer readable storage medium, the computer readable storage medium storing a computer program, the computer program being executed by a processor to implement the data processing method as described above.

[0044] The embodiment of the present application has the following advantages: by receiving a write data request of a client for a first storage cluster, and sending the write data request to the first storage cluster and a second storage cluster, receiving response information returned by the first storage cluster and the second storage cluster for the write data request, wherein the response information is used to indicate whether the write data is successful, and updating a survival state of the dual-active storage cluster according to the response information, the survival state of the dual-active storage cluster is updated without establishing a heartbeat connection through the first storage cluster and the second storage cluster, but is updated through the response information, effectively reducing network resource overhead and shortening the waiting time of the client, and improving the operation efficiency of the storage system. BRIEF DESCRIPTION OF DRAWINGS

[0045] In order to more clearly illustrate the technical solutions of the present application, the drawings needed to be used in the description of the present application will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and all other drawings obtained by those skilled in the art without creative labor on the basis of these drawings also belong to the protection scope of the present application.

[0046] Figure 1 is a step flow chart of a data processing method provided by an embodiment of the present application;

[0047] Figure 2 is a schematic diagram of a client requesting data processing from a storage cluster provided by an embodiment of the present application;

[0048] Figure 3 is a structural block diagram of a data processing device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0049] In order to make the above-mentioned purposes, features and advantages of the present application more apparent and easy to understand, the present application will be further described in detail below with reference to the drawings and specific embodiments. Obviously, the described embodiments are only some embodiments of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor also belong to the protection scope of the present application.

[0050] Referring to Figure 1 , a step flow chart of a data processing method provided by an embodiment of the present application is shown, which is applied to a storage system including a first storage cluster and a second storage cluster, the first storage cluster and the second storage cluster constitute a dual-active storage cluster, and the data processing method can specifically include the following steps:

[0051] Step 101, receiving a write data request of a client for the first storage cluster, and sending the write data request to the first storage cluster and the second storage cluster;

[0052] In the embodiment, the first storage cluster and the second storage cluster constitute a dual-active storage cluster, that is, the first storage cluster and the second storage cluster are both in a live state, and can simultaneously provide basic data services such as data reading and writing to the client, or data services requiring high authority such as data updating and deleting. Moreover, the data between the first storage cluster and the second storage cluster is in a synchronous state, when the first storage cluster writes data in response to the write data request of the client, the second storage cluster will also perform the same data writing processing through a replication network (that is, a network specially networked for the function of data synchronization).

[0053] Step 102, receiving response information returned by the first storage cluster and the second storage cluster for the write data request; wherein the response information is used to indicate whether the write data is successful;

[0054] In step 102, by receiving the response information, it can be judged whether the first storage cluster and the second storage cluster write data successfully, and then it is determined whether the survival state of the dual-active storage cluster needs to be changed.

[0055] Exemplarily, as shown in the figure, Figure 2 When the client A initiates a write data request to the service end of the cluster A, the storage system will send the write data request to the cluster A, the service end of the cluster A will write data to the storage backend of the cluster A, and send the write data request to the service end of the cluster B through the replication network, so as to synchronously write data to the storage backend of the cluster B (the service end and the storage backend of the cluster B in the figure have been omitted). Figure 2

[0056] If the cluster A, the cluster B and the replication network function between them are normal, the storage backend of the cluster A writes data successfully, sends feedback information to the service end of the cluster A; the storage backend of the cluster B writes data successfully, sends feedback information to the service end of the cluster B, and then the service end of the cluster B sends feedback information to the service end of the cluster A, at this time the storage system can receive the response information of the cluster A and the cluster B for the write data request through the service end of the cluster A, to determine whether the write data is successful.

[0057] Then, the service end of the cluster A returns the write success information to the client, and the data write process ends.

[0058] Step 103, updating the survival state of the dual-active storage cluster according to the response information.

[0059] The survival state is used to represent whether the storage cluster in the dual-active storage cluster is alive, if alive, the storage cluster continues to provide data read and write services, if not alive, the storage cluster stops providing data read and write services, and the client can no longer access.

[0060] Since the write data request is initiated by the client to the first storage cluster, the first storage cluster can be regarded as the local end, and the second storage cluster can be regarded as the opposite end, and the updated survival state can be: local single active (the first storage cluster is alive, and the second storage cluster is not alive), opposite single active (the first storage cluster is not alive, and the second storage cluster is alive), and deactivation (the first storage cluster and the second storage cluster are not alive).

[0061] ​In the embodiment, the survival state of the dual-active storage cluster is quickly updated according to the different indication of the response information that whether the writing data is successful, that is, the feedback of whether the actual service is successful, without the need to establish a heartbeat connection between the first storage cluster and the second storage cluster, and to detect whether the opposite end (that is, the second storage cluster) can normally provide services to update the survival state of the dual-active storage cluster, thereby saving system resource overhead and shortening the waiting time of the client.

[0062] In some embodiments of the present application, step 103 comprises:

[0063] determining a target storage cluster from the first storage cluster and the second storage cluster according to the response information, and stopping the service of the target storage cluster;

[0064] updating the survival state of the target storage cluster to a non-survival state.

[0065] In the embodiment, the target storage cluster refers to a storage cluster in the dual-active storage cluster that is determined to be unable to continue to provide services, and needs to stop its service and update its survival state to a non-survival state, so as to update the survival state of the dual-active storage cluster, so that the client can understand the survival state of the dual-active storage cluster (such as single-active, deactivation, etc.) when accessing any storage cluster in the dual-active storage cluster next time, so as to avoid initiating a request to a non-survival storage cluster and affecting normal services.

[0066] In some embodiments of the present application, the storage system further comprises an arbitration server, and the first storage cluster and the second storage cluster each establish a state monitoring connection with the arbitration server, and the determination of the target storage cluster from the first storage cluster and the second storage cluster according to the response information, and the stopping of the service of the target storage cluster, comprises:

[0067] determining whether the arbitration service provided by the arbitration server is normal through the state monitoring connection;

[0068] if the arbitration service is normal, determining the target storage cluster from the first storage cluster and the second storage cluster according to the response information, and notifying the first storage cluster to stop the service, and / or notifying the arbitration server to stop the service of the second storage cluster;

[0069] if the arbitration service is abnormal, obtaining preset configuration information;

[0070] determining the target storage cluster from the first storage cluster and the second storage cluster according to the configuration information and the response information, and notifying the target storage cluster to stop the service.

[0071] The arbitration server can be a single server node or a cluster of multiple server nodes. The arbitration server plays the role of a decision maker in the distributed storage system, and ensures that multiple server nodes in the system provide arbitration services when there is a disagreement to make a consistent decision.

[0072] The state monitoring connection refers to a connection established for monitoring the state of the arbitration server, which can monitor whether the arbitration server is online, whether the arbitration service is normal, etc.

[0073] In the embodiment, when the arbitration service is normal, after determining the target storage cluster in the first storage cluster and the second storage cluster according to the response information, if the target storage cluster includes the opposite end (i.e., the second storage system), the arbitration server is notified to stop the service of the opposite end. In this way, when the second storage cluster also receives data requests of other clients and needs to stop the service of the first storage in some cases (i.e., at this time, the second storage cluster is regarded as the local end, and the first storage cluster is regarded as the opposite end), the arbitration server can make arbitration on the service of the end to be stopped.

[0074] In actual applications, for the first notification that the arbitration server receives that the first storage cluster regards the second storage cluster as the opposite end and needs to stop the service of the second storage cluster, and the second notification that the second storage cluster regards the first storage cluster as the opposite end and needs to stop the service of the first storage cluster, the arbitration winner can be determined according to the time stamps of the first notification and the second notification, for example, if the time stamp of the first notification is greater than the time stamp of the second notification, it is determined that the first storage cluster wins the arbitration, and finally it is determined to stop the service of the second storage cluster, which further speeds up the update of the survival state of the dual-active storage cluster and shortens the waiting time of the client.

[0075] When the arbitration service is abnormal, the target storage cluster that needs to stop the service is determined according to the response information and the preset configuration information, and the target storage cluster is notified to stop the service. For example, the configuration information can define related configuration items of different target storage clusters according to different response information; or when the first storage cluster and the second storage cluster are simultaneously regarded as the opposite end that needs to stop the service by the opposite end, the arbitration winner is determined by default, which plays a certain role of the arbitration server.

[0076] In the embodiment, the survival state of the dual-active storage cluster can be quickly and flexibly updated only through the state monitoring connection between the storage cluster and the arbitration server and the configuration information, which effectively saves the network resource overhead and the networking cost.

[0077] In some embodiments of the present application, if the arbitration service is normal, the target storage cluster is determined according to the response information in the first storage cluster and the second storage cluster, and the first storage cluster is notified to stop service, and / or the arbitration server is notified to stop the service of the second storage cluster, comprising:

[0078] If the response information indicates that the first storage cluster and the second storage cluster both fail to write data, the first storage cluster and the second storage cluster are determined as the target storage cluster.

[0079] The first storage cluster is notified to stop service, and the arbitration server is notified to stop the service of the second storage cluster.

[0080] If the response information indicates that the first storage cluster fails to write data and the second storage cluster succeeds in writing data, the first storage cluster is determined as the target storage cluster, and the first storage cluster is notified to stop service.

[0081] If the response information indicates that the first storage cluster succeeds in writing data and the second storage cluster fails to write data, it is determined whether the network connection between the first storage cluster and the second storage cluster is normal.

[0082] If the network connection is abnormal, the second storage cluster is determined as the target storage cluster, and the arbitration server is notified to stop the service of the second storage cluster.

[0083] In some examples, as shown in Figure 2 In some examples, as shown in

[0084] If the data is written to the storage backend of cluster A fails, but is successfully written to the storage backend of cluster B (opposite end), cluster A is the target storage cluster, and cluster A is notified to stop service, and the survival state of the dual-active storage cluster is updated to single-active of the opposite end.

[0085] If the data is written to the storage backend of cluster A fails, but is also failed to write to the storage backend of cluster B, cluster A and cluster B are the target storage clusters, cluster A is notified to stop service, the arbitration server is notified to stop the data service of cluster B, and the survival state of the dual-active storage cluster is updated to inactivation; the client is returned a response of write data failure.

[0086] If the data is successfully written to the storage backend of cluster A but fails to be synchronously written to the storage backend of cluster B, it is determined whether the network connection between cluster A and cluster B is normal, for example, each node of cluster A is notified to establish a heartbeat connection with each node of cluster B and send heartbeat information, and whether the network connection between cluster A and cluster B is abnormal is determined according to the reply of the heartbeat information by cluster B.

[0087] If it is determined that the network connection is abnormal, for example, when the number of cluster A nodes that receive abnormal replies exceeds half of the total number of cluster A nodes, it can be determined that the network connection is abnormal, at which time cluster B confirms the target storage cluster, notifies the arbitration server to stop the service of cluster B, and updates the survival state of the dual-active storage cluster to single-active at the local end.

[0088] In the embodiment, under the condition that the arbitration server is normal, the service of the opposite end is stopped through the arbitration server, which can effectively avoid system conflicts and further speed up the update of the survival state of the dual-active storage system.

[0089] In some embodiments of the application, after determining whether the network connection between the first storage cluster and the second storage cluster is normal, the method further comprises:

[0090] If the network connection is normal, retry sending the write data request to the second storage cluster;

[0091] When the number of retries reaches a preset number, the second storage cluster is determined as the target storage cluster, and the arbitration server is notified to stop the service of the second storage cluster.

[0092] In some examples, as shown in Figure 2 When it is determined that the network connection is normal, for example, when the number of cluster A nodes that receive abnormal replies of heartbeat information does not exceed half of the total number of cluster A nodes, it is determined that the network connection has not occurred abnormally, the write data request is retried to be sent to cluster B until cluster B returns response information indicating successful write data; if the number of retries reaches a preset number (for example, 3 times) and cluster B still returns response information indicating write data failure, cluster B is determined as the target storage cluster, the arbitration server is notified to stop the data service of cluster B, and the survival state of the dual-active storage cluster is updated to single-active at the local end.

[0093] In some embodiments of the application, the target storage cluster is determined in the first storage cluster and the second storage cluster according to the configuration information and the response information, comprising:

[0094] If the response information indicates that the first storage cluster and the second storage cluster fail to write data, the first storage cluster and the second storage cluster are determined as the target storage cluster;

[0095] If the response information indicates that the first storage cluster failed to write data and the second storage cluster successfully wrote data, the first storage cluster is identified as the target storage cluster.

[0096] If the response information indicates that the first storage cluster successfully wrote data and the second storage cluster failed to write data, the configuration information is used to determine whether the first storage cluster is the preferred endpoint.

[0097] If the first storage cluster is the preferred end, the second storage cluster is determined as the target storage cluster;

[0098] If the first storage cluster is not the preferred endpoint, then the first storage cluster and the second storage cluster are determined as the target storage cluster.

[0099] In this embodiment, the preferred end refers to a storage cluster that can provide services independently and with priority, and when it is simultaneously regarded by the other party as the other party requesting to stop data services, the arbitration wins by default.

[0100] In some examples, such as Figure 2 As shown, in the storage cluster, cluster A and cluster B form a dual-active storage cluster, and it is confirmed that the arbitration service provided by the arbitration server is abnormal. When a client writes data to cluster A (denoted as the local end), the storage system updates the liveness status of the storage cluster in static mode, as follows:

[0101] If writing data to the storage backend of cluster A fails, but writing it synchronously to the storage backend of cluster B (referred to as the peer) succeeds, and cluster A is the target storage cluster, then cluster A is notified to stop service, and the survival status of the dual-active storage cluster is updated to the peer single-active.

[0102] If writing data to the storage backend of cluster A fails, and synchronous writing to the storage backend of cluster B also fails, and clusters A and B are the target storage clusters, then clusters A and B are notified to stop service, and the liveness status of the dual-active storage cluster is updated to dead; a response indicating that writing data failed is returned to the client.

[0103] If data is successfully written to the storage backend of cluster A, but fails to be written synchronously to the storage backend of cluster B, the configuration information determines whether cluster A is the preferred end. If cluster A is the preferred end, then cluster B is the target storage cluster. Cluster B is notified to stop service, and the survival status of the dual-active storage cluster is updated to local single-active.

[0104] If cluster A is not the preferred endpoint, then cluster A and cluster B are the target storage clusters. Notify cluster A and cluster B to stop service, update the liveness status of the dual-active storage cluster to deactivated, and return a response indicating that writing data failed to the client.

[0105] In the embodiment, in the case that the arbitration service provided by the arbitration server is abnormal, the preferred end is quickly determined by the static configuration method, without sending heartbeat connection and the like to the opposite end storage cluster to confirm the state thereof, thereby effectively improving the timeliness and flexibility of the survival state adjustment of the dual-active storage cluster.

[0106] In some embodiments of the application, the state monitoring connection is a heartbeat connection of the plurality of nodes in the at least two storage clusters and the arbitration server, and the determination of whether the service provided by the arbitration server is normal through the state monitoring connection comprises:

[0107] obtaining a judgment result of whether the arbitration service is normal determined by the plurality of nodes through the heartbeat connection;

[0108] determining the number of target nodes in which the arbitration service is judged to be abnormal according to the judgment result;

[0109] if the number of target nodes is greater than or equal to a preset number, determining that the arbitration service is abnormal;

[0110] if the number of target nodes is less than the preset number, determining that the arbitration service is normal, and stopping the service of the target node.

[0111] In the embodiment, the plurality of nodes and the arbitration server establish a heartbeat connection, and each node sends heartbeat information to the arbitration server, judges whether the arbitration service provided by the arbitration server is normal according to the reply of the arbitration server to the heartbeat information, and obtains a judgment result. The storage system finally determines whether the arbitration service is abnormal by judging the number of target nodes in which the arbitration service is judged to be abnormal.

[0112] In some examples, the plurality of nodes receive the reply of the arbitration server to the heartbeat information and the corresponding judgment has the following cases:

[0113] (1) receiving a normal reply of the arbitration server, setting the heartbeat timeout number heart_count to 0, and waiting for the next heartbeat information;

[0114] (2) receiving an abnormal reply of the arbitration server, judging that the arbitration service is abnormal, and reporting the judgment result of the alarm "abnormal arbitration service";

[0115] (3) receiving a reply timeout of the arbitration server, i.e. not receiving the heartbeat reply of the arbitration service within a preset time (such as 5 seconds), increasing the value of the heartbeat timeout number heart_count by 1; when heart_count is greater than a certain value (i.e. the total timeout time reaches a certain value, such as 30 seconds), the heartbeat reply of the arbitration server is still not received, and it is judged that the arbitration server is abnormal.

[0116] When the number of target nodes is greater than or equal to the preset number, such as half of the total number of all nodes, it is determined that the arbitration service provided by the arbitration server is abnormal.

[0117] Further, if the number of target nodes is less than the preset number, it is determined that the arbitration service is normal, and the service of the target node is stopped.

[0118] In the embodiment, whether the arbitration service is normal is finally determined through the "voting system" of the number of target nodes, which can improve the fault tolerance of arbitration service judgment, and when the total number of target nodes that determine that the arbitration service is abnormal is less than the preset number, it is finally determined that the arbitration service is normal. At this time, the nodes that determine that the arbitration server is abnormal may be unable to connect with the arbitration server due to network connection problems, and in order to avoid blocking the data service of the client due to the failure of the arbitration server, the data service of these nodes needs to be stopped.

[0119] In actual application, when more than a preset number of target nodes receive normal heartbeat replies from the arbitration server, for example, more than 2 / 3 of the total number of all nodes receive normal heartbeat replies from the arbitration server, it can be determined that the arbitration service has returned to normal.

[0120] The embodiment of the application has the following advantages: receiving a write data request of a client for a first storage cluster, and sending the write data request to the first storage cluster and a second storage cluster, receiving response information returned by the first storage cluster and the second storage cluster for the write data request, wherein the response information is used to indicate whether the write data is successful, updating the survival state of the dual-active storage cluster according to the response information, without establishing a heartbeat connection through the first storage cluster and the second storage cluster to update the survival state of the dual-active storage cluster, but updating the survival state of the dual-active storage cluster through the response information, effectively reducing network resource overhead and shortening the waiting time of the client, and improving the running efficiency of the storage system.

[0121] The embodiment of the application has the following advantages: receiving a write data request of a client for a first storage cluster, and sending the write data request to the first storage cluster and a second storage cluster, receiving response information returned by the first storage cluster and the second storage cluster for the write data request, wherein the response information is used to indicate whether the write data is successful, updating the survival state of the dual-active storage cluster according to the response information, without establishing a heartbeat connection through the first storage cluster and the second storage cluster to update the survival state of the dual-active storage cluster, but updating the survival state of the dual-active storage cluster through the response information, effectively reducing network resource overhead and shortening the waiting time of the client, and improving the running efficiency of the storage system.

[0122] Reference Figure 3, shows a structural schematic diagram of a data processing device provided by an embodiment of the application, applied to a storage system, the storage system comprising a first storage cluster and a second storage cluster, the first storage cluster and the second storage cluster constituting a dual-active storage cluster, and the data processing device can specifically comprise the following modules:

[0123] The write data processing module 301 is configured to receive a write data request of a client for the first storage cluster and send the write data request to the first storage cluster and the second storage cluster.

[0124] The response information receiving module 302 is configured to receive response information returned by the first storage cluster and the second storage cluster for the write data request, wherein the response information is used to indicate whether the write data is successful.

[0125] The survival state updating module 303 is configured to update a survival state of the dual-active storage cluster according to the response information.

[0126] In some embodiments of the application, the updating of the survival state of the dual-active storage cluster according to the response information comprises:

[0127] determining a target storage cluster in the first storage cluster and the second storage cluster according to the response information and stopping service of the target storage cluster;

[0128] updating the survival state of the target storage cluster to a non-survival state.

[0129] In some embodiments of the application, the storage system further comprises an arbitration server, the first storage cluster and the second storage cluster respectively establishing a state monitoring connection with the arbitration server, and the survival state updating module 303 comprises:

[0130] The arbitration service confirmation submodule is configured to determine whether an arbitration service provided by the arbitration server is normal through the state monitoring connection.

[0131] The arbitration mode processing submodule is configured to, if the arbitration service is normal, determine a target storage cluster in the first storage cluster and the second storage cluster according to the response information, notify the first storage cluster to stop service, and / or notify the arbitration server to stop service of the second storage cluster.

[0132] The configuration information obtaining submodule is configured to, if the arbitration service is abnormal, obtain preset configuration information.

[0133] The static mode processing submodule is configured to determine the target storage cluster from the first storage cluster and the second storage cluster according to the configuration information and the response information, and notify the target storage cluster to stop service.

[0134] In some embodiments of the present application, the arbitration mode processing submodule is further configured to:

[0135] If the response information indicates that the first storage cluster and the second storage cluster both fail to write data, the first storage cluster and the second storage cluster are determined as the target storage cluster.

[0136] The first storage cluster is notified to stop service, and the arbitration server is notified to stop service of the second storage cluster.

[0137] If the response information indicates that the first storage cluster fails to write data and the second storage cluster succeeds in writing data, the first storage cluster is determined as the target storage cluster, and the first storage cluster is notified to stop service.

[0138] If the response information indicates that the first storage cluster succeeds in writing data and the second storage cluster fails to write data, it is determined whether the network connection between the first storage cluster and the second storage cluster is normal.

[0139] If the network connection is abnormal, the second storage cluster is determined as the target storage cluster, and the arbitration server is notified to stop service of the second storage cluster.

[0140] In some embodiments of the present application, the static mode processing submodule is further configured to:

[0141] If the response information indicates that the first storage cluster and the second storage cluster both fail to write data, the first storage cluster and the second storage cluster are determined as the target storage cluster.

[0142] If the response information indicates that the first storage cluster fails to write data and the second storage cluster succeeds in writing data, the first storage cluster is determined as the target storage cluster.

[0143] If the response information indicates that the first storage cluster succeeds in writing data and the second storage cluster fails to write data, it is determined whether the first storage cluster is a preferred end through the configuration information.

[0144] If the first storage cluster is a preferred end, the second storage cluster is determined as the target storage cluster.

[0145] If the first storage cluster is not the preferred end, the first storage cluster and the second storage cluster are determined as the target storage cluster.

[0146] In some embodiments of the present application, the state monitoring connection is a heartbeat connection of a plurality of nodes in the at least two storage clusters and the arbitration server, and the arbitration service confirmation submodule is further configured to:

[0147] Obtain a determination result of whether the arbitration service is normal determined by the plurality of nodes through the heartbeat connection;

[0148] According to the determination result, determine a number of target nodes that determine the arbitration service as abnormal;

[0149] If the number of target nodes is greater than or equal to a preset number, it is determined that the arbitration service is abnormal;

[0150] If the number of target nodes is less than the preset number, it is determined that the arbitration service is normal, and the service of the target node is stopped.

[0151] In some embodiments of the present application, the arbitration mode processing submodule is further configured to:

[0152] If the network connection is normal, retry sending the write data request to the second storage cluster;

[0153] When the number of retries reaches a preset number, the second storage cluster is determined as the target storage cluster, and the arbitration server is notified to stop the service of the second storage cluster.

[0154] Some embodiments of the present application also provide an electronic device, which can include a processor, a memory, and a computer program stored on the memory and capable of running on the processor, and the computer program is executed by the processor to implement the data processing method as above.

[0155] Some embodiments of the present application also provide a computer readable storage medium, which stores a computer program, and the computer program is executed by the processor to implement the data processing method as above.

[0156] Some embodiments of the present application also provide a computer program product, which includes a computer program, and the computer program is executed by the processor to implement the data processing method as above.

[0157] For the device embodiment, it is basically similar to the method embodiment, so the description is relatively simple, and the related parts refer to the part of the method embodiment.

[0158] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of countries and regions, and provide corresponding operation portal for user to choose authorization or refusal.

[0159] Each of the embodiments in the present specification is described in a progressive manner, and each embodiment focuses on the difference from other embodiments, and the same and similar parts between the embodiments can be referred to each other.

[0160] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, device or computer program product. Therefore, the embodiments of the present application can be in the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the embodiments of the present application can be in the form of a computer program product implemented on one or more computer usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer usable program code.

[0161] The embodiments of the present application are described with reference to flowcharts and / or block diagrams according to the method, terminal device (system) and computer program product of the embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, and the combination of the flows and / or blocks in the flowchart and / or block diagram can be realized by computer program instructions. These computer program instructions can be provided to a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing terminal device to produce a machine, so that the instructions executed by the computer or other programmable data processing terminal device produce a device for implementing the functions specified in the flowchart and / or block diagram. Figure 1 The functions specified in one or more flows and / or blocks Figure 1 The device for implementing the functions specified in one or more flows and / or blocks.

[0162] These computer program instructions can also be stored in a computer readable storage medium which can guide the computer or other programmable data processing terminal device to work in a specific way, so that the instructions stored in the computer readable storage medium produce a product including instruction device, which implements the functions specified in the flowchart and / or block diagram. Figure 1 The functions specified in one or more flows and / or blocks Figure 1 The device for implementing the functions specified in one or more flows and / or blocks.

[0163] These computer program instructions can also be loaded into a computer or other programmable data processing terminal device, so that a series of operational steps are performed on the computer or other programmable terminal device to generate a computer-implemented process, so that the instructions executed on the computer or other programmable terminal device provide a process for implementing the functions specified in the flowchart Figure 1 one flowchart or multiple flowcharts and / or blocks Figure 1 one flowchart or multiple flowcharts and / or blocks

[0164] Although the preferred embodiments of the present application have been described, those skilled in the art will be able to make additional changes and modifications to these embodiments once they grasp the fundamental inventive concept. Therefore, the appended claims are intended to cover all changes and modifications falling within the scope of the embodiments of the present application.

[0165] Finally, it should be noted that, in this document, the terms "first" and "second" and the like are used merely to distinguish one entity or action from another, without necessarily requiring or implying any such actual relationship or order between such entities or actions. Moreover, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or terminal device. Without further limitation, an element defined by the statement "comprising a" does not exclude the presence of additional identical elements in the process, method, article, or terminal device including the element.

[0166] The above provides a detailed description of the data processing method and device, equipment, medium, and the principle and implementation manner of the present application are described in the text by applying specific examples; the above example is only used to help understand the method of the present application and its core idea; meanwhile, for those skilled in the art, according to the idea of the present application, the specific implementation manner and application range will have changes; in conclusion, the content of the specification should not be understood as a limitation of the present application.

Claims

1. A data processing method, characterized in that, Applied to a storage system, the storage system including a first storage cluster and a second storage cluster, the first storage cluster and the second storage cluster constituting a dual-active storage cluster, the method includes: Receive a write data request from a client for a first storage cluster, and send the write data request to the first storage cluster and the second storage cluster; Receive response information returned by the first storage cluster and the second storage cluster in response to the write data request; wherein, the response information is used to indicate whether the write data was successful; Update the liveness status of the dual-active storage cluster based on the response information; The step of updating the liveness status of the active-active storage cluster based on the response information includes: Based on the response information, the target storage cluster is determined in the first storage cluster and the second storage cluster, and the service of the target storage cluster is stopped; Update the liveness status of the target storage cluster to a non-liveness status; The storage system further includes an arbitration server. The first storage cluster and the second storage cluster respectively establish state monitoring connections with the arbitration server. The step of determining the target storage cluster among the first and second storage clusters based on the response information and stopping the service of the target storage cluster includes: The status monitoring connection is used to determine whether the arbitration service provided by the arbitration server is functioning properly. If the arbitration service is normal, the target storage cluster is determined in the first storage cluster and the second storage cluster according to the response information, and the first storage cluster is notified to stop the service, and / or the arbitration server is notified to stop the service of the second storage cluster. If the arbitration service malfunctions, retrieve the preset configuration information; Based on the configuration information and the response information, the target storage cluster is determined in the first storage cluster and the second storage cluster, and the target storage cluster is notified to stop service.

2. The method according to claim 1, characterized in that, If the arbitration service is normal, the target storage cluster is determined among the first and second storage clusters based on the response information, and the first storage cluster is notified to stop its service, and / or the arbitration server is notified to stop its service in the second storage cluster, including: If the response information indicates that both the first storage cluster and the second storage cluster have failed to write data, then the first storage cluster and the second storage cluster are identified as the target storage cluster; The first storage cluster is notified to stop service, and the arbitration server is notified to stop service of the second storage cluster. If the response information indicates that the first storage cluster failed to write data and the second storage cluster successfully wrote data, the first storage cluster is identified as the target storage cluster, and the first storage cluster is notified to stop service. If the response information indicates that the first storage cluster successfully wrote data and the second storage cluster failed to write data, determine whether the network connection between the first storage cluster and the second storage cluster is normal; If the network connection is abnormal, the second storage cluster will be identified as the target storage cluster, and the arbitration server will be notified to stop the service of the second storage cluster.

3. The method according to claim 1, characterized in that, Determining the target storage cluster in the first storage cluster and the second storage cluster based on the configuration information and the response information includes: If the response information indicates that the first storage cluster and the second storage cluster failed to write data, the first storage cluster and the second storage cluster are identified as the target storage cluster; If the response information indicates that the first storage cluster failed to write data and the second storage cluster successfully wrote data, the first storage cluster is identified as the target storage cluster. If the response information indicates that the first storage cluster successfully wrote data and the second storage cluster failed to write data, the configuration information is used to determine whether the first storage cluster is the preferred endpoint. If the first storage cluster is the preferred end, the second storage cluster is determined as the target storage cluster; If the first storage cluster is not the preferred endpoint, then the first storage cluster and the second storage cluster are determined as the target storage cluster.

4. The method according to claim 1, characterized in that, The status monitoring connection is a heartbeat connection between multiple nodes in at least two storage clusters and the arbitration server. Determining whether the service provided by the arbitration server is normal through the status monitoring connection includes: Obtain the judgment results of the multiple nodes in determining whether the arbitration service is normal through the heartbeat connection; Based on the judgment results, determine the number of target nodes that will be judged as abnormal in the arbitration service; If the number of target nodes is greater than or equal to the preset number, the arbitration service is determined to be abnormal. If the number of target nodes is less than the preset number, the arbitration service is determined to be normal, and the service of the target nodes is stopped.

5. The method according to claim 2, characterized in that, After determining whether the network connection between the first storage cluster and the second storage cluster is normal, the method further includes: If the network connection is normal, retry sending the write data request to the second storage cluster; When the number of retries reaches the preset number, the second storage cluster is identified as the target storage cluster, and the arbitration server is notified to stop the service of the second storage cluster.

6. A data processing apparatus, characterized in that, The device is applied to a storage system, which includes a first storage cluster and a second storage cluster, wherein the first storage cluster and the second storage cluster constitute a dual-active storage cluster. The device includes: The write data processing module is used to receive write data requests from clients for the first storage cluster and send the write data requests to the first storage cluster and the second storage cluster. A response information receiving module is used to receive response information returned by the first storage cluster and the second storage cluster in response to the write data request; wherein, the response information is used to indicate whether the write data was successful; The liveness status update module is used to determine the target storage cluster in the first storage cluster and the second storage cluster based on the response information, and to stop the service of the target storage cluster; and to update the liveness status of the target storage cluster to a non-liveness status. The storage system further includes an arbitration server, and the first storage cluster and the second storage cluster are respectively connected to the arbitration server for status monitoring. The liveness status update module includes: The arbitration service confirmation submodule is used to determine whether the arbitration service provided by the arbitration server is normal through the status monitoring connection. The arbitration mode processing submodule is used to determine the target storage cluster in the first storage cluster and the second storage cluster according to the response information if the arbitration service is normal, and notify the first storage cluster to stop the service, and / or notify the arbitration server to stop the service of the second storage cluster. The configuration information acquisition submodule is used to acquire preset configuration information if the arbitration service is abnormal. The static mode processing submodule is used to determine the target storage cluster in the first storage cluster and the second storage cluster based on the configuration information and the response information, and to notify the target storage cluster to stop service.

7. An electronic device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the data processing method as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, which, when executed by a processor, implements the data processing method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Storage active-active and test system and method

    CN114416501A