False death state recognition method and device, equipment, storage medium and program product

By first obtaining the client's environment detection results in the distributed storage system and then judging the service detection results of the first service, the problem of inaccurate identification of the fake death state caused by unreasonable timeout settings in the prior art is solved, and the accuracy of identification is improved and stability of storage systems.

CN119415303APending Publication Date: 2025-02-11DAWNING INFORMATION IND (BEIJING) CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411580415.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-06
Publication Date
2025-02-11

Smart Images

  • Figure CN119415303A_ABST
    Figure CN119415303A_ABST
Patent Text Reader

Abstract

The invention relates to a false death state recognition method and device, equipment, a storage medium and a program product. The method is applied to a client in a distributed storage system, the distributed storage system comprises the client and a service node, services are deployed on the service node, and the method comprises the steps that firstly, when it is detected that a target task is abnormal, an environment detection result of the client within preset time is obtained, and if the environment detection result of the client is normal, the client is started; if yes, obtaining a service detection result of the first service corresponding to the target task, and further determining that the first service is in a false death state if the service detection result is abnormal. By adopting the method, the problem of unreasonable overtime setting can be avoided, and the accuracy of false death state judgment is higher.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of distributed storage technology, and in particular to a method, device, equipment, storage medium and program product for identifying a suspended animation state. Background Art

[0002] Distributed storage systems are usually composed of multiple clients and cluster nodes. In scenarios such as supercomputing and meteorology, a large number of nodes are often required to participate simultaneously when a large number of computing tasks are executed. Therefore, if any client, cluster service node, or service module in the cluster fails, the user's business may be affected. Therefore, how to quickly and accurately identify pseudo-death situations, and the ability to isolate or recover pseudo-dead clients or service nodes directly affects the stability of the storage system.

[0003] At present, a timeout period is generally set. If a node does not respond within the timeout period, the node is determined to be in a suspended state. However, if the timeout period is set too large, the efficiency of business execution will be affected. If the timeout period is set too small, there will be a risk of frequent false alarms. Therefore, the identification of suspended state is inaccurate. Summary of the invention

[0004] Based on this, it is necessary to provide a method, device, equipment, storage medium and program product for identifying a suspended animation state, which can improve the accuracy of suspended animation state identification, in order to solve the above technical problems.

[0005] In a first aspect, the present application provides a method for identifying a suspended animation state, which is applied to a client in a distributed storage system, wherein the distributed storage system includes a client and a service node, and a service is deployed on the service node. The method includes:

[0006] When an abnormality is detected in the target task, the client's environmental detection results within the preset time are obtained;

[0007] If the environment detection result of the client is normal, obtain the service detection result of the first service corresponding to the target task;

[0008] If the service detection result is abnormal, it is determined that the first service is in a suspended state.

[0009] In the above embodiment, the client is applied to the distributed storage system, and the distributed storage system includes a client and a service node, and a service is deployed on the service node. First, when the target task is detected to be abnormal, the environmental detection result of the client within the preset time is obtained. If the environmental detection result of the client is normal, the service detection result of the first service corresponding to the target task is obtained, and it is further determined that if there is an abnormality in the service detection result, it is determined that the first service is in a suspended state. In this way, when the target task on the client is abnormal, first determine whether the client is abnormal through the environmental detection result of the client. If the client itself is not abnormal, determine whether the first service is suspended through the service detection result of the first service. In this way, the problem of unreasonable timeout setting is avoided, and the accuracy of suspended state judgment is higher.

[0010] In one embodiment, the target task is a metadata task, the first service is a target metadata service for executing the metadata task, the target metadata service includes a plurality of service submodules, and if the environmental detection result of the client is normal, obtaining the service detection result of the first service corresponding to the target task includes:

[0011] Obtain submodule detection results of each service submodule;

[0012] If the submodule detection result is normal, the task detection result of the target metadata service is obtained;

[0013] If the task detection result is abnormal, it is determined that the service detection result is abnormal.

[0014] In the above embodiment, the service detection result of the metadata service is determined by acquiring the submodule detection result and the task detection result of the metadata service, so that it can be determined whether the metadata service is in a suspended state according to the service detection result.

[0015] In one embodiment, the target task is a data task, and the first service is a target data service for executing the data task. If the environment detection result of the client is normal, obtaining the service detection result of the first service corresponding to the target task includes:

[0016] Obtain anomaly detection results of the target data service;

[0017] If the anomaly detection result is abnormal, it is determined that the service detection result is abnormal.

[0018] In the above embodiment, the abnormality detection result of the data service is obtained to determine the service detection result of the data service, so that it can be determined whether the data service is in a suspended state according to the service detection result.

[0019] In one of the embodiments, after determining that the first service is in a suspended state, the method further includes:

[0020] The abnormal information is reported to the management node, and the abnormal information is used for the management node to isolate the first service and then restart the first service, and notify the second service to take over the tasks in the first service.

