WO2024113534A1 - 存储节点中存储资源的控制方法和装置,以及存储节点 - Google Patents

存储节点中存储资源的控制方法和装置,以及存储节点 Download PDF

Info

Publication number
WO2024113534A1
WO2024113534A1 PCT/CN2023/081163 CN2023081163W WO2024113534A1 WO 2024113534 A1 WO2024113534 A1 WO 2024113534A1 CN 2023081163 W CN2023081163 W CN 2023081163W WO 2024113534 A1 WO2024113534 A1 WO 2024113534A1
Authority
WO
WIPO (PCT)
Prior art keywords
target
cache partition
operation process
partition
cache
Prior art date
Application number
PCT/CN2023/081163
Other languages
English (en)
French (fr)
Inventor
侯红生
刘文志
刘志魁
Original Assignee
苏州元脑智能科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 苏州元脑智能科技有限公司 filed Critical 苏州元脑智能科技有限公司
Publication of WO2024113534A1 publication Critical patent/WO2024113534A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/0652Erasing, e.g. deleting, data cleaning, moving of data to a wastebasket
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0656Data buffering arrangements

Definitions

  • Embodiments of the present application relate to the field of computers, and in particular, to a method and device for controlling storage resources in a storage node, and a storage node.
  • Storage nodes such as SSD (Solid State Disk) will allocate cache partitions to other devices for use.
  • the cache partition When the cache partition is used up or no longer used, the allocated cache partition needs to be recycled, which is called the process of deleting the cache partition.
  • a series of operation processes will be executed to complete the deletion of the cache partition, or cache partitions with different functions will execute different operation processes when deleted.
  • the cache partition In the current solution for deleting cache partitions, when executing these operation processes, if some errors or failures occur in the process, the cache partition will not be deleted normally, and the cache partition cannot be recycled and reused, which also causes a waste of resources.
  • the embodiments of the present application provide a method and device for controlling storage resources in a storage node, and a storage node, so as to at least solve the problem of low success rate when deleting a cache partition in a storage node in the related art.
  • a method for controlling storage resources in a storage node including:
  • Target operation process wherein the target operation process is used to continue to delete the cache partition starting from the target partition state of the cache partition indicated by the target scenario.
  • the above-mentioned restoring the above-mentioned current operation process to the target operation process according to the above-mentioned target scenario includes:
  • the extracting, from the one or more operation steps included in the current operation flow, one or more target operation steps that are allowed to be executed in the target partition state of the cache partition indicated by the target scenario includes:
  • the candidate operation steps are edited according to the target partition state to obtain the one or more target operation steps.
  • the editing of the candidate operation steps according to the target partition state to obtain the one or more target operation steps includes:
  • an operation parameter recovery step is added before the candidate operation step. step, obtaining the above one or more target operation steps, wherein the above operation parameter recovery step is used to recover the operation parameters used by the cache partition configuration end in the above target operation process;
  • the above-mentioned target operation process is performed, including:
  • the operation parameter recovery step is performed, wherein the operation parameter recovery step is used to obtain the target operation parameters saved by the cache partition service end as the operation parameters used by the cache partition configuration end in the target operation process;
  • the candidate operation steps are performed using the target operation parameters.
  • the above-mentioned creation of the above-mentioned target operation process including the above-mentioned one or more target operation steps includes:
  • the above one or more target operation steps are connected according to the above operation logic to obtain the above target operation process.
  • the above-mentioned restoring the above-mentioned current operation process to the target operation process according to the above-mentioned target scenario includes:
  • the above-mentioned method of restoring the current operation process to the target operation process according to the above-mentioned target scenario includes:
  • the target operation process includes a data invalidation parameter recovery step and steps in the data invalidation process, wherein the data invalidation parameter recovery step is used to recover the data invalidation parameters used by the cache partition configuration end in the data invalidation process;
  • the above-mentioned target operation process includes a business end notification step and a business configuration processing step, wherein the above-mentioned business end notification step is used to notify the cache partition business end of the above-mentioned cache partition to cancel the correspondence between the above-mentioned cache partition and the volume, and the above-mentioned business configuration processing step is used to clear the business configuration of the above-mentioned cache partition.
  • the above-mentioned target operation process is performed, including:
  • the data invalidation parameter recovery step is performed to obtain the target data invalidation parameter
  • the step of performing the data failure parameter recovery step to obtain the target data failure parameter includes:
  • the data expiration parameter of the cache partition service end is determined as the target data expiration parameter.
  • the step of obtaining the data invalidation parameter of the cache partition from the cache partition service end of the cache partition includes:
  • the cache partition service end Sending a first reference count to the cache partition service end, wherein the first reference count is a reference count of the number of acceleration volumes saved by the cache partition configuration end;
  • the second reference count is a reference count of the number of acceleration volumes saved by the cache partition service end, and the second reference count is sent to the cache partition configuration end when the cache partition service end determines that the first reference count is not equal to the second reference count;
  • the above-mentioned detecting the running status of the current operation process currently being executed includes:
  • determining the operation status is used to indicate that the current operation process cannot be completed
  • determining the operating state is used to indicate that the current operation process can be completed.
  • the target scenario in which the above detection causes the above current operation process to be unable to be completed includes:
  • the target scene is determined according to the operation status.
  • a storage node including: a cache partition configuration end and a cache partition service end, wherein:
  • the cache partition configuration end is used to detect the running state of the current operation process currently being executed during the process of deleting the cache partition in the storage node, wherein the deletion of the cache partition includes one or more operation processes, and the one or more operation processes include the current operation process; in the case where it is detected that the running state is used to indicate that the current operation process cannot be completed, detect the target scenario that causes the current operation process to be unable to be completed; restore the current operation process to the target operation process according to the target scenario; execute the target operation process, wherein the target operation process is used to continue to delete the cache partition from the target partition state of the cache partition indicated by the target scenario;
  • the cache partition service end is used to execute the instructions issued by the cache partition configuration end during the process of the cache partition configuration end executing the target operation process.
  • the cache partition configuration end is used to perform the operation parameter recovery step when the target operation process includes the operation parameter recovery step, wherein the operation parameter recovery step is used to obtain the target operation parameters saved by the cache partition service end as the operation parameters used by the cache partition configuration end in the target operation process; and continue to execute the target operation process using the target operation parameters;
  • the cache partition service end is used to provide the target operation parameters to the cache partition configuration end.
  • the cache partition configuration end is used to: when the target scenario is used to indicate that the cache partition is rebuilt and rebuilt successfully, determine that the target operation process includes a data invalidation parameter recovery step and steps in the data invalidation process, wherein the data invalidation parameter recovery step is used to recover the data invalidation parameters used by the cache partition configuration end in the data invalidation process; execute the data invalidation parameter recovery step to obtain target data invalidation parameters; and execute the steps in the data invalidation process according to the target data invalidation parameters;
  • the cache partition service end is used to provide the target data invalidation parameter to the cache partition configuration end.
  • the cache partition configuration end is used to send a first reference count to the cache partition service end, wherein the first reference count is a reference count of the number of acceleration volumes stored by the cache partition configuration end; receive a second reference count returned by the cache partition service end according to the first reference count, wherein the second reference count is a reference count of the number of acceleration volumes stored by the cache partition service end; and upon receiving the second reference count, determine the second reference count as the target data invalidation parameter;
  • the cache partition service end is used to receive the first reference count sent by the cache partition configuration end; determine whether the first reference count is equal to the second reference count; and send the second reference count to the cache partition configuration end when it is determined that the first reference count is not equal to the second reference count.
  • a device for controlling storage resources in a storage node including:
  • a first detection module is used to detect the running state of the current operation process currently being executed during the process of deleting the cache partition in the storage node, wherein the deletion of the cache partition includes one or more operation processes, and the one or more operation processes include the current operation process;
  • a second detection module is used to detect a target scenario that causes the current operation process to be unable to be completed when it is detected that the running state indicates that the current operation process cannot be completed;
  • a recovery module used to restore the current operation process to the target operation process according to the target scenario
  • An execution module is used to execute the target operation process, wherein the target operation process is used to obtain the cache indicated by the target scene.
  • the target partition state of the partition begins to continue to achieve the deletion of the above cache partition.
  • a non-volatile readable storage medium in which a computer program is stored, wherein the computer program is configured to execute the steps of any one of the above method embodiments when running.
  • an electronic device including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
  • the deletion of the cache partition includes one or more operation processes.
  • the running status of each currently executed operation process is detected in real time. If it is found that the current operation process cannot be completed, the reason that causes it to be unable to be completed is detected as the target scenario, and the current operation process is restored according to the target scenario to obtain the target operation process.
  • the target operation process is executed so that the deletion of the cache partition can continue to be executed from the target partition state of the cache partition to be deleted indicated by the target scenario, thereby smoothly realizing the deletion of the cache partition. Therefore, the problem of low success rate when deleting the cache partition in the storage node can be solved, and the effect of improving the success rate when deleting the cache partition in the storage node is achieved.
  • FIG1 is a hardware structure block diagram of a mobile terminal of a method for controlling storage resources in a storage node according to an embodiment of the present application
  • FIG. 2 is a flow chart of a method for controlling storage resources in a storage node according to an embodiment of the present application
  • FIG3 is a schematic diagram of a process of deleting a cache partition according to an optional implementation manner of the present application
  • FIG4 is a schematic diagram 1 of a storage node according to an embodiment of the present application.
  • FIG5 is a second schematic diagram of a storage node according to an embodiment of the present application.
  • FIG6 is a third schematic diagram of a storage node according to an embodiment of the present application.
  • FIG7 is a fourth schematic diagram of a storage node according to an embodiment of the present application.
  • FIG8 is a structural block diagram of a device for controlling storage resources in a storage node according to an embodiment of the present application.
  • FIG1 is a hardware structure block diagram of a mobile terminal of a method for controlling storage resources in a storage node in an embodiment of the present application.
  • the mobile terminal may include one or more (only one is shown in FIG1 ) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input/output device 108 for communication functions.
  • FIG1 is only for illustration and does not limit the structure of the mobile terminal.
  • the mobile terminal may also include more or fewer components than those shown in FIG1 , or have a configuration different from that shown in FIG1 .
  • the memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the control method of storage resources in the storage node in the embodiment of the present application.
  • the processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the above method is implemented.
  • the memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory.
  • the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the mobile terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
  • the transmission device 106 is used to receive or send data via a network.
  • the above-mentioned optional examples of the network may include a wireless network provided by a communication provider of the mobile terminal.
  • the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet.
  • the transmission device 106 may be a radio frequency (Radio Frequency, RF for short) module, which is used to communicate with the Internet wirelessly.
  • RF Radio Frequency
  • FIG. 2 is a flow chart of the method for controlling storage resources in a storage node according to an embodiment of the present application. As shown in FIG. 2 , the process includes the following steps:
  • Step S202 in the process of deleting the cache partition in the storage node, detecting the running state of the current operation process currently being executed, wherein the deletion of the cache partition includes one or more operation processes, and the one or more operation processes include the current operation process;
  • Step S204 when it is detected that the running status indicates that the current operation process cannot be completed, detecting a target scenario that causes the current operation process to be unable to be completed;
  • Step S206 restoring the current operation process to the target operation process according to the target scenario
  • Step S208 executing the target operation process, wherein the target operation process is used to continue to delete the cache partition starting from the target partition state of the cache partition indicated by the target scenario.
  • the deletion of the cache partition includes one or more operation processes.
  • the running status of each currently executed operation process is detected in real time. If it is found that the current operation process cannot be completed, the reason for its inability to complete is detected as the target scenario, and the current operation process is restored according to the target scenario to obtain the target operation process.
  • the target operation process is executed so that the deletion of the cache partition can continue to be executed from the target partition state of the cache partition to be deleted indicated by the target scenario, thereby successfully realizing the deletion of the cache partition. Therefore, the problem of low success rate when deleting the cache partition in the storage node can be solved, and the effect of improving the success rate when deleting the cache partition in the storage node is achieved.
  • control method of storage resources in the storage node can be applied to the storage node, but not limited to, for example, applied to the cache partition configuration end in the storage node. It can also be applied to a device independent of the storage node and having a storage node control function, and the device monitors and repairs the deletion process of the cache partition in the storage node, thereby ensuring the smooth deletion of the cache partition.
  • the cache partition configuration end detects the running status of the data invalidation process, wherein the data invalidation process is used to invalidate the acceleration volume data in the cache partition. If it is detected that the data invalidation process cannot be completed, the cache partition configuration end detects the target scenario that causes the data invalidation process to fail to complete, that is, detects the reason why it cannot be completed.
  • the cache partition configuration end restores the data invalidation process to a target cache partition deletion process according to the target scenario, wherein the target cache partition deletion process is used to continue to execute the operation of deleting the cache partition starting from the target partition state of the cache partition indicated by the target scenario.
  • the cache partition configuration end executes the target cache partition deletion process on the cache partition, thereby ensuring the smooth deletion of the cache partition.
  • the above storage node can be but is not limited to any type of storage node with the function of creating and deleting cache partitions, such as a solid-state drive SSD.
  • the cache partition created by the SSD disk will be used to accelerate data on the volume created by the HDD (Hard Disk Drive).
  • the volume created by the HDD will save the address pointer of the cache partition created by the SSD and a flag indicating whether cache acceleration is turned on.
  • the cache partition acceleration relationship is turned off for the volume created by the HDD, the cache partition will invalidate the data of the volume created by the corresponding HDD. If the cache partition hits a lot of data, the time spent on invalidating the data will increase accordingly.
  • the cache partition configuration end will check whether the reference count is 0. If it is not 0, it means that the cache partition is still accelerating the volume and will be restricted from deletion because the business end may still save the acceleration relationship between the cache partition and the volume, which will cause the cache partition deletion to fail due to the inability to complete the volume invalidation data process.
  • deleting the cache partition includes one or more operation processes, such as: data invalidation process, deletion task initiation process, cache partition recovery process, etc.
  • operation processes such as: data invalidation process, deletion task initiation process, cache partition recovery process, etc.
  • each operation process its running state is detected, and the operation process is restored in a targeted manner according to different running states and the reasons causing different running states, so as to ensure that the cache partition can be deleted smoothly.
  • the running status of the current operation process may include an incomplete state and a complete state.
  • the incomplete state is used to indicate that the current operation process cannot be completed
  • the complete state is used to indicate that the current operation process can be completed.
  • the execution parameters and information of the current operation process during execution are used to predict whether it can be completed, and corresponding processing is performed based on the judgment to ensure the smooth deletion of the cache partition.
  • the current operation process it is possible but not limited to determine whether the current operation process can be executed according to errors or failures that occur during the execution of the current operation process. For example, if there are no errors or failures during the execution of the current operation process, then the current operation process may be completed. If errors or failures occur during the execution of the current operation process, and some errors or failures can be repaired by themselves, then it is considered that the current operation process may also be completed. For those errors or failures that cannot be repaired by themselves, it can be considered that the current operation process may not be completed.
  • the running status of the current operation process being executed can be detected in the following ways but is not limited to: detecting whether a cache partition fails during the execution of the current operation process; in the case where a cache partition failure is detected, determining the running status to indicate that the current operation process cannot be completed; in the case where a cache partition failure is detected, determining the running status to indicate that the current operation process can be completed.
  • the operating status of the current operation process can be determined by, but is not limited to, performing fault detection on the current operation process.
  • the above-mentioned faults can include, but are not limited to, HA (High Availability) faults. If an HA failure occurs in a storage node, the cache partition will need to be recreated. If the re-creation is successful, the operation process cannot be completed due to the inconsistency of the reference count of the number of acceleration volumes saved by the cache partition configuration end and the cache partition business end. If the re-creation fails, the operation process cannot be completed because the cache partition no longer exists.
  • HA High Availability
  • the target scenario can be but is not limited to being used to indicate the reason why the current operation process cannot be completed, for example: the target scenario can be but is not limited to including operation parameter errors, cache partition errors, etc.
  • the operation parameter error indicates that the current operation process cannot be completed due to inconsistent operation parameters and other reasons
  • the cache partition error indicates that the current operation process cannot be completed due to the non-existence of the cache partition and other reasons.
  • the target scenario may be analyzed based on, but not limited to, whether the cache partition is successfully rebuilt after a failure occurs.
  • the target scenario that causes the current operation process to be unable to complete can be detected in the following ways, but is not limited to: determining the target failure that causes the current operation process to be unable to complete; detecting the operating status of the reconstruction operation performed on the cache partition after the target failure occurs; and determining the target scenario based on the operating status.
  • the target scenario that causes the current operation process to fail to complete can be analyzed by, but is not limited to, the operation status of performing a reconstruction operation on the cache partition after a target failure occurs.
  • the target failure can be, but is not limited to, an HA failure.
  • the operation status of the reconstruction operation can include, but is not limited to, success and failure. If the operation status is successful, then the target scenario can be that the cache partition is successfully recreated, but the reference counts of the number of acceleration volumes saved by the cache partition configuration end and the cache partition business end are inconsistent, resulting in the inability to complete the operation process. If the operation status is successful, then the target scenario can be that the cache partition re-creation fails, that is, the cache partition does not exist, resulting in the inability to complete the operation process.
  • a corresponding recovery operation can be performed on the current operation process to obtain a target operation process according to the target scenario that causes the current operation process to fail to complete.
  • the recovery operation may include, but is not limited to: deletion, modification, addition of the process, and deletion, modification, addition of steps in the process, etc. This ensures that the target operation process can continue to delete the cache partition starting from the target partition state of the cache partition indicated by the target scenario.
  • the current operation process can be restored to the target operation process according to the target scenario in the following manner but is not limited to: extracting one or more target operation steps that are allowed to be executed in the target partition state of the cache partition indicated by the target scenario from one or more operation steps included in the current operation process; and creating a target operation process including one or more target operation steps.
  • each operation process may have one or more operation steps, each operation step will cause the cache partition to reach an intermediate state in the deletion process, and the operation steps to be executed after the cache partition reaches the target partition state are extracted from one or more operation steps according to the partition state of the cache partition indicated by the target scenario, so as to create a target operation process based on these extracted one or more target operation steps, so that the cache partition can continue to execute the process of deleting the cache partition along the current target partition state of the cache partition, thereby ensuring that the cache partition can be successfully deleted.
  • one or more target operation steps that are allowed to be executed in the target partition state of the cache partition indicated by the target scenario can be extracted from one or more operation steps included in the current operation process in the following manner, but is not limited to: searching for operation steps that are executed after the partition state of the cache partition reaches the target partition state from the one or more operation steps included in the operation process as candidate operation steps; and editing the candidate operation steps according to the target partition state to obtain one or more target operation steps.
  • the target operation step extraction process may include but is not limited to two stages: operation step screening and editing.
  • operation steps executed after the partition state of the cache partition reaches the target partition state are found as candidate operation steps, and then the candidate operation steps are edited according to the target partition state, so as to obtain target operation steps that can be successfully executed in the target partition state.
  • the candidate operation steps can be edited according to the target partition state to obtain one or more target operation steps in the following manner but not limited to: when the target partition state is used to indicate that a cache partition exists, an operation parameter recovery step is added before the candidate operation step to obtain one or more target operation steps, wherein the operation parameter recovery step is used to recover the operation parameters used by the cache partition configuration end in the target operation process; when the target partition state is used to indicate that a cache partition does not exist, the operation steps executed when the cache partition exists are screened out from the candidate operation steps to obtain one or more target operation steps.
  • the target partition state may indicate, but is not limited to, whether the cache partition currently still exists.
  • an operation parameter recovery step can be added before the candidate operation step to restore the operation parameters used by the cache partition configuration end in the target operation process, so that the obtained target operation step can continue to be executed.
  • the operation steps executed when the cache partition exists are screened out from the candidate operation steps to obtain one or more target operation steps.
  • the operation steps executed when the cache partition exists may include but are not limited to the steps of initiating a partition deletion task, etc.
  • a target operation process including one or more target operation steps may be created in the following manner but is not limited to: obtaining the operation logic of one or more target operation steps; connecting one or more target operation steps according to the operation logic to obtain the target operation process.
  • one or more target operation steps are connected according to a certain operation logic, so that the target operation process continues to be executed.
  • the current operation process can be restored to the target operation process according to the target scenario in the following manner but is not limited to: obtaining a scene and a reference operation process with a corresponding relationship, wherein the reference operation process is used to continue to implement the deletion of the cache partition under the corresponding scenario; and searching for a reference operation process corresponding to the target scenario from the scene and the reference operation process with a corresponding relationship as the target operation process.
  • how to continue to execute the deletion of the cache partition in different scenarios may also be pre-configured, and corresponding scenarios and reference operation processes may be pre-stored to define how to continue to implement the deletion of the cache partition in different scenarios.
  • the reference operation process corresponding to the target scene is searched from the corresponding scenarios and reference operation processes to continue execution as the target operation process.
  • the reference operation flow may be to restore the operation parameters first and then delete the cache partition with the restored operation parameters. If an HA failure occurs but the cache partition is not rebuilt, the reference operation flow may be to skip deleting the cache partition and directly process the configuration information.
  • the current operation process when the current operation process is a data invalidation process, the current operation process can be restored to a target operation process according to a target scenario in the following manner but not limited to: when the target scenario is used to indicate that a cache partition is rebuilt and rebuilt successfully, determining that the target operation process includes a data invalidation parameter recovery step and steps in the data invalidation process, wherein the data invalidation parameter recovery step is used to recover the data invalidation parameters used by the cache partition configuration end in the data invalidation process; when the target scenario is used to indicate that a cache partition is rebuilt but not rebuilt successfully, determining that the target operation process includes a business end notification step and a business configuration processing step, wherein the business end notification step is used to notify the cache partition business end of the cache partition to cancel the correspondence between the cache partition and the volume, and the business configuration processing step is used to clear the business configuration of the cache partition.
  • the data invalidation parameter recovery step and the steps in the data invalidation process are continued to be executed as the target operation process, thereby restoring the data invalidation parameters used by the cache partition configuration end in the data invalidation process and continuing the data invalidation process; in the target scenario that the cache partition is rebuilt but not rebuilt successfully, the business end notification step and the business configuration processing step are continued to be executed as the target operation process, thereby directly notifying the cache partition business end of the cache partition to cancel the correspondence between the cache partition and the volume, and skipping the process initiated by the partition deletion task to clear the business configuration of the cache partition.
  • the restored target operation process is executed so that the cache partition deletion process can continue to be executed from the target partition state of the cache partition indicated by the target scenario, thereby realizing the deletion of the cache partition.
  • the target operation process may be performed in the following manner, but is not limited to: In the case where an operation parameter recovery step and a candidate operation step are included, the operation parameter recovery step is executed, wherein the operation parameter recovery step is used to obtain the target operation parameters saved by the cache partition business end as the operation parameters used by the cache partition configuration end in the target operation process; and the candidate operation step is executed using the target operation parameters.
  • the target operation parameters saved by the cache partition business end can be obtained through the operation parameter recovery step as the operation parameters used by the cache partition configuration end in the target operation process, and then the candidate operation steps in the current operation process can be continued to be executed.
  • the target operation process can be executed in the following manner but is not limited to: when the target operation process includes a data invalidation parameter recovery step and steps in the data invalidation process, the data invalidation parameter recovery step is executed to obtain the target data invalidation parameters; and the steps in the data invalidation process are executed according to the target data invalidation parameters.
  • the target data invalidation parameters can be obtained by executing the data invalidation parameter recovery step, and then the steps in the data invalidation process are continued to be executed according to the target data invalidation parameters, thereby realizing the deletion of the cache partition.
  • the data invalidation parameter recovery step can be performed in the following manner but is not limited to: obtaining the data invalidation parameter of the cache partition from the cache partition business end of the cache partition; when the data invalidation parameter of the cache partition business end is obtained, the data invalidation parameter of the cache partition business end is determined as the target data invalidation parameter.
  • the target data invalidation parameters used in the process of continuing to execute the data invalidation process may be, but are not limited to, based on the data invalidation parameters recorded by the cache partition service end.
  • the data invalidation parameter recorded by the cache partition service end may be obtained by sending an instruction or request to the cache partition service end, but is not limited to the method.
  • the data invalidation parameter recorded by the cache partition service end may be obtained by executing an interactive process agreed upon with the cache partition service end, but is not limited to the method.
  • the data invalidation parameter of the cache partition can be obtained from the cache partition service end of the cache partition in the following manner, but is not limited to: sending a first reference count to the cache partition service end, wherein the first reference count is a reference count of the number of acceleration volumes saved by the cache partition configuration end; receiving a second reference count returned by the cache partition service end based on the first reference count, wherein the second reference count is a reference count of the number of acceleration volumes saved by the cache partition service end, and the second reference count is sent to the cache partition configuration end when the cache partition service end determines that the first reference count is not equal to the second reference count; when the second reference count is received, determining to obtain the data invalidation parameter of the cache partition service end.
  • the first reference count of the number of acceleration volumes saved by the cache partition configuration end is first sent to the cache partition business end, and the cache partition business end compares the first reference count with the second reference count saved by itself to determine whether the two are consistent. If the two are inconsistent, the cache partition business end will return the second reference count.
  • the second reference count returned by the cache partition business end can be used as a target data invalidation parameter in subsequent data invalidation processes.
  • the next operation process of the current operation process in one or more operation processes may also be executed but is not limited to it.
  • FIG. 3 is a schematic diagram of a process for deleting a cache partition according to an optional implementation of the present application. As shown in FIG. 3 , the process includes the following steps:
  • Step S304 detecting the target scenario that causes the data invalidation process to fail to complete. If the cache partition is rebuilt successfully after the HA failure occurs, then execute steps S306 to S310. If the cache partition is rebuilt unsuccessfully after the HA failure occurs, then execute steps S312 to S314.
  • Step S306 Send the first reference count to the cache partition service end.
  • Step S308 Receive the second reference count returned by the cache partition service end according to the first reference count.
  • Step S310 determine the second reference count as the target data invalidation parameter, and continue to execute data invalidation using the target data invalidation parameter. Steps in a process.
  • Step S312 Notify the cache partition service end of the cache partition to cancel the correspondence between the cache partition and the volume.
  • the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method.
  • the technical solution of the present application, or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a non-volatile readable storage medium (such as ROM/RAM, magnetic disk, optical disk), including a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the above methods of each embodiment of the present application.
  • a non-volatile readable storage medium such as ROM/RAM, magnetic disk, optical disk
  • the cache partition service end 44 is used to execute the instructions sent by the cache partition configuration end during the process of the cache partition configuration end executing the target operation process.
  • the deletion of the cache partition includes one or more operation processes.
  • the running status of each currently executed operation process is detected in real time. If it is found that the current operation process cannot be completed, the reason that causes it to be unable to be completed is detected as the target scenario, and the current operation process is restored according to the target scenario to obtain the target operation process.
  • the target operation process is executed so that the deletion of the cache partition can continue to be executed from the target partition state of the cache partition to be deleted indicated by the target scenario, thereby smoothly realizing the deletion of the cache partition. Therefore, the problem of low success rate when deleting the cache partition in the storage node can be solved, and the effect of improving the success rate when deleting the cache partition in the storage node is achieved.
  • the cache partition configuration end is also used to: extract one or more target operation steps that are allowed to be executed in the target partition state of the cache partition indicated by the target scenario from one or more operation steps included in the current operation process; and create a target operation process including one or more target operation steps.
  • the cache partition configuration end is also used to: search for an operation step that is executed after the partition state of the cache partition reaches a target partition state as a candidate operation step from one or more operation steps included in the operation process; and edit the candidate operation steps according to the target partition state to obtain one or more target operation steps.
  • the cache partition configuration end is also used to: when the target partition state is used to indicate that the cache partition exists, add an operation parameter recovery step before the candidate operation step to obtain one or more target operation steps, wherein the operation parameter recovery step is used to recover the operation parameters used by the cache partition configuration end in the target operation process; when the target partition state is used to indicate that the cache partition does not exist, filter out the operation steps performed when the cache partition exists from the candidate operation steps to obtain one or more target operation steps.
  • the cache partition service end 44 is used to provide target operation parameters to the cache partition configuration end.
  • the cache partition configuration end is further used to: obtain the operation logic of one or more target operation steps; and connect the one or more target operation steps according to the operation logic to obtain the target operation process.
  • the cache partition configuration end is also used to: obtain scenes and reference operation processes with corresponding relationships, wherein the reference operation process is used to continue to implement the deletion of cache partitions under the corresponding scenarios; and search for the reference operation process corresponding to the target scene from the scenes and reference operation processes with corresponding relationships as the target operation process.
  • Figure 6 is a third schematic diagram of a storage node according to an embodiment of the present application.
  • the cache partition configuration end 42 is used to: when the target scenario is used to indicate that the cache partition is rebuilt and rebuilt successfully, determine that the target operation process includes a data invalidation parameter recovery step and steps in the data invalidation process, wherein the data invalidation parameter recovery step is used to recover the data invalidation parameters used by the cache partition configuration end in the data invalidation process; execute the data invalidation parameter recovery step to obtain the target data invalidation parameters; execute the steps in the data invalidation process according to the target data invalidation parameters; the cache partition business end 44 is used to provide the target data invalidation parameters to the cache partition configuration end.
  • the cache partition configuration end is also used to: when the target scenario is used to indicate that the cache partition is rebuilt but not rebuilt successfully, determine that the target operation process includes a business end notification step and a business configuration processing step, wherein the business end notification step is used to notify the cache partition business end of the cache partition to cancel the correspondence between the cache partition and the volume, and the business configuration processing step is used to clear the business configuration of the cache partition.
  • FIG. 7 is a schematic diagram of a storage node according to an embodiment of the present application.
  • the cache partition configuration end 42 is used to send a first reference count to the cache partition service end, wherein the first reference count is a reference count of the number of acceleration volumes stored by the cache partition configuration end; receive a second reference count returned by the cache partition service end according to the first reference count, wherein the second reference count is a reference count of the number of acceleration volumes stored by the cache partition service end; when the second reference count is received, determine the second reference count as a target data invalidation parameter;
  • the cache partition service end 44 is used to receive the first reference count sent by the cache partition configuration end; determine whether the first reference count is equal to the second reference count; and send the second reference count to the cache partition configuration end when it is determined that the first reference count is not equal to the second reference count.
  • the cache partition configuration end is also used to: detect whether the cache partition fails during the execution of the current operation process; when it is detected that the cache partition fails, determine the operating status to indicate that the current operation process cannot be completed; when it is detected that the cache partition has not failed, determine the operating status to indicate that the current operation process can be completed.
  • the cache partition configuration end is also used to: determine the target failure that causes the current operation process to fail to complete; detect the operating status of the reconstruction operation performed on the cache partition after the target failure occurs; and determine the target scenario based on the operating status.
  • a storage node processing mechanism is proposed to solve the problem of failure to delete cache partitions due to the inability to complete the invalidation data process.
  • deleting a cache partition first determine the scenario in which the invalidation data process cannot be completed. If the cache partition has a large amount of data hits, it takes a long time to invalidate the corresponding acceleration volume data, resulting in an HA failure during the process of invalidating the acceleration volume data.
  • One scenario may be that the cache partition is successfully rebuilt after the failure, but due to the failure, the cache partition business end cannot send the reference count of the volume data invalidation completion minus one to the cache partition configuration end, resulting in the reference count of the number of acceleration volumes saved by the cache partition configuration end and the cache partition business end not matching; another scenario may be that the cache partition cannot be correctly recreated when an HA failure occurs. Since the partition is not created, the cache partition business end cannot initiate the process of invalidating the acceleration volume data.
  • the cache partition configuration end sends the first reference count of the number of acceleration volumes it saves to the cache partition business end.
  • the cache partition business end compares it with the second reference count of the acceleration volume it maintains. If they are different, the second reference count of the cache partition business end is sent to the cache partition configuration end.
  • the cache partition configuration end sends a message to the cache partition business end to confirm whether the cache partition is successfully created. If not, there is no need to invalidate the data.
  • the cache partition configuration end sends a message to cancel the corresponding relationship between the cache partition and the volume of the cache partition business end.
  • the cache partition configuration end does not initiate the partition deletion task, and the cache partition configuration end handles the business configuration itself.
  • a control device for storage resources in a storage node is also provided, and the device is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made are not repeated here.
  • the term "module” can be a combination of software and/or hardware that implements a predetermined function.
  • the device described in the following embodiments is preferably implemented in software, it is also possible and possible to implement it in hardware, or in a combination of software and hardware. Conceived.
  • FIG8 is a structural block diagram of a device for controlling storage resources in a storage node according to an embodiment of the present application. As shown in FIG8 , the device includes:
  • a first detection module 82 is used to detect the running state of the current operation process currently being executed during the process of deleting the cache partition in the storage node, wherein the deletion of the cache partition includes one or more operation processes, and the one or more operation processes include the current operation process;
  • the second detection module 84 is used to detect the target scenario that causes the current operation process to be unable to be completed when it is detected that the above-mentioned running state is used to indicate that the above-mentioned current operation process cannot be completed;
  • a recovery module 86 used to restore the current operation process to the target operation process according to the target scenario
  • the execution module 88 is used to execute the target operation process, wherein the target operation process is used to continue to delete the cache partition starting from the target partition state of the cache partition indicated by the target scenario.
  • the deletion of the cache partition includes one or more operation processes.
  • the running status of each currently executed operation process is detected in real time. If it is found that the current operation process cannot be completed, the reason causing its inability to be completed is detected as the target scenario, and the current operation process is restored according to the target scenario to obtain the target operation process.
  • the target operation process is executed so that the deletion of the cache partition can continue to be executed from the target partition state of the cache partition to be deleted indicated by the target scenario, thereby successfully deleting the cache partition. Therefore, the problem of low success rate when deleting the cache partition in the storage node can be solved, and the effect of improving the success rate when deleting the cache partition in the storage node is achieved.
  • the recovery module includes:
  • An extraction unit configured to extract, from the one or more operation steps included in the current operation flow, one or more target operation steps that are allowed to be executed in the target partition state of the cache partition indicated by the target scenario;
  • the creation unit is used to create the above-mentioned target operation process including the above-mentioned one or more target operation steps.
  • the extraction unit is used to:
  • the candidate operation steps are edited according to the target partition state to obtain the one or more target operation steps.
  • the extraction unit is used to:
  • an operation parameter recovery step is added before the candidate operation step to obtain the one or more target operation steps, wherein the operation parameter recovery step is used to recover the operation parameters used by the cache partition configuration end in the target operation process;
  • the execution module includes:
  • a first execution unit is configured to execute the operation parameter recovery step when the one or more target operation steps include the operation parameter recovery step and the candidate operation step, wherein the operation parameter recovery step is used to obtain the target operation parameters saved by the cache partition service end as the operation parameters used by the cache partition configuration end in the target operation process;
  • the second execution unit is used to execute the candidate operation steps using the target operation parameters.
  • the creation unit is used to:
  • the above one or more target operation steps are connected according to the above operation logic to obtain the above target operation process.
  • the recovery module includes:
  • An acquisition unit used to acquire a scene and a reference operation process having a corresponding relationship, wherein the reference operation process is used to continue to implement the deletion of the cache partition in the corresponding scene;
  • a search unit is used to search for a reference operation process corresponding to the target scene from the scenes and reference operation processes having a corresponding relationship as a reference operation process The above target operation process.
  • the recovery module when the current operation process is a data failure process, the recovery module includes:
  • a first determining unit is used to determine that the target operation process includes a data invalidation parameter recovery step and a step in the data invalidation process when the target scenario indicates that the cache partition is rebuilt and rebuilt successfully, wherein the data invalidation parameter recovery step is used to recover the data invalidation parameters used by the cache partition configuration end in the data invalidation process;
  • the second determination unit is used to determine that the above-mentioned target operation process includes a business end notification step and a business configuration processing step when the above-mentioned target scenario is used to indicate that the above-mentioned cache partition has been rebuilt but has not been rebuilt successfully, wherein the above-mentioned business end notification step is used to notify the cache partition business end of the above-mentioned cache partition to cancel the correspondence between the above-mentioned cache partition and the volume, and the above-mentioned business configuration processing step is used to clear the business configuration of the above-mentioned cache partition.
  • the execution module includes:
  • a third execution unit is used to execute the data invalidation parameter recovery step to obtain the target data invalidation parameter when the target operation process includes the data invalidation parameter recovery step and the steps in the data invalidation process;
  • the fourth execution unit is used to execute the steps in the data invalidation process according to the target data invalidation parameters.
  • the third execution unit is configured to:
  • the data expiration parameter of the cache partition service end is determined as the target data expiration parameter.
  • the third execution unit is configured to:
  • the cache partition service end Sending a first reference count to the cache partition service end, wherein the first reference count is a reference count of the number of acceleration volumes saved by the cache partition configuration end;
  • the second reference count is a reference count of the number of acceleration volumes saved by the cache partition service end, and the second reference count is sent to the cache partition configuration end when the cache partition service end determines that the first reference count is not equal to the second reference count;
  • the first detection module is used to:
  • determining the operation status is used to indicate that the current operation process cannot be completed
  • determining the operating state is used to indicate that the current operation process can be completed.
  • the second detection module is used to:
  • the target scene is determined according to the operation status.
  • the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
  • An embodiment of the present application further provides a non-volatile readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
  • the above-mentioned non-volatile readable storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.
  • An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
  • the electronic device may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
  • modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation.
  • the present application is not limited to any specific combination of hardware and software.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