[0021] In the above embodiment, the first service in a suspended state is isolated and restored by the management node, and the tasks in the first service are taken over by other services, so that the stuck tasks can be quickly restored.

[0022] In one embodiment, the method further comprises:

[0023] After receiving the lock recall message sent by the distributed lock server, the lock cancellation process is triggered;

[0024] If the lock cancellation process fails, obtain the client's dog feeding status;

[0025] If there is a dog feeding exception in the client, it is determined that the client is in a suspended state, and an isolation mark is set in the recall response message. The isolation mark is used for the distributed lock server to isolate the client.

[0026] In the above embodiment, when the client cannot release the lock of the file, the abnormal state of the client itself is obtained. If there is an abnormality, an isolation mark is set in the recall response message, and the distributed lock server isolates the client, which can effectively identify the client's pseudo-death problem. By setting a mark in the recall response message, it is convenient for the server to quickly identify the pseudo-death client.

[0027] In one embodiment, the method further comprises:

[0028] If there is no dog feeding anomaly on the client, the storage space detection result is obtained;

[0029] If the storage space detection result is abnormal, a non-isolation flag is set in the recall response message. The non-isolation flag is used for the distributed lock server to continue sending recall lock messages and not to isolate the client when the recall lock message sending reaches the maximum threshold;

[0030] If the storage space detection result shows that there is no abnormality, no mark is set in the recall response message. The recall response message is used to instruct the distributed lock server to continue sending recall lock messages and isolate the client when the recall lock message sending reaches the maximum threshold.

[0031] In the above embodiment, when the client cannot release the lock of the file, the abnormal state of the client itself is obtained. If there is an abnormality, an isolation mark is set in the recall response message, and the distributed lock server isolates the client. If there is no abnormality in the client itself, check whether there is an error of insufficient metadata disk or data disk space in the recent period. If so, the cannot be isolated mark is set, and the distributed lock does not mark the client, thereby preventing the client from being judged to be in a suspended state due to non-self-problems and being mistakenly isolated.

[0032] In a second aspect, the present application further provides a suspended state recognition device, which is applied to a client in a distributed storage system, wherein the distributed storage system includes a client and a service node, and a service is deployed on the service node. The device includes:

[0033] The first acquisition module is used to obtain the environmental detection result of the client within a preset time when an abnormality of the target task is detected;

[0034] A second acquisition module is used to acquire a service detection result of the first service corresponding to the target task if the environment detection result of the client is normal;

[0035] The first determination module is used to determine that the first service is in a suspended state if there is an abnormality in the service detection result.

[0036] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method for identifying a suspended animation state described in any one of the first aspects above is implemented.

[0037] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the method for identifying a suspended animation state described in any one of the first aspects above is implemented.

[0038] In a fifth aspect, the present application further provides a computer program product, including a computer program, which, when executed by a processor, implements any of the suspended animation state recognition methods described in the first aspect above.

[0039] The above-mentioned suspended animation state identification method, device, equipment, storage medium and program product are applied to the client in the distributed storage system, and the distributed storage system includes a client and a service node, and a service is deployed on the service node. First, when the target task is detected to be abnormal, the environmental detection result of the client within the preset time is obtained. If the environmental detection result of the client is normal, the service detection result of the first service corresponding to the target task is obtained, and it is further determined that if the service detection result is abnormal, it is determined that the first service is in a suspended animation state. In this way, when the target task on the client is abnormal, first determine whether the client is abnormal through the environmental detection result of the client. If the client itself is not abnormal, determine whether the first service is suspended through the service detection result of the first service. In this way, the problem of unreasonable timeout setting is avoided, and the accuracy of suspended animation state judgment is higher. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0041] FIG1 is a diagram showing an application environment of a method for identifying a suspended animation state in one embodiment;

[0042] FIG2 is a schematic flow chart of a method for identifying a suspended animation state in one embodiment;

[0043] FIG3 is a flow chart of a service detection step of a metadata service in a method for identifying a suspended animation state in one embodiment;

[0044] FIG4 is a flow chart of interaction when a metadata task is abnormal in a method for identifying a suspended animation state according to another embodiment;

[0045] FIG5 is a flow chart of a service detection step of a data service in a suspended state identification method according to an embodiment;

[0046] FIG6 is a flow chart of interaction when a data task is abnormal in a method for identifying a suspended animation state according to another embodiment;

[0047] FIG. 7 is a flow chart of a suspended state detection step of a client in a suspended state identification method according to an embodiment;

[0048] FIG8 is a flow chart of an abnormal release lock in a method for identifying a suspended state according to another embodiment;

[0049] FIG9 is a structural block diagram of a suspended animation state recognition device in one embodiment;

[0050] FIG. 10 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0051] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0052] At present, a timeout is generally set. If a node does not respond after the timeout, the node is determined to be in a suspended state. However, this method will affect the efficiency of business execution if the timeout is set too large, and there will be a risk of frequent false alarms if the timeout is set too small. The communication time of a message includes the network overhead plus the time it takes for the node to process the message. The communication time of network messages is affected by business pressure and the size of the distributed storage system cluster. The time it takes for the node to process business is also affected by business pressure, disk pressure, disk capacity and other factors. Therefore, it is inaccurate to identify the suspended state only through the timeout.