本申请实施例提供了一种存储节点中存储资源的控制方法和装置,以及存储节点,其中,该方法包括:在删除存储节点中的缓存分区的过程中,检测当前执行的当前操作流程的运行状态;在检测到运行状态用于指示当前操作流程无法完成的情况下,检测导致当前操作流程无法完成的目标场景;根据目标场景将当前操作流程恢复为目标操作流程;执行目标操作流程,其中,目标操作流程用于从目标场景所指示的缓存分区的目标分区状态开始继续实现缓存分区的删除。通过本申请,解决了删除存储节点中的缓存分区时的成功率较低的问题,进而达到了提高删除存储节点中的缓存分区时的成功率的效果。

Description

存储节点中存储资源的控制方法和装置,以及存储节点
相关申请的交叉引用
本申请要求于2022年11月30日提交中国专利局,申请号为202211519717.8,申请名称为“存储节点中存储资源的控制方法、装置以及存储节点”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及计算机领域,特别的,涉及一种存储节点中存储资源的控制方法和装置,以及存储节点。
背景技术
存储节点(比如:SSD(Solid State Disk,固态硬盘))会分配缓存分区给其他器件使用,在缓存分区使用完或者不再使用时,需要将分配出去的缓存分区回收,称为删除缓存分区的过程。在该过程中,会执行一系列的操作流程来完成缓存分区的删除,或者不同功能的缓存分区在删除时会执行不同的操作流程。目前的删除缓存分区的方案中执行这些操作流程时一旦流程中出现一些错误或者故障就会导致缓存分区无法被正常删除,进而使得缓存分区无法被回收再次利用,也造成了资源的浪费。
针对相关技术中,删除存储节点中的缓存分区时的成功率较低等问题,尚未提出有效的解决方案。
发明内容
本申请实施例提供了一种存储节点中存储资源的控制方法和装置,以及存储节点,以至少解决相关技术中删除存储节点中的缓存分区时的成功率较低的问题。
根据本申请的一个实施例,提供了一种存储节点中存储资源的控制方法,包括:
在删除存储节点中的缓存分区的过程中,检测当前执行的当前操作流程的运行状态,其中,实现上述缓存分区的删除包括一个或者多个操作流程,上述一个或者多个操作流程包括上述当前操作流程;
在检测到上述运行状态用于指示上述当前操作流程无法完成的情况下,检测导致上述当前操作流程无法完成的目标场景;
根据上述目标场景将上述当前操作流程恢复为目标操作流程;
执行上述目标操作流程,其中,上述目标操作流程用于从上述目标场景所指示的上述缓存分区的目标分区状态开始继续实现上述缓存分区的删除。
在一个示例性实施例中,上述根据上述目标场景将上述当前操作流程恢复为目标操作流程,包括:
从上述当前操作流程所包括的一个或者多个操作步骤中提取允许在上述目标场景所指示的上述缓存分区的目标分区状态下执行的一个或者多个目标操作步骤;
创建包括上述一个或者多个目标操作步骤的上述目标操作流程。
在一个示例性实施例中,上述从上述当前操作流程所包括的一个或者多个操作步骤中提取允许在上述目标场景所指示的上述缓存分区的目标分区状态下执行的一个或者多个目标操作步骤,包括:
从上述操作流程所包括的一个或者多个操作步骤中查找在上述缓存分区的分区状态达到上述目标分区状态后执行的操作步骤作为候选操作步骤;
根据上述目标分区状态对上述候选操作步骤进行编辑,得到上述一个或者多个目标操作步骤。
在一个示例性实施例中,上述根据上述目标分区状态对上述候选操作步骤进行编辑,得到上述一个或者多个目标操作步骤,包括:
在上述目标分区状态用于指示上述缓存分区存在的情况下,在上述候选操作步骤之前添加操作参数恢复步 骤,得到上述一个或者多个目标操作步骤,其中,上述操作参数恢复步骤用于恢复缓存分区配置端在上述目标操作流程中使用的操作参数;
在上述目标分区状态用于指示上述缓存分区不存在的情况下,从上述候选操作步骤中筛除在上述缓存分区存在时执行的操作步骤,得到上述一个或者多个目标操作步骤。
在一个示例性实施例中,上述执行上述目标操作流程,包括:
在上述一个或者多个目标操作步骤包括上述操作参数恢复步骤和上述候选操作步骤的情况下,执行上述操作参数恢复步骤,其中,上述操作参数恢复步骤用于获取缓存分区业务端保存的目标操作参数作为上述缓存分区配置端在上述目标操作流程中使用的操作参数;
使用上述目标操作参数执行上述候选操作步骤。
在一个示例性实施例中,上述创建包括上述一个或者多个目标操作步骤的上述目标操作流程,包括:
获取上述一个或者多个目标操作步骤的操作逻辑;
按照上述操作逻辑连接上述一个或者多个目标操作步骤,得到上述目标操作流程。
在一个示例性实施例中,上述根据上述目标场景将上述当前操作流程恢复为目标操作流程,包括:
获取具有对应关系的场景和参考操作流程,其中,上述参考操作流程用于在对应的场景下继续实现上述缓存分区的删除;
从上述具有对应关系的场景和参考操作流程中查找上述目标场景对应的参考操作流程作为上述目标操作流程。
在一个示例性实施例中,在上述当前操作流程为数据失效流程的情况下,上述根据上述目标场景将上述当前操作流程恢复为目标操作流程,包括:
在上述目标场景用于指示上述缓存分区被重建并重建成功的情况下,确定上述目标操作流程包括数据失效参数恢复步骤和上述数据失效流程中的步骤,其中,上述数据失效参数恢复步骤用于恢复缓存分区配置端在上述数据失效流程中使用的数据失效参数;
在上述目标场景用于指示上述缓存分区被重建但未重建成功的情况下,确定上述目标操作流程包括业务端通知步骤和业务配置处理步骤,其中,上述业务端通知步骤用于通知上述缓存分区的缓存分区业务端取消上述缓存分区与卷的对应关系,上述业务配置处理步骤用于清除上述缓存分区的业务配置。
在一个示例性实施例中,上述执行上述目标操作流程,包括:
在上述目标操作流程包括上述数据失效参数恢复步骤和上述数据失效流程中的步骤的情况下,执行上述数据失效参数恢复步骤,得到目标数据失效参数;
根据上述目标数据失效参数执行上述数据失效流程中的步骤。
在一个示例性实施例中,上述执行上述数据失效参数恢复步骤,得到目标数据失效参数,包括:
从上述缓存分区的缓存分区业务端获取上述缓存分区的数据失效参数;
在获取到上述缓存分区业务端的数据失效参数的情况下,将上述缓存分区业务端的数据失效参数确定为上述目标数据失效参数。
在一个示例性实施例中,上述从上述缓存分区的缓存分区业务端获取上述缓存分区的数据失效参数,包括:
向上述缓存分区业务端发送第一引用计数,其中,上述第一引用计数是上述缓存分区配置端保存的加速卷个数的引用计数;
接收上述缓存分区业务端根据上述第一引用计数返回的第二引用计数,其中,上述第二引用计数是上述缓存分区业务端保存的加速卷个数的引用计数,上述第二引用计数是在上述缓存分区业务端判断出上述第一引用计数不等于上述第二引用计数的情况下向上述缓存分区配置端发送的;
在接收到上述第二引用计数的情况下,确定获取到上述缓存分区业务端的数据失效参数。
在一个示例性实施例中,上述检测当前执行的当前操作流程的运行状态,包括:
检测在执行上述当前操作流程的过程中上述缓存分区是否发生故障;
在检测到上述缓存分区发生故障的情况下,确定上述运行状态用于指示上述当前操作流程无法完成;
在检测到上述缓存分区未发生故障的情况下,确定上述运行状态用于指示上述当前操作流程能够完成。
在一个示例性实施例中,上述检测导致上述当前操作流程无法完成的目标场景,包括:
确定导致上述当前操作流程无法完成的目标故障;
检测发生上述目标故障后对上述缓存分区执行的重建操作的操作状态;
根据上述操作状态确定上述目标场景。
根据本申请的另一个实施例,提供了一种存储节点,包括:缓存分区配置端和缓存分区业务端,其中,
上述缓存分区配置端,用于在删除存储节点中的缓存分区的过程中,检测当前执行的当前操作流程的运行状态,其中,实现上述缓存分区的删除包括一个或者多个操作流程,上述一个或者多个操作流程包括上述当前操作流程;在检测到上述运行状态用于指示上述当前操作流程无法完成的情况下,检测导致上述当前操作流程无法完成的目标场景;根据上述目标场景将上述当前操作流程恢复为目标操作流程;执行上述目标操作流程,其中,上述目标操作流程用于从上述目标场景所指示的上述缓存分区的目标分区状态开始继续实现上述缓存分区的删除;
上述缓存分区业务端,用于在上述缓存分区配置端执行上述目标操作流程的过程中执行上述缓存分区配置端下发的指令。
在一个示例性实施例中,上述缓存分区配置端,用于在目标操作流程包括操作参数恢复步骤的情况下,执行上述操作参数恢复步骤,其中,上述操作参数恢复步骤用于获取上述缓存分区业务端保存的目标操作参数作为上述缓存分区配置端在上述目标操作流程中使用的操作参数;使用上述目标操作参数继续执行上述目标操作流程;
上述缓存分区业务端,用于向上述缓存分区配置端提供上述目标操作参数。
在一个示例性实施例中,在上述当前操作流程为数据失效流程的情况下:
上述缓存分区配置端,用于:在上述目标场景用于指示上述缓存分区被重建并重建成功的情况下,确定上述目标操作流程包括数据失效参数恢复步骤和上述数据失效流程中的步骤,其中,上述数据失效参数恢复步骤用于恢复缓存分区配置端在上述数据失效流程中使用的数据失效参数;执行上述数据失效参数恢复步骤,得到目标数据失效参数;根据上述目标数据失效参数执行上述数据失效流程中的步骤;
上述缓存分区业务端,用于为上述缓存分区配置端提供上述目标数据失效参数。
在一个示例性实施例中,上述缓存分区配置端,用于向上述缓存分区业务端发送第一引用计数,其中,上述第一引用计数是上述缓存分区配置端保存的加速卷个数的引用计数;接收上述缓存分区业务端根据上述第一引用计数返回的第二引用计数,其中,上述第二引用计数是上述缓存分区业务端保存的加速卷个数的引用计数;在接收到上述第二引用计数的情况下,将上述第二引用计数确定为上述目标数据失效参数;
上述缓存分区业务端,用于接收上述缓存分区配置端发送的上述第一引用计数;判断上述第一引用计数与上述第二引用计数是否相等;在判断出上述第一引用计数不等于上述第二引用计数的情况下,向上述缓存分区配置端发送上述第二引用计数。
根据本申请的另一个实施例,提供了一种存储节点中存储资源的控制装置,包括:
第一检测模块,用于在删除存储节点中的缓存分区的过程中,检测当前执行的当前操作流程的运行状态,其中,实现上述缓存分区的删除包括一个或者多个操作流程,上述一个或者多个操作流程包括上述当前操作流程;
第二检测模块,用于在检测到上述运行状态用于指示上述当前操作流程无法完成的情况下,检测导致上述当前操作流程无法完成的目标场景;
恢复模块,用于根据上述目标场景将上述当前操作流程恢复为目标操作流程;
执行模块,用于执行上述目标操作流程,其中,上述目标操作流程用于从上述目标场景所指示的上述缓存 分区的目标分区状态开始继续实现上述缓存分区的删除。
根据本申请的又一个实施例,还提供了一种非易失性可读存储介质,上述非易失性可读存储介质中存储有计算机程序,其中,上述计算机程序被设置为运行时执行上述任一项方法实施例中的步骤。
根据本申请的又一个实施例,还提供了一种电子设备,包括存储器和处理器,上述存储器中存储有计算机程序,上述处理器被设置为运行上述计算机程序以执行上述任一项方法实施例中的步骤。
通过本申请,实现缓存分区的删除包括一个或者多个操作流程,在删除存储节点中的缓存分区的过程中,对于每个当前执行的当前操作流程的运行状态进行实时检测,如果发现当前操作流程无法完成,则检测导致其无法完成的原因作为目标场景,依据该目标场景对当前操作流程进行恢复,得到目标操作流程,执行该目标操作流程使得缓存分区的删除能够从目标场景所指示的待被删除的缓存分区的目标分区状态开始继续执行,从而顺利实现缓存分区的删除。因此,可以解决删除存储节点中的缓存分区时的成功率较低问题,达到提高删除存储节点中的缓存分区时的成功率效果。
附图说明
图1是本申请实施例的一种存储节点中存储资源的控制方法的移动终端的硬件结构框图;
图2是根据本申请实施例的存储节点中存储资源的控制方法的流程图;
图3是根据本申请可选的实施方式的一种删除缓存分区过程的示意图;
图4是根据本申请实施例的一种存储节点的示意图一;
图5是根据本申请实施例的一种存储节点的示意图二;
图6是根据本申请实施例的一种存储节点的示意图三;
图7是根据本申请实施例的一种存储节点的示意图四;
图8是根据本申请实施例的存储节点中存储资源的控制装置的结构框图。
具体实施方式
下文中将参考附图并结合实施例来详细说明本申请的实施例。
需要说明的是,本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。
本申请实施例中所提供的方法实施例可以在移动终端、计算机终端或者类似的运算装置中执行。以运行在移动终端上为例,图1是本申请实施例的一种存储节点中存储资源的控制方法的移动终端的硬件结构框图。如图1所示,移动终端可以包括一个或多个(图1中仅示出一个)处理器102(处理器102可以包括但不限于微处理器MCU或可编程逻辑器件FPGA等的处理装置)和用于存储数据的存储器104,其中,上述移动终端还可以包括用于通信功能的传输设备106以及输入输出设备108。本领域普通技术人员可以理解,图1所示的结构仅为示意,其并不对上述移动终端的结构造成限定。例如,移动终端还可包括比图1中所示更多或者更少的组件,或者具有与图1所示不同的配置。
存储器104可用于存储计算机程序,例如,应用软件的软件程序以及模块,如本申请实施例中的存储节点中存储资源的控制方法对应的计算机程序,处理器102通过运行存储在存储器104内的计算机程序,从而执行各种功能应用以及数据处理,即实现上述的方法。存储器104可包括高速随机存储器,还可包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器104可进一步包括相对于处理器102远程设置的存储器,这些远程存储器可以通过网络连接至移动终端。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
传输设备106用于经由一个网络接收或者发送数据。上述的网络可选实例可包括移动终端的通信供应商提供的无线网络。在一个实例中,传输设备106包括一个网络适配器(Network Interface Controller,简称为NIC),其可通过基站与其他网络设备相连从而可与互联网进行通讯。在一个实例中,传输设备106可以为射频 (Radio Frequency,简称为RF)模块,其用于通过无线方式与互联网进行通讯。
在本实施例中提供了一种存储节点中存储资源的控制方法,图2是根据本申请实施例的存储节点中存储资源的控制方法的流程图,如图2所示,该流程包括如下步骤:
步骤S202,在删除存储节点中的缓存分区的过程中,检测当前执行的当前操作流程的运行状态,其中,实现缓存分区的删除包括一个或者多个操作流程,一个或者多个操作流程包括当前操作流程;
步骤S204,在检测到运行状态用于指示当前操作流程无法完成的情况下,检测导致当前操作流程无法完成的目标场景;
步骤S206,根据目标场景将当前操作流程恢复为目标操作流程;
步骤S208,执行目标操作流程,其中,目标操作流程用于从目标场景所指示的缓存分区的目标分区状态开始继续实现缓存分区的删除。
通过上述步骤,实现缓存分区的删除包括一个或者多个操作流程,在删除存储节点中的缓存分区的过程中,对于每个当前执行的当前操作流程的运行状态进行实时检测,如果发现当前操作流程无法完成,则检测导致其无法完成的原因作为目标场景,依据该目标场景对当前操作流程进行恢复,得到目标操作流程,执行该目标操作流程使得缓存分区的删除能够从目标场景所指示的待被删除的缓存分区的目标分区状态开始继续执行,从而顺利实现缓存分区的删除。因此,可以解决删除存储节点中的缓存分区时的成功率较低问题,达到提高删除存储节点中的缓存分区时的成功率效果。
可选的,在本实施例中,上述存储节点中存储资源的控制方法可以但不限于应用于存储节点中,比如:应用于存储节点中缓存分区配置端,。也可以应用于独立于存储节点并具有存储节点控制功能的设备,由该设备对存储节点中缓存分区的删除过程进行监控和修复,从而保证缓存分区的顺利删除。
以应用于缓存分区配置端,当前操作流程为数据失效流程为例,在删除存储节点中的缓存分区的过程中,缓存分区配置端检测数据失效流程的运行状态,其中,该数据失效流程用于对缓存分区中的加速卷数据进行失效,如果检测到数据失效流程无法完成,则缓存分区配置端检测导致数据失效流程无法完成的目标场景,即检测其无法完成的原因,缓存分区配置端根据目标场景将数据失效流程恢复为目标缓存分区删除流程,其中,该目标缓存分区删除流程用于从目标场景所指示的缓存分区的目标分区状态开始继续执行删除缓存分区的操作,缓存分区配置端对缓存分区执行该目标缓存分区删除流程,从而保证缓存分区的顺利删除。
在上述步骤S202提供的技术方案中,上述存储节点可以但不限于是任何类型的具有创建和删除缓存分区功能的存储节点,比如:固态硬盘SSD,在Linux系统下对内存资源进行分配时,会使用SSD盘创建的缓存分区对HDD(Hard Disk Drive,机械硬盘)创建的卷进行数据加速,HDD创建的卷会保存SSD创建缓存分区的地址指针以及表示是否开启了缓存加速的标志位。HDD创建的卷关闭缓存分区加速关系时,缓存分区会失效掉对应HDD创建卷的数据,如果缓存分区命中的数据很多,失效数据耗费的时间就会相应的增加,如果在缓存分区失效数据的过程中,节点发生了故障,缓存分区无法完成失效数据流程,缓存分区加速卷个数的引用计数并没有减掉对应卷,这样就会导致缓存分区配置端和缓存分区业务端保存的加速卷个数引用计数对不起来,删除缓存分区的时候,缓存分区配置端会检查引用计数是否为0,如果不为0则表示缓存分区还在对卷进行加速,会限制不让删除,因为业务端可能还保存着缓存分区与卷的加速关系,从而会由于卷失效数据流程无法完成导致删除缓存分区失败。
可选的,在本实施例中,实现缓存分区的删除包括一个或者多个操作流程,比如:数据失效流程,删除任务发起流程,缓存分区回收流程等等。在每个操作流程执行的过程中对其运行状态进行检测,并根据不同的运行状态以及导致出现不同运行状态的原因针对性地对操作流程进行恢复,从而确保缓存分区能够顺利删除。
可选的,在本实施例中,当前操作流程的运行状态可以包括无法完成状态和能够完成状态,无法完成状态用于指示当前操作流程无法完成,能够完成状态用于指示当前操作流程能够完成,根据当前操作流程在执行时的执行参数和信息等来预测其是否能够完成,从而根据该判断来做出相应处理,保证缓存分区的顺利删除。
可选的,在本实施例中,可以但不限于根据当前操作流程执行过程中出现的错误或者故障来判断其是否能 够完成。比如:当前操作流程执行过程中没有出现错误或者故障,那么该当前操作流程可能是能够完成的。如果当前操作流程执行过程中出现了错误或者故障,那么有些错误或者故障可以自行修复,则认为该当前操作流程可能也是能够完成的。而对于那些无法自行修复的错误或者故障,则可以认为该当前操作流程可能是无法完成的。
在一个示例性实施例中,可以但不限于通过以下方式检测当前执行的当前操作流程的运行状态:检测在执行当前操作流程的过程中缓存分区是否发生故障;在检测到缓存分区发生故障的情况下,确定运行状态用于指示当前操作流程无法完成;在检测到缓存分区未发生故障的情况下,确定运行状态用于指示当前操作流程能够完成。
可选的,在本实施例中,可以但不限于通过对当前操作流程进行故障检测来确定其运行状态。上述故障可以但不限于包括HA(High Availability,高可用性)故障。如果存储节点中发生了HA故障,那么缓存分区就会需要重新创建,如果其重新创建成功会由于缓存分区配置端和缓存分区业务端保存的加速卷个数引用计数不一致导致操作流程无法完成,如果其重新创建失败会由于缓存分区已经不存在导致操作流程无法完成。
在上述步骤S204提供的技术方案中,目标场景可以但不限于用于指示导致当前操作流程无法完成的原因,比如:目标场景可以但不限于包括操作参数错误,缓存分区错误等等,操作参数错误表示由于操作参数不一致等原因导致的当前操作流程无法完成,缓存分区错误表示由于缓存分区不存在等原因导致的当前操作流程无法完成。
可选的,在本实施例中,目标场景可以但不限于根据出现故障后缓存分区是否重建成功来分析。
在一个示例性实施例中,可以但不限于通过以下方式检测导致当前操作流程无法完成的目标场景:确定导致当前操作流程无法完成的目标故障;检测发生目标故障后对缓存分区执行的重建操作的操作状态;根据操作状态确定目标场景。
可选的,在本实施例中,可以但不限于通过对出现目标故障后对缓存分区执行重建操作的操作状态来分析导致当前操作流程无法完成的目标场景。该目标故障可以但不限于是HA故障。比如:重建操作的操作状态可以但不限于包括成功和失败,如果操作状态为成功,那么目标场景可以为缓存分区重新创建成功但缓存分区配置端和缓存分区业务端保存的加速卷个数引用计数不一致导致操作流程无法完成。如果操作状态为成功,那么目标场景可以为缓存分区重新创建失败即缓存分区不存在导致操作流程无法完成。
在上述步骤S206提供的技术方案中,依据导致当前操作流程无法完成的目标场景可以对当前操作流程执行相应的恢复操作得到目标操作流程。恢复操作可以但不限于包括:流程的删除,修改,添加,以及流程中步骤的删除,修改,添加等等。从而保证执行该目标操作流程能够从目标场景所指示的缓存分区的目标分区状态开始继续实现缓存分区的删除。
在一个示例性实施例中,可以但不限于通过以下方式根据目标场景将当前操作流程恢复为目标操作流程:从当前操作流程所包括的一个或者多个操作步骤中提取允许在目标场景所指示的缓存分区的目标分区状态下执行的一个或者多个目标操作步骤;创建包括一个或者多个目标操作步骤的目标操作流程。
可选的,在本实施例中,每个操作流程可能会有一个或者多个操作步骤,每个操作步骤都会使得缓存分区达到删除过程中的某个中间状态,根据目标场景所指示的缓存分区的分区状态从一个或者多个操作步骤中提取出在缓存分区达到该目标分区状态后会执行的操作步骤,从而依据这些提取出来的一个或者多个目标操作步骤来创建目标操作流程,使得缓存分区能够继续沿着缓存分区当前的目标分区状态继续执行删除缓存分区的过程,从而确保缓存分区能够成功删除。
在一个示例性实施例中,可以但不限于通过以下方式从当前操作流程所包括的一个或者多个操作步骤中提取允许在目标场景所指示的缓存分区的目标分区状态下执行的一个或者多个目标操作步骤:从操作流程所包括的一个或者多个操作步骤中查找在缓存分区的分区状态达到目标分区状态后执行的操作步骤作为候选操作步骤;根据目标分区状态对候选操作步骤进行编辑,得到一个或者多个目标操作步骤。
可选的,在本实施例中,目标操作步骤的提取过程可以但不限于包括操作步骤的筛选和编辑两个阶段。首 先查找到在缓存分区的分区状态达到目标分区状态后执行的操作步骤作为候选操作步骤,再依据目标分区状态对候选操作步骤进行编辑,从而得到能够在目标分区状态下顺利执行的目标操作步骤。
在一个示例性实施例中,可以但不限于通过以下方式根据目标分区状态对候选操作步骤进行编辑,得到一个或者多个目标操作步骤:在目标分区状态用于指示缓存分区存在的情况下,在候选操作步骤之前添加操作参数恢复步骤,得到一个或者多个目标操作步骤,其中,操作参数恢复步骤用于恢复缓存分区配置端在目标操作流程中使用的操作参数;在目标分区状态用于指示缓存分区不存在的情况下,从候选操作步骤中筛除在缓存分区存在时执行的操作步骤,得到一个或者多个目标操作步骤。
可选的,在本实施例中,目标分区状态可以但不限于指示了缓存分区当前是否还存在。
可选的,在本实施例中,如果目标分区状态指示了缓存分区仍然存在,那么可以在候选操作步骤之前添加操作参数恢复步骤来恢复缓存分区配置端在目标操作流程中使用的操作参数,从而使得得到的目标操作步骤能够继续执行。
可选的,在本实施例中,如果目标分区状态指示了缓存分区已经不存在,那么从候选操作步骤中筛除在缓存分区存在时执行的操作步骤,得到一个或者多个目标操作步骤。在缓存分区存在时执行的操作步骤可以但不限于包括发起删除分区任务的步骤等等。
在一个示例性实施例中,可以但不限于通过以下方式创建包括一个或者多个目标操作步骤的目标操作流程:获取一个或者多个目标操作步骤的操作逻辑;按照操作逻辑连接一个或者多个目标操作步骤,得到目标操作流程。
可选的,在本实施例中,将一个或者多个目标操作步骤按照一定的操作逻辑连接,从而得到目标操作流程继续执行。
在一个示例性实施例中,可以但不限于通过以下方式根据目标场景将当前操作流程恢复为目标操作流程:获取具有对应关系的场景和参考操作流程,其中,参考操作流程用于在对应的场景下继续实现缓存分区的删除;从具有对应关系的场景和参考操作流程中查找目标场景对应的参考操作流程作为目标操作流程。
可选的,在本实施例中,不同场景下如何继续执行缓存分区的删除也可以是预先配置的,预先存储具有对应关系的场景和参考操作流程来定义出在不同的场景下如何继续实现缓存分区的删除,在检测出目标场景后,从具有对应关系的场景和参考操作流程中查找该目标场景对应的参考操作流程作为目标操作流程继续执行。
比如:发生HA故障但缓存分区成功重建的场景对应的参考操作流程可以是首先恢复操作参数,再以恢复后的操作参数继续删除缓存分区。发生HA故障但缓存分区重建失败的场景对应的参考操作流程可以是直接跳过删除缓存分区的过程直接对配置信息进行处理。
在一个示例性实施例中,在当前操作流程为数据失效流程的情况下,可以但不限于通过以下方式根据目标场景将当前操作流程恢复为目标操作流程:在目标场景用于指示缓存分区被重建并重建成功的情况下,确定目标操作流程包括数据失效参数恢复步骤和数据失效流程中的步骤,其中,数据失效参数恢复步骤用于恢复缓存分区配置端在数据失效流程中使用的数据失效参数;在目标场景用于指示缓存分区被重建但未重建成功的情况下,确定目标操作流程包括业务端通知步骤和业务配置处理步骤,其中,业务端通知步骤用于通知缓存分区的缓存分区业务端取消缓存分区与卷的对应关系,业务配置处理步骤用于清除缓存分区的业务配置。
可选的,在本实施例中,以当前操作流程为数据失效流程为例,如果目标场景为缓存分区被重建并重建成功,那么将数据失效参数恢复步骤和数据失效流程中的步骤作为目标操作流程继续执行,从而恢复缓存分区配置端在数据失效流程中使用的数据失效参数并继续进行数据失效过程;在目标场景为缓存分区被重建但未重建成功,则将包括业务端通知步骤和业务配置处理步骤作为目标操作流程继续执行,从而直接通知缓存分区的缓存分区业务端取消缓存分区与卷的对应关系,并跳过删除分区任务发起的过程清除缓存分区的业务配置。
在上述步骤S208提供的技术方案中,执行恢复出的目标操作流程,使得缓存分区的删除过程能够从目标场景所指示的缓存分区的目标分区状态开始继续执行,从而实现缓存分区的删除。
在一个示例性实施例中,可以但不限于通过以下方式执行目标操作流程:在一个或者多个目标操作步骤包 括操作参数恢复步骤和候选操作步骤的情况下,执行操作参数恢复步骤,其中,操作参数恢复步骤用于获取缓存分区业务端保存的目标操作参数作为缓存分区配置端在目标操作流程中使用的操作参数;使用目标操作参数执行候选操作步骤。
可选的,在本实施例中,如果在发生故障后缓存分区重建成功,则可以通过操作参数恢复步骤获取缓存分区业务端保存的目标操作参数作为缓存分区配置端在目标操作流程中使用的操作参数后继续执行当前操作流程中的候选操作步骤。
在一个示例性实施例中,可以但不限于通过以下方式执行目标操作流程:在目标操作流程包括数据失效参数恢复步骤和数据失效流程中的步骤的情况下,执行数据失效参数恢复步骤,得到目标数据失效参数;根据目标数据失效参数执行数据失效流程中的步骤。
可选的,在本实施例中,对于当前操作流程为数据失效流程的情况,可以通过执行数据失效参数恢复步骤得到目标数据失效参数,再根据目标数据失效参数继续执行数据失效流程中的步骤,从而实现缓存分区的删除。
在一个示例性实施例中,可以但不限于通过以下方式执行数据失效参数恢复步骤,得到目标数据失效参数:从缓存分区的缓存分区业务端获取缓存分区的数据失效参数;在获取到缓存分区业务端的数据失效参数的情况下,将缓存分区业务端的数据失效参数确定为目标数据失效参数。
可选的,在本实施例中,继续执行数据失效过程中使用的目标数据失效参数可以但不限于以缓存分区业务端记录的数据失效参数为准。
可选的,在本实施例中,可以但不限于通过向缓存分区业务端发送指令或者请求来获取缓存分区业务端记录的数据失效参数。或者,还可以但不限于通过执行与缓存分区业务端约定的交互流程来获取缓存分区业务端记录的数据失效参数。
在一个示例性实施例中,可以但不限于通过以下方式从缓存分区的缓存分区业务端获取缓存分区的数据失效参数:向缓存分区业务端发送第一引用计数,其中,第一引用计数是缓存分区配置端保存的加速卷个数的引用计数;接收缓存分区业务端根据第一引用计数返回的第二引用计数,其中,第二引用计数是缓存分区业务端保存的加速卷个数的引用计数,第二引用计数是在缓存分区业务端判断出第一引用计数不等于第二引用计数的情况下向缓存分区配置端发送的;在接收到第二引用计数的情况下,确定获取到缓存分区业务端的数据失效参数。
可选的,在本实施例中,首先将缓存分区配置端保存的加速卷个数的第一引用计数发送给缓存分区业务端,由缓存分区业务端对该第一引用计数与其本身保存的第二引用计数进行比对,确定二者是否一直,如果二者不一致,那么缓存分区业务端会将第二引用计数返回,接收到缓存分区业务端返回的第二引用计数即可将其作为目标数据失效参数再后续的数据失效过程中进行使用。
可选的,在本实施例中,在上述步骤S208之后,还可以但不限于在目标操作流程完成的情况下,执行一个或者多个操作流程中当前操作流程的下一个操作流程。
在一个可选的实施方式中,提供了一种删除缓存分区的过程,图3是根据本申请可选的实施方式的一种删除缓存分区过程的示意图,如图3所示,该过程包括如下步骤:
步骤S302,在删除存储节点中的缓存分区的过程中,检测数据失效流程的运行状态。如果检测到数据失效流程的运行状态指示了数据失效流程无法完成,则执行步骤S304。如果检测到数据失效流程的运行状态指示了数据失效流程能够完成,则继续进行删除存储节点中的缓存分区的操作。
步骤S304,检测导致数据失效流程无法完成的目标场景。如果是在发生HA故障后重建缓存分区成功,则执行步骤S306至步骤S310。如果是在发生HA故障后重建缓存分区失败,则执行步骤S312至步骤S314。
步骤S306,向缓存分区业务端发送第一引用计数。
步骤S308,接收缓存分区业务端根据第一引用计数返回的第二引用计数。
步骤S310,将第二引用计数确定为上述目标数据失效参数,并使用该目标数据失效参数继续执行数据失效 流程中的步骤。
步骤S312,通知缓存分区的缓存分区业务端取消缓存分区与卷的对应关系。
步骤S314,跳过删除分区任务的发起,直接清除缓存分区的业务配置。
通过上述过程,如果因为失效数据无法完成导致无法删除缓存分区,则首先区分出来是哪种场景导致的数据失效无法完成,对于不同的场景发起不同的删除分区处理。从而确保在不同的场景下均能够完成缓存分区的删除。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个非易失性可读存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例上述的方法。
在本实施例中还提供了一种存储节点,图4是根据本申请实施例的一种存储节点的示意图一,如图4所示,该存储节点包括:缓存分区配置端42和缓存分区业务端44,其中,
缓存分区配置端42,用于在删除存储节点中的缓存分区的过程中,检测当前执行的当前操作流程的运行状态,其中,实现缓存分区的删除包括一个或者多个操作流程,一个或者多个操作流程包括当前操作流程;在检测到运行状态用于指示当前操作流程无法完成的情况下,检测导致当前操作流程无法完成的目标场景;根据目标场景将当前操作流程恢复为目标操作流程除;执行目标操作流程,其中,目标操作流程用于从目标场景所指示的缓存分区的目标分区状态开始继续实现缓存分区的删除;
缓存分区业务端44,用于在缓存分区配置端执行目标操作流程的过程中执行缓存分区配置端下发的指令。
通过上述设备,实现缓存分区的删除包括一个或者多个操作流程,在删除存储节点中的缓存分区的过程中,对于每个当前执行的当前操作流程的运行状态进行实时检测,如果发现当前操作流程无法完成,则检测导致其无法完成的原因作为目标场景,依据该目标场景对当前操作流程进行恢复,得到目标操作流程,执行该目标操作流程使得缓存分区的删除能够从目标场景所指示的待被删除的缓存分区的目标分区状态开始继续执行,从而顺利实现缓存分区的删除。因此,可以解决删除存储节点中的缓存分区时的成功率较低问题,达到提高删除存储节点中的缓存分区时的成功率效果。
在一个示例性实施例中,缓存分区配置端,还用于:从当前操作流程所包括的一个或者多个操作步骤中提取允许在目标场景所指示的缓存分区的目标分区状态下执行的一个或者多个目标操作步骤;创建包括一个或者多个目标操作步骤的目标操作流程。
在一个示例性实施例中,缓存分区配置端,还用于:从操作流程所包括的一个或者多个操作步骤中查找在缓存分区的分区状态达到目标分区状态后执行的操作步骤作为候选操作步骤;根据目标分区状态对候选操作步骤进行编辑,得到一个或者多个目标操作步骤。
在一个示例性实施例中,缓存分区配置端,还用于:在目标分区状态用于指示缓存分区存在的情况下,在候选操作步骤之前添加操作参数恢复步骤,得到一个或者多个目标操作步骤,其中,操作参数恢复步骤用于恢复缓存分区配置端在目标操作流程中使用的操作参数;在目标分区状态用于指示缓存分区不存在的情况下,从候选操作步骤中筛除在缓存分区存在时执行的操作步骤,得到一个或者多个目标操作步骤。
在一个示例性实施例中,图5是根据本申请实施例的一种存储节点的示意图二,如图5所示,缓存分区配置端42,用于在目标操作流程包括操作参数恢复步骤的情况下,执行操作参数恢复步骤,其中,操作参数恢复步骤用于获取缓存分区业务端保存的目标操作参数作为缓存分区配置端在目标操作流程中使用的操作参数;使用目标操作参数继续执行目标操作流程;
缓存分区业务端44,用于向缓存分区配置端提供目标操作参数。
在一个示例性实施例中,缓存分区配置端,还用于:获取一个或者多个目标操作步骤的操作逻辑;按照操作逻辑连接一个或者多个目标操作步骤,得到目标操作流程。
在一个示例性实施例中,缓存分区配置端,还用于:获取具有对应关系的场景和参考操作流程,其中,参考操作流程用于在对应的场景下继续实现缓存分区的删除;从具有对应关系的场景和参考操作流程中查找目标场景对应的参考操作流程作为目标操作流程。
在一个示例性实施例中,图6是根据本申请实施例的一种存储节点的示意图三,如图6所示,在当前操作流程为数据失效流程的情况下:缓存分区配置端42,用于:在目标场景用于指示缓存分区被重建并重建成功的情况下,确定目标操作流程包括数据失效参数恢复步骤和数据失效流程中的步骤,其中,数据失效参数恢复步骤用于恢复缓存分区配置端在数据失效流程中使用的数据失效参数;执行数据失效参数恢复步骤,得到目标数据失效参数;根据目标数据失效参数执行数据失效流程中的步骤;缓存分区业务端44,用于为缓存分区配置端提供目标数据失效参数。
在一个示例性实施例中,缓存分区配置端,还用于:在目标场景用于指示缓存分区被重建但未重建成功的情况下,确定目标操作流程包括业务端通知步骤和业务配置处理步骤,其中,业务端通知步骤用于通知缓存分区的缓存分区业务端取消缓存分区与卷的对应关系,业务配置处理步骤用于清除缓存分区的业务配置。
在一个示例性实施例中,图7是根据本申请实施例的一种存储节点的示意图四,如图7所示,缓存分区配置端42,用于向缓存分区业务端发送第一引用计数,其中,第一引用计数是缓存分区配置端保存的加速卷个数的引用计数;接收缓存分区业务端根据第一引用计数返回的第二引用计数,其中,第二引用计数是缓存分区业务端保存的加速卷个数的引用计数;在接收到第二引用计数的情况下,将第二引用计数确定为目标数据失效参数;
缓存分区业务端44,用于接收缓存分区配置端发送的第一引用计数;判断第一引用计数与第二引用计数是否相等;在判断出第一引用计数不等于第二引用计数的情况下,向缓存分区配置端发送第二引用计数。
在一个示例性实施例中,缓存分区配置端,还用于:检测在执行当前操作流程的过程中缓存分区是否发生故障;在检测到缓存分区发生故障的情况下,确定运行状态用于指示当前操作流程无法完成;在检测到缓存分区未发生故障的情况下,确定运行状态用于指示当前操作流程能够完成。
在一个示例性实施例中,缓存分区配置端,还用于:确定导致当前操作流程无法完成的目标故障;检测发生目标故障后对缓存分区执行的重建操作的操作状态;根据操作状态确定目标场景。
在本申请的一个可选实施例中,提出了一种存储节点解决失效数据流程无法完成导致删除缓存分区失败的处理机制。在删除缓存分区的时候,先判断失效数据流程无法完成的场景,如果是缓存分区命中的数据较多,失效对应加速卷数据的时候耗时较长,导致在失效加速卷数据的过程中,发生了HA故障,一种场景可能是在故障后缓存分区重建成功,但由于故障使得缓存分区业务端无法将卷数据失效完成的引用计数减一发送到缓存分区配置端,导致缓存分区配置端和缓存分区业务端保存的加速卷个数的引用计数对不上;另一种场景可能是缓存分区在出现HA故障的时候,没能正确的重新创建回来,由于分区未创建出来,缓存分区业务端无法发起失效加速卷数据的流程。
如果是在故障后缓存分区重建成功,可以增加缓存分区配置端和缓存分区业务端交互机制,在删除分区的时候,缓存分区配置端将其保存的加速卷个数的第一引用计数发送到缓存分区业务端,缓存分区业务端收到消息后,跟其保持的加速卷的第二引用计数对比,如果不相同,就将缓存分区业务端的第二引用计数发给缓存分区配置端。
如果是在故障后因为缓存分区未创建出来导致的失效数据流程无法完成,在删除缓存的时候,缓存分区配置端向缓存分区业务端发送消息,确认缓存分区是否成功创建,如果没有的话,则无需失效数据,缓存分区配置端发送消息将缓存分区业务端的缓存分区和卷对应关系取消,缓存分区配置端不发起删除分区任务,缓存分区配置端自己处理掉业务配置。
在本实施例中还提供了一种存储节点中存储资源的控制装置,该装置用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并 被构想的。
图8是根据本申请实施例的存储节点中存储资源的控制装置的结构框图,如图8所示,该装置包括:
第一检测模块82,用于在删除存储节点中的缓存分区的过程中,检测当前执行的当前操作流程的运行状态,其中,实现上述缓存分区的删除包括一个或者多个操作流程,上述一个或者多个操作流程包括上述当前操作流程;
第二检测模块84,用于在检测到上述运行状态用于指示上述当前操作流程无法完成的情况下,检测导致上述当前操作流程无法完成的目标场景;
恢复模块86,用于根据上述目标场景将上述当前操作流程恢复为目标操作流程;
执行模块88,用于执行上述目标操作流程,其中,上述目标操作流程用于从上述目标场景所指示的上述缓存分区的目标分区状态开始继续实现上述缓存分区的删除。
通过上述装置,实现缓存分区的删除包括一个或者多个操作流程,在删除存储节点中的缓存分区的过程中,对于每个当前执行的当前操作流程的运行状态进行实时检测,如果发现当前操作流程无法完成,则检测导致其无法完成的原因作为目标场景,依据该目标场景对当前操作流程进行恢复,得到目标操作流程,执行该目标操作流程使得缓存分区的删除能够从目标场景所指示的待被删除的缓存分区的目标分区状态开始继续执行,从而顺利实现缓存分区的删除。因此,可以解决删除存储节点中的缓存分区时的成功率较低问题,达到提高删除存储节点中的缓存分区时的成功率效果。
在一个示例性实施例中,上述恢复模块,包括:
提取单元,用于从上述当前操作流程所包括的一个或者多个操作步骤中提取允许在上述目标场景所指示的上述缓存分区的目标分区状态下执行的一个或者多个目标操作步骤;
创建单元,用于创建包括上述一个或者多个目标操作步骤的上述目标操作流程。
在一个示例性实施例中,上述提取单元,用于:
从上述操作流程所包括的一个或者多个操作步骤中查找在上述缓存分区的分区状态达到上述目标分区状态后执行的操作步骤作为候选操作步骤;
根据上述目标分区状态对上述候选操作步骤进行编辑,得到上述一个或者多个目标操作步骤。
在一个示例性实施例中,上述提取单元,用于:
在上述目标分区状态用于指示上述缓存分区存在的情况下,在上述候选操作步骤之前添加操作参数恢复步骤,得到上述一个或者多个目标操作步骤,其中,上述操作参数恢复步骤用于恢复缓存分区配置端在上述目标操作流程中使用的操作参数;
在上述目标分区状态用于指示上述缓存分区不存在的情况下,从上述候选操作步骤中筛除在上述缓存分区存在时执行的操作步骤,得到上述一个或者多个目标操作步骤。
在一个示例性实施例中,上述执行模块,包括:
第一执行单元,用于在上述一个或者多个目标操作步骤包括上述操作参数恢复步骤和上述候选操作步骤的情况下,执行上述操作参数恢复步骤,其中,上述操作参数恢复步骤用于获取缓存分区业务端保存的目标操作参数作为上述缓存分区配置端在上述目标操作流程中使用的操作参数;
第二执行单元,用于使用上述目标操作参数执行上述候选操作步骤。
在一个示例性实施例中,上述创建单元,用于:
获取上述一个或者多个目标操作步骤的操作逻辑;
按照上述操作逻辑连接上述一个或者多个目标操作步骤,得到上述目标操作流程。
在一个示例性实施例中,上述恢复模块,包括:
获取单元,用于获取具有对应关系的场景和参考操作流程,其中,上述参考操作流程用于在对应的场景下继续实现上述缓存分区的删除;
查找单元,用于从上述具有对应关系的场景和参考操作流程中查找上述目标场景对应的参考操作流程作为 上述目标操作流程。
在一个示例性实施例中,在上述当前操作流程为数据失效流程的情况下,上述恢复模块,包括:
第一确定单元,用于在上述目标场景用于指示上述缓存分区被重建并重建成功的情况下,确定上述目标操作流程包括数据失效参数恢复步骤和上述数据失效流程中的步骤,其中,上述数据失效参数恢复步骤用于恢复缓存分区配置端在上述数据失效流程中使用的数据失效参数;
第二确定单元,用于在上述目标场景用于指示上述缓存分区被重建但未重建成功的情况下,确定上述目标操作流程包括业务端通知步骤和业务配置处理步骤,其中,上述业务端通知步骤用于通知上述缓存分区的缓存分区业务端取消上述缓存分区与卷的对应关系,上述业务配置处理步骤用于清除上述缓存分区的业务配置。
在一个示例性实施例中,上述执行模块,包括:
第三执行单元,用于在上述目标操作流程包括上述数据失效参数恢复步骤和上述数据失效流程中的步骤的情况下,执行上述数据失效参数恢复步骤,得到目标数据失效参数;
第四执行单元,用于根据上述目标数据失效参数执行上述数据失效流程中的步骤。
在一个示例性实施例中,上述第三执行单元,用于:
从上述缓存分区的缓存分区业务端获取上述缓存分区的数据失效参数;
在获取到上述缓存分区业务端的数据失效参数的情况下,将上述缓存分区业务端的数据失效参数确定为上述目标数据失效参数。
在一个示例性实施例中,上述第三执行单元,用于:
向上述缓存分区业务端发送第一引用计数,其中,上述第一引用计数是上述缓存分区配置端保存的加速卷个数的引用计数;
接收上述缓存分区业务端根据上述第一引用计数返回的第二引用计数,其中,上述第二引用计数是上述缓存分区业务端保存的加速卷个数的引用计数,上述第二引用计数是在上述缓存分区业务端判断出上述第一引用计数不等于上述第二引用计数的情况下向上述缓存分区配置端发送的;
在接收到上述第二引用计数的情况下,确定获取到上述缓存分区业务端的数据失效参数。
在一个示例性实施例中,上述第一检测模块,用于:
检测在执行上述当前操作流程的过程中上述缓存分区是否发生故障;
在检测到上述缓存分区发生故障的情况下,确定上述运行状态用于指示上述当前操作流程无法完成;
在检测到上述缓存分区未发生故障的情况下,确定上述运行状态用于指示上述当前操作流程能够完成。
在一个示例性实施例中,上述第二检测模块,用于:
确定导致上述当前操作流程无法完成的目标故障;
检测发生上述目标故障后对上述缓存分区执行的重建操作的操作状态;
根据上述操作状态确定上述目标场景。
需要说明的是,上述各个模块是可以通过软件或硬件来实现的,对于后者,可以通过以下方式实现,但不限于此:上述模块均位于同一处理器中;或者,上述各个模块以任意组合的形式分别位于不同的处理器中。
本申请的实施例还提供了一种非易失性可读存储介质,该非易失性可读存储介质中存储有计算机程序,其中,该计算机程序被设置为运行时执行上述任一项方法实施例中的步骤。
在一个示例性实施例中,上述非易失性可读存储介质可以包括但不限于:U盘、只读存储器(Read Only Memory,简称为ROM)、随机存取存储器(Random Access Memory,简称为RAM)、移动硬盘、磁碟或者光盘等各种可以存储计算机程序的介质。
本申请的实施例还提供了一种电子设备,包括存储器和处理器,该存储器中存储有计算机程序,该处理器被设置为运行计算机程序以执行上述任一项方法实施例中的步骤。
在一个示例性实施例中,上述电子设备还可以包括传输设备以及输入输出设备,其中,该传输设备和上述处理器连接,该输入输出设备和上述处理器连接。
本实施例中的可选示例可以参考上述实施例及示例性实施方式中所描述的示例,本实施例在此不再赘述。
显然,本领域的技术人员应该明白,上述的本申请的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本申请不限制于任何特定的硬件和软件结合。
以上上述仅为本申请的优选实施例而已,并不用于限制本申请,对于本领域的技术人员来说,本申请可以有各种更改和变化。凡在本申请的原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。

Claims (20)

  1. 一种存储节点中存储资源的控制方法,其特征在于,包括:
    在删除存储节点中的缓存分区的过程中,检测当前执行的当前操作流程的运行状态,其中,实现所述缓存分区的删除包括一个或者多个操作流程,所述一个或者多个操作流程包括所述当前操作流程;
    在检测到所述运行状态用于指示所述当前操作流程无法完成的情况下,检测导致所述当前操作流程无法完成的目标场景;
    根据所述目标场景将所述当前操作流程恢复为目标操作流程;
    执行所述目标操作流程,其中,所述目标操作流程用于从所述目标场景所指示的所述缓存分区的目标分区状态开始继续实现所述缓存分区的删除。
  2. 根据权利要求1所述的方法,其特征在于,所述根据所述目标场景将所述当前操作流程恢复为目标操作流程,包括:
    从所述当前操作流程所包括的一个或者多个操作步骤中提取允许在所述目标场景所指示的所述缓存分区的目标分区状态下执行的一个或者多个目标操作步骤;
    创建包括所述一个或者多个目标操作步骤的所述目标操作流程。
  3. 根据权利要求2所述的方法,其特征在于,所述从所述当前操作流程所包括的一个或者多个操作步骤中提取允许在所述目标场景所指示的所述缓存分区的目标分区状态下执行的一个或者多个目标操作步骤,包括:
    从所述操作流程所包括的一个或者多个操作步骤中查找在所述缓存分区的分区状态达到所述目标分区状态后执行的操作步骤作为候选操作步骤;
    根据所述目标分区状态对所述候选操作步骤进行编辑,得到所述一个或者多个目标操作步骤。
  4. 根据权利要求3所述的方法,其特征在于,所述根据所述目标分区状态对所述候选操作步骤进行编辑,得到所述一个或者多个目标操作步骤,包括:
    在所述目标分区状态用于指示所述缓存分区存在的情况下,在所述候选操作步骤之前添加操作参数恢复步骤,得到所述一个或者多个目标操作步骤,其中,所述操作参数恢复步骤用于恢复缓存分区配置端在所述目标操作流程中使用的操作参数;
    在所述目标分区状态用于指示所述缓存分区不存在的情况下,从所述候选操作步骤中筛除在所述缓存分区存在时执行的操作步骤,得到所述一个或者多个目标操作步骤。
  5. 根据权利要求4所述的方法,其特征在于,所述执行所述目标操作流程,包括:
    在所述一个或者多个目标操作步骤包括所述操作参数恢复步骤和所述候选操作步骤的情况下,执行所述操作参数恢复步骤,其中,所述操作参数恢复步骤用于获取缓存分区业务端保存的目标操作参数作为所述缓存分区配置端在所述目标操作流程中使用的操作参数;
    使用所述目标操作参数执行所述候选操作步骤。
  6. 根据权利要求2所述的方法,其特征在于,所述创建包括所述一个或者多个目标操作步骤的所述目标操作流程,包括:
    获取所述一个或者多个目标操作步骤的操作逻辑;
    按照所述操作逻辑连接所述一个或者多个目标操作步骤,得到所述目标操作流程。
  7. 根据权利要求1所述的方法,其特征在于,所述根据所述目标场景将所述当前操作流程恢复为目标操作流程,包括:
    获取具有对应关系的场景和参考操作流程,其中,所述参考操作流程用于在对应的场景下继续实现所述缓存分区的删除;
    从所述具有对应关系的场景和参考操作流程中查找所述目标场景对应的参考操作流程作为所述目标操作流程。
  8. 根据权利要求1所述的方法,其特征在于,在所述当前操作流程为数据失效流程的情况下,所述根据所述目标场景将所述当前操作流程恢复为目标操作流程,包括:
    在所述目标场景用于指示所述缓存分区被重建并重建成功的情况下,确定所述目标操作流程包括数据失效参数恢复步骤和所述数据失效流程中的步骤,其中,所述数据失效参数恢复步骤用于恢复缓存分区配置端在所述数据失效流程中使用的数据失效参数;
    在所述目标场景用于指示所述缓存分区被重建但未重建成功的情况下,确定所述目标操作流程包括业务端通知步骤和业务配置处理步骤,其中,所述业务端通知步骤用于通知所述缓存分区的缓存分区业务端取消所述缓存分区与卷的对应关系,所述业务配置处理步骤用于清除所述缓存分区的业务配置。
  9. 根据权利要求8所述的方法,其特征在于,所述执行所述目标操作流程,包括:
    在所述目标操作流程包括所述数据失效参数恢复步骤和所述数据失效流程中的步骤的情况下,执行所述数据失效参数恢复步骤,得到目标数据失效参数;
    根据所述目标数据失效参数执行所述数据失效流程中的步骤。
  10. 根据权利要求9所述的方法,其特征在于,所述执行所述数据失效参数恢复步骤,得到目标数据失效参数,包括:
    从所述缓存分区的缓存分区业务端获取所述缓存分区的数据失效参数;
    在获取到所述缓存分区业务端的数据失效参数的情况下,将所述缓存分区业务端的数据失效参数确定为所述目标数据失效参数。
  11. 根据权利要求10所述的方法,其特征在于,所述从所述缓存分区的缓存分区业务端获取所述缓存分区的数据失效参数,包括:
    向所述缓存分区业务端发送第一引用计数,其中,所述第一引用计数是所述缓存分区配置端保存的加速卷个数的引用计数;
    接收所述缓存分区业务端根据所述第一引用计数返回的第二引用计数,其中,所述第二引用计数是所述缓存分区业务端保存的加速卷个数的引用计数,所述第二引用计数是在所述缓存分区业务端判断出所述第一引用计数不等于所述第二引用计数的情况下向所述缓存分区配置端发送的;
    在接收到所述第二引用计数的情况下,确定获取到所述缓存分区业务端的数据失效参数。
  12. 根据权利要求1所述的方法,其特征在于,所述检测当前执行的当前操作流程的运行状态,包括:
    检测在执行所述当前操作流程的过程中所述缓存分区是否发生故障;
    在检测到所述缓存分区发生故障的情况下,确定所述运行状态用于指示所述当前操作流程无法完成;
    在检测到所述缓存分区未发生故障的情况下,确定所述运行状态用于指示所述当前操作流程能够完成。
  13. 根据权利要求1所述的方法,其特征在于,所述检测导致所述当前操作流程无法完成的目标场景,包括:
    确定导致所述当前操作流程无法完成的目标故障;
    检测发生所述目标故障后对所述缓存分区执行的重建操作的操作状态;
    根据所述操作状态确定所述目标场景。
  14. 一种存储节点,其特征在于,包括:缓存分区配置端和缓存分区业务端,其中,
    所述缓存分区配置端,用于在删除存储节点中的缓存分区的过程中,检测当前执行的当前操作流程的运行状态,其中,实现所述缓存分区的删除包括一个或者多个操作流程,所述一个或者多个操作流程包括所述当前操作流程;在检测到所述运行状态用于指示所述当前操作流程无法完成的情况下,检测导致所述当前操作流程无法完成的目标场景;根据所述目标场景将所述当前操作流程恢复为目标操作流程;执行所 述目标操作流程,其中,所述目标操作流程用于从所述目标场景所指示的所述缓存分区的目标分区状态开始继续实现所述缓存分区的删除;
    所述缓存分区业务端,用于在所述缓存分区配置端执行所述目标操作流程的过程中执行所述缓存分区配置端下发的指令。
  15. 根据权利要求14所述的存储节点,其特征在于,
    所述缓存分区配置端,用于在目标操作流程包括操作参数恢复步骤的情况下,执行所述操作参数恢复步骤,其中,所述操作参数恢复步骤用于获取所述缓存分区业务端保存的目标操作参数作为所述缓存分区配置端在所述目标操作流程中使用的操作参数;使用所述目标操作参数继续执行所述目标操作流程;
    所述缓存分区业务端,用于向所述缓存分区配置端提供所述目标操作参数。
  16. 根据权利要求14所述的存储节点,其特征在于,在所述当前操作流程为数据失效流程的情况下:
    所述缓存分区配置端,用于:在所述目标场景用于指示所述缓存分区被重建并重建成功的情况下,确定所述目标操作流程包括数据失效参数恢复步骤和所述数据失效流程中的步骤,其中,所述数据失效参数恢复步骤用于恢复缓存分区配置端在所述数据失效流程中使用的数据失效参数;执行所述数据失效参数恢复步骤,得到目标数据失效参数;根据所述目标数据失效参数执行所述数据失效流程中的步骤;
    所述缓存分区业务端,用于为所述缓存分区配置端提供所述目标数据失效参数。
  17. 根据权利要求16所述的存储节点,其特征在于,
    所述缓存分区配置端,用于向所述缓存分区业务端发送第一引用计数,其中,所述第一引用计数是所述缓存分区配置端保存的加速卷个数的引用计数;接收所述缓存分区业务端根据所述第一引用计数返回的第二引用计数,其中,所述第二引用计数是所述缓存分区业务端保存的加速卷个数的引用计数;在接收到所述第二引用计数的情况下,将所述第二引用计数确定为所述目标数据失效参数;
    所述缓存分区业务端,用于接收所述缓存分区配置端发送的所述第一引用计数;判断所述第一引用计数与所述第二引用计数是否相等;在判断出所述第一引用计数不等于所述第二引用计数的情况下,向所述缓存分区配置端发送所述第二引用计数。
  18. 一种存储节点中存储资源的控制装置,其特征在于,包括:
    第一检测模块,用于在删除存储节点中的缓存分区的过程中,检测当前执行的当前操作流程的运行状态,其中,实现所述缓存分区的删除包括一个或者多个操作流程,所述一个或者多个操作流程包括所述当前操作流程;
    第二检测模块,用于在检测到所述运行状态用于指示所述当前操作流程无法完成的情况下,检测导致所述当前操作流程无法完成的目标场景;
    恢复模块,用于根据所述目标场景将所述当前操作流程恢复为目标操作流程;
    执行模块,用于执行所述目标操作流程,其中,所述目标操作流程用于从所述目标场景所指示的所述缓存分区的目标分区状态开始继续实现所述缓存分区的删除。
  19. 一种非易失性可读存储介质,其特征在于,所述非易失性可读存储介质中存储有计算机程序,其中,所述计算机程序被处理器执行时实现所述权利要求1至13任一项中所述的方法的步骤。
  20. 一种电子设备,包括存储器、处理器以及存储在所述存储器上并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现所述权利要求1至13任一项中所述的方法的步骤。