[0053] In view of this, the present application provides a method for identifying a suspended animation state. When a target task on a client is abnormal, the method first determines whether the client is abnormal through the environmental detection result of the client. If the client itself is not abnormal, the method determines whether the first service is suspended through the service detection result of the first service. In this way, the problem of unreasonable timeout setting is avoided, and the accuracy of suspended animation state judgment is higher.

[0054] The suspended state recognition method provided in the embodiment of the present application can be applied in the application environment shown in FIG. 1. Among them, the client 102, the service node 104, the management node 106 and the distributed lock server 108 can communicate through the network. There can be multiple service nodes 104 in the distributed storage system, and metadata services or data services can be deployed on each service node 104 to provide metadata services or data services for tasks on the client 102. Among them, the client 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. Head-mounted devices can be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. The service node 104, the management node 106 and the distributed lock server 108 can be independent physical servers, or they can be server clusters or distributed systems composed of multiple physical servers, or they can be cloud servers that provide cloud computing services.

[0055] In an exemplary embodiment, as shown in FIG2 , a method for identifying a suspended animation state is provided, and the method is applied to the client in FIG1 as an example for explanation, and includes the following steps 201 to 203. Among them:

[0056] Step 201, when a target task anomaly is detected, obtain the environmental detection result of the client within a preset time.

[0057] Among them, the target task is a task performed by the user on the client, such as writing data to a file or setting file attributes. When an abnormality occurs in the target task, such as when the target task is stuck during execution and has not been completed for a long time, it may be that the client has an abnormality, or it may be that the service that provides services for the target task has an abnormality. Therefore, in order to determine whether the client has a pseudo-death abnormality or the service has a pseudo-death abnormality, when the target task is detected to be abnormal, first, the environmental detection results of the client within a preset time period are obtained to determine whether the client itself has an abnormality. Optionally, the preset time period can be set by the user, and the environmental detection results within 60 seconds are usually obtained. The environmental detection can include regularly recording abnormal events such as log writing abnormalities, insufficient memory, and continuous high CPU load, and saving records in the recent period of time, and determining the environmental detection results based on the records. For example, if the number of times a certain abnormal event occurs within 60 seconds exceeds a preset threshold, the environmental detection result is determined to be abnormal.

[0058] Step 202: If the environmental detection result of the client is normal, the service detection result of the first service corresponding to the target task is obtained.

[0059] Optionally, if the environmental detection result of the client is normal, that is, the abnormal events recorded by the environmental detection within the preset time period do not exceed the preset threshold, which means that there is no abnormality in the client itself, then the service detection result of the first service providing the target task is obtained to further determine whether there is an abnormality in the first service. Optionally, the service detection result of the first service may include the environmental detection result of the first service and the detection result of the abnormality detection of the task execution of the first service.

[0060] If the client's environmental detection result is abnormal, it means that there is an abnormality in the client itself, such as insufficient memory on the client itself, and there may be a pseudo-death phenomenon. The client will not perform further processing and wait for the target task to be completed.

[0061] Step 203: If there is an abnormality in the service detection result, it is determined that the first service is in a suspended state.

[0062] Among them, if there is an abnormality in the service detection result, that is, there is an abnormality in the first service, then it is determined that the first service is in a suspended state, which affects the operation of the target business. Optionally, the client can report the abnormality of the first service to the management node, and the management node will isolate the first service. At the same time, the management node can select other services to take over the tasks in the first service, thereby ensuring the normal operation of the target business.

[0063] Optionally, if there is no abnormality in the service detection result, it is determined that the first service is normal. At this time, the client does not process and continues to wait for the target task to be completed.

[0064] The above-mentioned suspended animation state identification method, device, equipment, storage medium and program product are applied to the client in the distributed storage system, and the distributed storage system includes a client and a service node, and a service is deployed on the service node. First, when the target task is detected to be abnormal, the environmental detection result of the client within the preset time is obtained. If the environmental detection result of the client is normal, the service detection result of the first service corresponding to the target task is obtained, and it is further determined that if the service detection result is abnormal, it is determined that the first service is in a suspended animation state. In this way, when the target task on the client is abnormal, first determine whether the client is abnormal through the environmental detection result of the client. If the client itself is not abnormal, determine whether the first service is suspended through the service detection result of the first service. In this way, the problem of unreasonable timeout setting is avoided, and the accuracy of suspended animation state judgment is higher.

[0065] Optionally, after determining that the first service is in a suspended state, the method further includes: reporting abnormal information to the management node, the abnormal information being used for the management node to isolate the first service and then restart the first service, and to notify the second service to take over tasks in the first service.

[0066] After the client determines that the first service is in a suspended state, the client reports abnormal information to the management node. The abnormal information may include the identifier of the first service in a suspended state. After receiving the abnormal information, the management node isolates the first service and restarts the first service, and at the same time notifies the second service to take over the tasks in the first service, so that the second service continues to provide services for the target tasks in the client and ensures that the target tasks are processed. Optionally, if the service detection result is normal after the first service is restarted, it will take over the target task again.

[0067] In the above embodiment, the first service in a suspended state is isolated and restored by the management node, and the tasks in the first service are taken over by other services, so that the stuck tasks can be quickly restored.

[0068] In an embodiment of the present application, if the target task is a metadata task, the first service is a target metadata service for executing the metadata task, and the target metadata service includes multiple service submodules. The above step 202 is shown in FIG. 3 and includes:

[0069] Step 301, obtaining submodule detection results of each service submodule.

[0070] Optionally, after determining that the client's own environmental test results are normal, the client sends a self-test message to the target metadata service. After receiving the self-test message, the target metadata service performs a test on each service sub-module and then sends the sub-module test results to the client.

[0071] Optionally, the submodule detection results of each service submodule that the target metadata service depends on may include at least one of the environment detection result, read-write cache detection result, journal writing detection result, isolated state detection result, disk selection detection result and distributed lock detection result of the target metadata service. Among them, the environment detection of the target metadata service is consistent with the environment detection method of the above-mentioned client. The detection process of other submodules generally records a certain time period, such as when the number of times such anomalies occur within 60 seconds reaches a preset threshold, the submodule detection is considered to be abnormal. For example, when the preset threshold is 5, if there are 6 read-write cache no space exceptions within 60 seconds, the read-write cache detection result is determined to be abnormal.

[0072] Step 302: If the submodule detection result is normal, the task detection result of the target metadata service is obtained.

[0073] If the detection results of the above submodules are all normal, the task detection results of the target metadata service are further obtained, which may include the task processing detection results between the target metadata service and other metadata services and the task detection results processed by the target metadata service itself. Optionally, the task processing detection between the target metadata service and other metadata services and the task detection process processed by the target metadata service itself can also record the number of processing anomalies within a certain time period, such as 60 seconds, and when the number reaches a preset threshold, the detection result detection is considered abnormal.

[0074] Optionally, if there is an exception in the sub-module detection result, it means that the sub-module on which the target metadata service depends is abnormal. The target metadata service does not necessarily have an exception, so the client does not perform other processing and continues to wait for the target task to be completed.

[0075] Step 303: If the task detection result is abnormal, it is determined that the service detection result is abnormal.

[0076] Among them, if the task detection result of the target metadata service is abnormal, that is, the target metadata service itself is abnormal, then it is determined that the service detection result is abnormal, and a service detection result abnormal message is returned to the client. The client needs to perform further processing, such as reporting abnormal information to the management node as mentioned above, so that the target task can be quickly restored. Optionally, if there is no abnormality in the task detection result, it is determined that there is no abnormality in the service detection result. At this time, the client does not process it and waits for the task to be completed.

[0077] Optionally, as shown in FIG4, it is a process for determining whether the metadata service 1 corresponding to the metadata task is in a suspended state when the target task of the client is a metadata task in the above embodiment. When it is detected that the metadata task is stuck, the environment detection result of the client is first obtained. If the environment detection result is normal, the detection result of the submodule of the metadata service 1 is determined by actively obtaining the detection result from the metadata service 1. If the submodule detection result is normal, the task detection result of the metadata service 1 is continued to be obtained. If there is an abnormality in the task detection result, it is determined that the metadata service 1 is in a suspended state.

[0078] In the above embodiment, the service detection result of the metadata service is determined by acquiring the submodule detection result and the task detection result of the metadata service, so that it can be determined whether the metadata service is in a suspended state according to the service detection result.

[0079] In an embodiment of the present application, if the target task is a data task, and the first service is a target data service for executing the data task, the steps of step 202 may be as shown in FIG. 5, including:

[0080] Step 501: Obtain anomaly detection results of a target data service.

[0081] Optionally, after determining that the client's own environmental detection result is normal, the client sends a self-test message to the target data service. After receiving the self-test message, the target data service performs anomaly detection and then sends the anomaly detection result to the client. Optionally, the anomaly detection result may include at least one of the environmental detection result of the target data service, the task execution time detection result, the dog feeding state detection result, the isolated state detection result and the local disk service detection result. Among them, the environmental detection method of the target data service is the same as the environmental detection method of the above-mentioned client, and the other detection processes are to record a certain time period, such as 60 seconds. When the number of times the detection item appears abnormally reaches a preset threshold, the detection result detection is considered to be abnormal. For example, the task execution time detection is to detect whether there is an abnormality in the data service internal task execution time for a long time, the dog feeding state detection is to detect whether there is an abnormality in feeding the dog, the isolated state detection is to detect whether there is an abnormality in the isolated detection task execution time for a period of time, and the local disk service detection is to detect whether there is an abnormality in the local disk service.