PCT/CN2023/081163 2022-11-30 2023-03-13 存储节点中存储资源的控制方法和装置,以及存储节点 WO2024113534A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211519717.8A CN115599310B (zh) 2022-11-30 2022-11-30 存储节点中存储资源的控制方法、装置以及存储节点
CN202211519717.8 2022-11-30

Publications (1)

Publication Number Publication Date
WO2024113534A1 true WO2024113534A1 (zh) 2024-06-06

Family

ID=84853562

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/081163 WO2024113534A1 (zh) 2022-11-30 2023-03-13 存储节点中存储资源的控制方法和装置,以及存储节点

Country Status (2)

Country Link
CN (1) CN115599310B (zh)
WO (1) WO2024113534A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115599310B (zh) * 2022-11-30 2023-03-24 苏州浪潮智能科技有限公司 存储节点中存储资源的控制方法、装置以及存储节点

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150033063A1 (en) * 2013-07-24 2015-01-29 Netapp, Inc. Storage failure processing in a shared storage architecture
CN111966609A (zh) * 2020-07-29 2020-11-20 苏州浪潮智能科技有限公司 一种ssd缓存分区创建的方法、系统、设备、产品
CN113703669A (zh) * 2021-07-16 2021-11-26 苏州浪潮智能科技有限公司 一种缓存分区的管理方法、系统、设备及存储介质
CN114090637A (zh) * 2021-11-29 2022-02-25 平安科技(深圳)有限公司 数据存取方法、装置、设备及存储介质
CN115599310A (zh) * 2022-11-30 2023-01-13 苏州浪潮智能科技有限公司(Cn) 存储节点中存储资源的控制方法、装置以及存储节点

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107885457B (zh) * 2016-09-30 2020-08-07 华为技术有限公司 一种固态硬盘ssd、存储装置及数据存储方法
CN111324415A (zh) * 2019-10-28 2020-06-23 烽火通信科技股份有限公司 一种虚拟机镜像缓存创建方法、系统及计算机可读介质
CN112487037A (zh) * 2020-12-08 2021-03-12 平安国际智慧城市科技股份有限公司 缓存数据的处理方法、装置、计算机设备及存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150033063A1 (en) * 2013-07-24 2015-01-29 Netapp, Inc. Storage failure processing in a shared storage architecture
CN111966609A (zh) * 2020-07-29 2020-11-20 苏州浪潮智能科技有限公司 一种ssd缓存分区创建的方法、系统、设备、产品
CN113703669A (zh) * 2021-07-16 2021-11-26 苏州浪潮智能科技有限公司 一种缓存分区的管理方法、系统、设备及存储介质
CN114090637A (zh) * 2021-11-29 2022-02-25 平安科技(深圳)有限公司 数据存取方法、装置、设备及存储介质
CN115599310A (zh) * 2022-11-30 2023-01-13 苏州浪潮智能科技有限公司(Cn) 存储节点中存储资源的控制方法、装置以及存储节点