[0082] Step 502: If the abnormality detection result is abnormal, it is determined that the service detection result is abnormal.

[0083] If the above anomaly detection result of the target data service is abnormal, it is determined that the service detection result is abnormal, and a service detection result abnormal message is returned to the client. The client needs to perform further processing, such as reporting the abnormal information to the management node as mentioned above, so that the target task can be quickly restored. Optionally, if the anomaly detection result is not abnormal, it is determined that the service detection result is not abnormal. At this time, the client does not process it and waits for the task to be completed.

[0084] Optionally, as shown in FIG6 , it is a process for determining whether the data service 1 corresponding to the data task is in a suspended state when the target task of the client is a data task in the above embodiment. When it is detected that the target data task is stuck, the environment detection result of the client is first obtained. If the environment detection result is normal, the abnormality detection result is obtained by actively obtaining the abnormality detection result from the data service 1 corresponding to the target data task. If the abnormality detection result is abnormal, it is determined that the data service 1 is in a suspended state, and the client reports the abnormality of the data service 1 to the management node, and the management node performs the recovery process of the data service 1, and other data services take over the target data task.

[0085] In the above embodiment, the abnormality detection result of the data service is obtained to determine the service detection result of the data service, so that it can be determined whether the data service is in a suspended state according to the service detection result.

[0086] In one embodiment, as shown in FIG7 , the method further includes:

[0087] Step 701, after receiving the lock recall message sent by the distributed lock server, trigger the lock cancellation process.

[0088] Among them, during the task processing, when multiple clients read and write the same file, in order to ensure the consistency of metadata or data, it is necessary to control the reading and writing process of multiple clients through distributed locks. For example, when client 1 needs to read and write file 1, it needs to first obtain the lock by interacting with the distributed lock server, and then operate on file 1. At this time, when client 2 also needs to read and write file 1, it also needs to interact with the distributed lock server to obtain the lock. At this time, the distributed lock server detects and determines that the lock of file 1 is held by client 1, so it needs to send a recall lock message to client 1. Optionally, the distributed lock server can be a management node or other independent server.

[0089] Optionally, after receiving the lock recall message sent by the distributed lock server, client 1 triggers the lock cancellation process to cancel the lock on file 1.

[0090] Step 702: If the lock cancellation process fails, the dog feeding status of the client is obtained.

[0091] At this time, if the lock cancellation process of client 1 fails to execute, for example, the lock cannot be cancelled when client 1 is in a suspended state, therefore, it is necessary to judge the status of client 1. By obtaining the dog feeding status of client 1, it is determined whether client 1 is in a suspended state. Optionally, the environmental detection result of client 1 can also be obtained at the same time, and whether client 1 is in a suspended state is determined at the same time as the dog feeding status. In the following steps, it is necessary to determine whether there is a dog feeding anomaly and an environmental detection result anomaly at the same time. Optionally, a timed dog feeding program can be set in each client and service node, and a target file is created and the dog feeding program is started after the node is started. The dog feeding program writes the current timestamp to the target file every preset time, for example, 10 seconds. When client 1 is in a suspended state, the timestamp in the target file is obtained.

[0092] Step 703: If the client has a dog feeding anomaly, it is determined that the client is in a suspended state, and an isolation mark is set in the recall response message. The isolation mark is used for the distributed lock server to isolate the client.

[0093] If the timestamp in the target file has not been updated for more than a period of time, it is determined that there is a dog feeding anomaly in client 1, that is, client 1 is in a suspended state at this time. Therefore, an isolation mark is set in the recall response message, and the recall response message is sent to the distributed lock server. After receiving the recall response message, the distributed lock server determines whether there is an isolation mark. If so, client 1 is isolated and the lock of file 1 is granted to client 2. Client 2 can then obtain the content in file 1 through the data service.

[0094] Step 704: If there is no dog feeding anomaly on the client, a storage space detection result is obtained.

[0095] If the timestamp in the target file is updated normally, it is determined that there is no dog feeding anomaly in client 1. At this time, the storage space detection result is further obtained. Optionally, it is obtained whether there is a metadata or data disk no space error. If so, the storage space detection is abnormal. If not, the storage space detection result is no abnormality.

[0096] Step 705: If the storage space detection result is abnormal, a non-isolation flag is set in the recall response message. The non-isolation flag is used for the distributed lock server to continue sending recall lock messages and not isolate the client when the recall lock message sending reaches the maximum threshold.

[0097] Optionally, if there is an abnormality in the storage space detection result, that is, there is an error that there is no space on the metadata disk or the data disk, therefore, the inability of client 1 to release the lock at this time may be due to the lack of space on the metadata disk or the data disk, resulting in the inability to write data to file 1, that is, there is no abnormality in client 1 itself. Therefore, in order to avoid mistaken isolation of client 1, a cannot be isolated mark is set in the recall response message. After the distributed lock server receives the recall lock message, it determines that the mark is a cannot be isolated mark, and then does not isolate client 1. At the same time, it continues to send recall lock messages to client 1 until the number of times the recall lock message is sent reaches the recall threshold, and the client is still not isolated.

[0098] Step 706: If the storage space detection result is that there is no abnormality, no mark is set in the recall response message. The recall response message is used to instruct the distributed lock server to continue sending recall lock messages and isolate the client when the recall lock message sending reaches the maximum threshold.

[0099] Optionally, if the storage space detection result shows that there is no abnormality, that is, the metadata disk or data disk is normal at this time, and there is no error of no space, therefore, the inability of client 1 to release the lock may be due to other abnormalities of client 1. Therefore, no mark is set in the recall response message. After the distributed lock server receives the recall lock message, if it detects that there is no mark, client 1 will not be isolated, and the recall lock message will continue to be sent to client 1 until the number of times the recall lock message is sent reaches the recall threshold. At this time, the distributed lock server isolates the client.

[0100] In the above embodiment, when the client cannot release the lock of the file, the abnormal state of the client itself is obtained. If there is an abnormality, an isolation mark is set in the recall response message, and the distributed lock server isolates the client. If there is no abnormality in the client itself, check whether there is an error of insufficient metadata disk or data disk space in the recent period. If so, the cannot be isolated mark is set, and the distributed lock does not mark the client, thereby preventing the client from being judged to be in a suspended state due to non-self-problems and being mistakenly isolated.

[0101] In an embodiment of the present application, as shown in Figure 8, it is a schematic diagram of the process of the distributed lock identifying the pseudo-dead client in the above embodiment. Client 1 applies for a lock from the distributed lock server to write data to file 1. When client 1 pseudo-dead cannot release the lock, client 2 needs to read file 1 and apply for a lock from the distributed lock server. The distributed lock server sends a recall lock message to client 1. Client 1 cannot cancel the lock due to pseudo-dead, and obtains whether the dog feeding status is normal. If there is a dog feeding anomaly, an encouragement mark is set in the recall response message. If there is no dog feeding anomaly, continue to obtain the storage space detection result, and set the response mark in the recall response message according to the storage space detection result. After receiving the recall response message, the distributed lock server performs corresponding processing operations according to the mark.

[0102] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0103] Based on the same inventive concept, the embodiment of the present application also provides a suspended animation state recognition device for implementing the suspended animation state recognition method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more suspended animation state recognition device embodiments provided below can refer to the limitations of the suspended animation state recognition method above, and will not be repeated here.

[0104] In an exemplary embodiment, as shown in FIG9 , a suspended animation state recognition device 900 is provided, which is applied to a client in a distributed storage system, wherein the distributed storage system includes a client and a service node, and a service is deployed on the service node, including a first acquisition module 901, a second acquisition module 902 and a first determination module 903, wherein:

[0105] The first acquisition module 901 is used to acquire the environmental detection result of the client within a preset time when an abnormality of the target task is detected;

[0106] The second acquisition module 902 is used to acquire the service detection result of the first service corresponding to the target task if the environment detection result of the client is normal;

[0107] The first determination module 903 is configured to determine that the first service is in a suspended state if there is an abnormality in the service detection result.

[0108] In one of the embodiments, the target task is a metadata task, the first service is a target metadata service for executing the metadata task, the target metadata service includes multiple service sub-modules, and the second acquisition module 902 is specifically used to obtain the sub-module detection results of each service sub-module; if the sub-module detection result is normal, the task detection result of the target metadata service is obtained; if there is an abnormality in the task detection result, it is determined that there is an abnormality in the service detection result.

[0109] In one embodiment, the target task is a data task, the first service is a target data service for executing the data task, and the second acquisition module 902 is specifically used to obtain an anomaly detection result of the target data service; if the anomaly detection result is abnormal, it is determined that the service detection result is abnormal.

[0110] In one of the embodiments, the device further includes a reporting module for reporting abnormal information to the management node, wherein the abnormal information is used for the management node to isolate the first service and then restart the first service, and to notify the second service to take over the tasks in the first service.

[0111] In one of the embodiments, the device also includes a second determination module, which is used to trigger a lock cancellation process after receiving a recall lock message sent by a distributed lock server; if the lock cancellation process fails, the dog feeding status of the client is obtained; if there is a dog feeding abnormality in the client, it is determined that the client is in a suspended state, and an isolation mark is set in the recall response message, and the isolation mark is used for the distributed lock server to isolate the client.

[0112] In one of the embodiments, the device also includes a setting module, which is used to obtain a storage space detection result if there is no dog feeding abnormality in the client; if the storage space detection result is that there is an abnormality, a cannot be isolated mark is set in the recall response message, and the cannot be isolated mark is used for the distributed lock server to continue sending recall lock messages, and not to isolate the client when the recall lock message sending reaches a maximum threshold; if the storage space detection result is that there is no abnormality, the mark is not set in the recall response message, and the recall response message is used to instruct the distributed lock server to continue sending recall lock messages, and to isolate the client when the recall lock message sending reaches a maximum threshold.