Also Published As

Publication number Publication date
CN115599310B (zh) 2023-03-24
CN115599310A (zh) 2023-01-13

Similar Documents

Publication Publication Date Title
JP2017517060A (ja) 障害処理方法、関連装置、およびコンピュータ
CN109325016B (zh) 数据迁移方法、装置、介质及电子设备
CN105824846B (zh) 数据迁移方法及装置
WO2024113534A1 (zh) 存储节点中存储资源的控制方法和装置,以及存储节点
CN109189608A (zh) 一种保证复制事务一致性的方法以及相应的复制装置
EP3474143B1 (en) Method and apparatus for incremental recovery of data
CN108776579B (zh) 一种分布式存储集群扩容方法、装置、设备及存储介质
CN108958965B (zh) 一种bmc监控可恢复ecc错误的方法、装置及设备
CN111342986B (zh) 分布式节点管理方法及装置、分布式系统、存储介质
CN109558209B (zh) 一种用于虚拟机的监控方法
CN108664255B (zh) 一种软件升级方法及装置
CN111475335B (zh) 一种数据库快速恢复的方法、系统、终端及存储介质
WO2020094063A1 (zh) 存储数据的方法、装置、存储介质及电子装置
CN111880947A (zh) 一种数据传输方法及装置
CN116633766A (zh) 故障处理方法、装置、电子设备及存储介质
CN111984473B (zh) 一种内存快照数据获取方法及相关装置
CN115168236A (zh) 自动化测试方法及电子设备、存储介质
CN105790975A (zh) 一种业务处理操作的执行方法及装置
CN112463444A (zh) 一种数据不一致修复方法及相关装置
CN110908821A (zh) 任务失败管理的方法、装置、设备和存储介质
CN114625702A (zh) 数据的存储方法、装置、系统及电子设备
CN105069078A (zh) 一种处理增量索引合并失败的方法及装置
CN110647526B (zh) 批量数据处理方法、装置、计算机设备及存储介质
CN111381994B (zh) 一种镜像坏层修复方法、装置、设备和介质
CN116382850B (zh) 一种利用多存储心跳检测的虚拟机高可用管理装置及系统