[0113] Each module in the above-mentioned suspended animation state recognition device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module.

[0114] In an exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be shown in FIG10. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. The processor, the memory, and the input / output interface are connected via a system bus, and the communication interface, the display unit, and the input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner may be implemented through WIFI, a mobile cellular network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, a method for identifying a suspended animation state is implemented. The display unit of the computer device is used to form a visually visible picture, which may be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.

[0115] Those skilled in the art will understand that the structure shown in FIG. 10 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0116] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the following steps when executing the computer program: when an abnormality of a target task is detected, obtaining an environmental detection result of a client within a preset time; if the environmental detection result of the client is normal, obtaining a service detection result of a first service corresponding to the target task; if there is an abnormality in the service detection result, determining that the first service is in a suspended state.

[0117] In one embodiment, the target task is a metadata task, the first service is a target metadata service for executing the metadata task, the target metadata service includes multiple service sub-modules, and the processor also implements the following steps when executing the computer program: obtaining sub-module detection results of each service sub-module; if the sub-module detection results are normal, obtaining the task detection results of the target metadata service; if there is an abnormality in the task detection results, determining that there is an abnormality in the service detection results.

[0118] In one embodiment, the target task is a data task, the first service is a target data service for executing the data task, and the processor also implements the following steps when executing the computer program: obtaining an anomaly detection result of the target data service; if the anomaly detection result is abnormal, determining that the service detection result is abnormal.

[0119] In one embodiment, when the processor executes the computer program, the following steps are also implemented: reporting abnormal information to the management node, the abnormal information is used for the management node to isolate the first service and then restart the first service, and notify the second service to take over the tasks in the first service.

[0120] In one embodiment, the processor also implements the following steps when executing the computer program: after receiving the recall lock message sent by the distributed lock server, triggering the lock cancellation process; if the lock cancellation process fails, obtaining the dog feeding status of the client; if there is a dog feeding exception on the client, it is determined that the client is in a suspended state, and an isolation mark is set in the recall response message, and the isolation mark is used for the distributed lock server to isolate the client.

[0121] In one embodiment, the processor also implements the following steps when executing the computer program: if there is no dog feeding anomaly in the client, the storage space detection result is obtained; if the storage space detection result is that there is an anomaly, a cannot be isolated mark is set in the recall response message, and the cannot be isolated mark is used for the distributed lock server to continue sending the recall lock message, and not to isolate the client when the recall lock message reaches the maximum threshold; if the storage space detection result is that there is no anomaly, the mark is not set in the recall response message, and the recall response message is used to instruct the distributed lock server to continue sending the recall lock message, and to isolate the client when the recall lock message reaches the maximum threshold.

[0122] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: when an abnormality of a target task is detected, an environmental detection result of a client within a preset time is obtained; if the environmental detection result of the client is normal, a service detection result of a first service corresponding to the target task is obtained; if there is an abnormality in the service detection result, it is determined that the first service is in a suspended state.

[0123] In one embodiment, the target task is a metadata task, the first service is a target metadata service for executing the metadata task, the target metadata service includes multiple service sub-modules, and the computer program also implements the following steps when executed by the processor: obtaining sub-module detection results of each service sub-module; if the sub-module detection results are normal, obtaining the task detection results of the target metadata service; if there is an abnormality in the task detection results, determining that there is an abnormality in the service detection results.

[0124] In one embodiment, the target task is a data task, the first service is a target data service for executing the data task, and when the computer program is executed by the processor, the following steps are also implemented: obtaining an anomaly detection result of the target data service; if an anomaly detection result is abnormal, determining that an anomaly exists in the service detection result.

[0125] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: reporting exception information to the management node, the exception information is used for the management node to isolate the first service and then restart the first service, and notify the second service to take over the tasks in the first service.

[0126] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: after receiving the recall lock message sent by the distributed lock server, the lock cancellation process is triggered; if the lock cancellation process fails, the dog feeding status of the client is obtained; if there is a dog feeding exception on the client, it is determined that the client is in a suspended state, and an isolation mark is set in the recall response message, and the isolation mark is used for the distributed lock server to isolate the client.

[0127] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: if there is no dog feeding anomaly on the client, the storage space detection result is obtained; if the storage space detection result is that there is an anomaly, a cannot be isolated mark is set in the recall response message, and the cannot be isolated mark is used for the distributed lock server to continue sending the recall lock message, and not to isolate the client when the recall lock message reaches the maximum threshold; if the storage space detection result is that there is no anomaly, the mark is not set in the recall response message, and the recall response message is used to instruct the distributed lock server to continue sending the recall lock message, and to isolate the client when the recall lock message reaches the maximum threshold.

[0128] In one embodiment, a computer program product is provided, including a computer program, which, when executed by a processor, implements the following steps: when an abnormality is detected in a target task, obtaining an environmental detection result of a client within a preset time; if the environmental detection result of the client is normal, obtaining a service detection result of a first service corresponding to the target task; if an abnormality exists in the service detection result, determining that the first service is in a suspended state.

[0129] In one embodiment, the target task is a metadata task, the first service is a target metadata service for executing the metadata task, the target metadata service includes multiple service sub-modules, and the computer program also implements the following steps when executed by the processor: obtaining sub-module detection results of each service sub-module; if the sub-module detection results are normal, obtaining the task detection results of the target metadata service; if there is an abnormality in the task detection results, determining that there is an abnormality in the service detection results.

[0130] In one embodiment, the target task is a data task, the first service is a target data service for executing the data task, and when the computer program is executed by the processor, the following steps are also implemented: obtaining an anomaly detection result of the target data service; if an anomaly detection result is abnormal, determining that an anomaly exists in the service detection result.

[0131] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: reporting exception information to the management node, the exception information is used for the management node to isolate the first service and then restart the first service, and notify the second service to take over the tasks in the first service.

[0132] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: after receiving the recall lock message sent by the distributed lock server, the lock cancellation process is triggered; if the lock cancellation process fails, the dog feeding status of the client is obtained; if there is a dog feeding exception on the client, it is determined that the client is in a suspended state, and an isolation mark is set in the recall response message, and the isolation mark is used for the distributed lock server to isolate the client.

[0133] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: if there is no dog feeding anomaly on the client, the storage space detection result is obtained; if the storage space detection result is that there is an anomaly, a cannot be isolated mark is set in the recall response message, and the cannot be isolated mark is used for the distributed lock server to continue sending the recall lock message, and not to isolate the client when the recall lock message reaches the maximum threshold; if the storage space detection result is that there is no anomaly, the mark is not set in the recall response message, and the recall response message is used to instruct the distributed lock server to continue sending the recall lock message, and to isolate the client when the recall lock message reaches the maximum threshold.

[0134] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0135] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0136] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0137] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for identifying a suspended animation state, characterized in that: Applied to a client in a distributed storage system, the distributed storage system includes a client and a service node, and a service is deployed on the service node, the method includes: When an abnormality is detected in the target task, the environmental detection result of the client within a preset time is obtained; If the environment detection result of the client is normal, obtaining the service detection result of the first service corresponding to the target task; If there is an abnormality in the service detection result, it is determined that the first service is in a suspended state.

2. The method according to claim 1, characterized in that The target task is a metadata task, the first service is a target metadata service for executing the metadata task, the target metadata service includes a plurality of service submodules, and if the environment detection result of the client is normal, obtaining the service detection result of the first service corresponding to the target task includes: Obtaining submodule detection results of each of the service submodules; If the submodule detection result is normal, obtaining the task detection result of the target metadata service; If the task detection result is abnormal, it is determined that the service detection result is abnormal.

3. The method according to claim 1, characterized in that The target task is a data task, the first service is a target data service for executing the data task, and if the environmental detection result of the client is normal, obtaining a service detection result of the first service corresponding to the target task includes: Obtaining anomaly detection results of the target data service; If the abnormality detection result is abnormal, it is determined that the service detection result is abnormal.

4. The method according to claim 1, characterized in that: After determining that the first service is in a suspended state, the method further includes: Reporting exception information to the management node, wherein the exception information is used for the management node to isolate the first service and then restart the first service, and to notify the second service to take over the tasks in the first service.

5. The method according to claim 1, characterized in that The method further comprises: After receiving the lock recall message sent by the distributed lock server, the lock cancellation process is triggered; If the lock cancellation process fails, obtaining the dog feeding status of the client; If the client has a dog feeding anomaly, it is determined that the client is in a suspended state, and an isolation-needed flag is set in the recall response message, and the isolation-needed flag is used for the distributed lock server to isolate the client.

6. The method according to claim 5, characterized in that The method further comprises: If the client does not have a dog feeding anomaly, obtaining a storage space detection result; If the storage space detection result is abnormal, a non-isolation mark is set in the recall response message, and the non-isolation mark is used for the distributed lock server to continue sending the recall lock message and not isolate the client when the recall lock message sending reaches a maximum threshold; If the storage space detection result is that there is no abnormality, no mark is set in the recall response message. The recall response message is used to instruct the distributed lock server to continue sending the recall lock message and isolate the client when the recall lock message sending reaches a maximum threshold.

7. A suspended animation state recognition device, characterized in that: The device is applied to a client in a distributed storage system, wherein the distributed storage system includes a client and a service node, and a service is deployed on the service node. The device includes: The first acquisition module is used to acquire the environmental detection result of the client within a preset time when an abnormality of the target task is detected; A second acquisition module is used to acquire a service detection result of the first service corresponding to the target task if the environmental detection result of the client is normal; The first determination module is used to determine that the first service is in a suspended state if there is an abnormality in the service detection result.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.