WO2024119786A1 - 一种数据缓存方法、装置、设备和存储介质 - Google Patents

一种数据缓存方法、装置、设备和存储介质 Download PDF

Info

Publication number
WO2024119786A1
WO2024119786A1 PCT/CN2023/103138 CN2023103138W WO2024119786A1 WO 2024119786 A1 WO2024119786 A1 WO 2024119786A1 CN 2023103138 W CN2023103138 W CN 2023103138W WO 2024119786 A1 WO2024119786 A1 WO 2024119786A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
mirror pair
transition
nodes
redundant
Prior art date
Legal status (The legal status 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 status listed.)
Ceased
Application number
PCT/CN2023/103138
Other languages
English (en)
French (fr)
Inventor
刘文志
王永刚
王见
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Metabrain Intelligent Technology Co Ltd
Original Assignee
Suzhou Metabrain Intelligent Technology Co Ltd
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 Suzhou Metabrain Intelligent Technology Co Ltd filed Critical Suzhou Metabrain Intelligent Technology Co Ltd
Priority to US18/875,283 priority Critical patent/US12367143B2/en
Publication of WO2024119786A1 publication Critical patent/WO2024119786A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0806Multiuser, multiprocessor or multiprocessing cache systems
    • G06F12/0808Multiuser, multiprocessor or multiprocessing cache systems with cache invalidating means
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0866Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches for peripheral storage systems, e.g. disk cache
    • G06F12/0868Data transfer between cache memory and other subsystems, e.g. storage devices or host systems
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/20Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
    • G06F11/2053Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where persistent mass storage functionality or persistent mass storage control functionality is redundant
    • G06F11/2056Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where persistent mass storage functionality or persistent mass storage control functionality is redundant by mirroring
    • G06F11/2058Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where persistent mass storage functionality or persistent mass storage control functionality is redundant by mirroring using more than 2 mirrored copies
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/20Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
    • G06F11/2053Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where persistent mass storage functionality or persistent mass storage control functionality is redundant
    • G06F11/2056Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where persistent mass storage functionality or persistent mass storage control functionality is redundant by mirroring
    • G06F11/2071Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where persistent mass storage functionality or persistent mass storage control functionality is redundant by mirroring using a plurality of controllers
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0806Multiuser, multiprocessor or multiprocessing cache systems
    • G06F12/0842Multiuser, multiprocessor or multiprocessing cache systems for multiprocessing or multitasking
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/28Using a specific disk cache architecture
    • G06F2212/285Redundant cache memory
    • G06F2212/286Mirrored cache memory
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/60Details of cache memory

Definitions

  • the present application relates to the technical field of computer data storage, and in particular to a data caching method, device, equipment and storage medium.
  • a four-controller storage system refers to a storage system with four controllers in one chassis. Each controller can be regarded as a node. Data can be saved and backed up in the four nodes in the chassis according to needs and specific scenarios, which improves the performance and data security of the storage system.
  • the four-controller storage system mainly caches data in the form of mirror pairs. When one of the controllers fails, the mirror node corresponding to each node can be found again in a circular mirroring manner, thereby ensuring that the storage system can operate normally and the data is intact when nodes fail one after another.
  • the node When the failed node returns to normal, the node confirms the new mirror pair teaming method according to the cluster, and designates an original surviving node to initiate the cache data re-mirroring process to the node. Since the node needs to exit a node and abandon the data corresponding to the node when re-teaming, it is easy to cause data confusion and loss in this process, and the data security cannot be guaranteed.
  • the present application provides a data caching method, apparatus, device and storage medium, which can restore the normal operation of the node in a timely manner, avoid data loss, and improve the security of cached data.
  • a data caching method is provided.
  • the method is applied to a multi-controller storage system.
  • the multi-controller storage system includes multiple controllers, each controller is a node, and the method includes:
  • the failure node In response to the failure node returning to normal, the failure node is added to the reorganized mirror pair according to the mirror pair where the failure node was originally located, to obtain a transition mirror pair, which is used for continuing data mirroring between other nodes when one of the nodes in the mirror pair fails during the cache data re-mirroring process; the master node in the transition mirror pair initiates a cache data re-mirroring operation process to the failure node;
  • the redundant node in the transition mirror pair is deleted to switch the transition mirror pair back to the initial mirror pair for data caching
  • the reorganized mirror pair is a mirror pair obtained by reorganizing the mirror pair originally located by the failed node after the failed node exits and based on the surviving nodes reorganizing each other;
  • the initial mirror pair is a mirror pair obtained by reorganizing all nodes in pairs before the failed node exits.
  • adding the faulty node to the reorganized mirror pair to obtain a transitional mirror pair includes:
  • adding a failed node to a target mirror pair in a reorganized mirror pair to obtain a transition mirror pair includes:
  • the master node of the target mirror pair in the reorganized mirror pair is used as a new master node to add the failed node to obtain a transition mirror pair.
  • the transition mirror pair includes two surviving nodes and one failed node, and each node in the transition mirror pair is provided with two opposite-end nodes;
  • another surviving node is the preferred peer node, and the failed node is the backup peer node;
  • the surviving node that is the master node among the two surviving nodes is the preferred peer node, and the other surviving node is the standby peer node.
  • the candidate counterpart node of each node in the transition mirror pair is set to an invalid value.
  • deleting the redundant nodes in the transition mirror pair includes: determining the redundant nodes in the transition mirror pair according to the mirror pair corresponding to the transition mirror pair in the initial mirror pair;
  • the method further includes:
  • a cache data discarding process is performed on the redundant node to delete the cache data corresponding to the redundant node in the transition mirror pair.
  • the method further includes:
  • the current master node is determined according to the identity information of the sudden fault node
  • a first operation flow to be subsequently executed is determined.
  • the identity information includes the identity of the master node
  • the first operation process includes a cache data discarding process and a cache data re-image operation process
  • determining the current master node according to the identity information of the sudden failure node includes:
  • the surviving node that is a non-master node is determined as the current master node
  • a first operation flow to be subsequently executed is determined, including:
  • the current master node re-initiates the cache data re-mirroring operation process to the failed node.
  • the identity information includes the identity of a surviving node of a non-master node; and determining the current master node according to the identity information of the sudden failure node includes:
  • the master node in the transition mirror pair is determined as the current master node
  • a first operation flow to be subsequently executed is determined, including:
  • the identity information includes the identity of the faulty node, and the first operation process includes a host input and output process; determining the current master node according to the identity information of the sudden faulty node includes:
  • the master node in the transition mirror pair is determined as the current master node
  • a first operation flow to be subsequently executed is determined, including:
  • the method further includes:
  • the preferred peer nodes of the remaining two nodes in the transition mirror pair are updated, and the alternative peer nodes are set to invalid values.
  • the method further includes:
  • a second operation process to be performed subsequently is determined according to the node type of the sudden fault node.
  • the node type includes a redundant node; and according to the node type of the sudden failure node, determining a second operation flow to be performed subsequently includes:
  • the nodes in the transition mirror pair do not perform any operation process.
  • the node type includes a non-redundant node in a transition mirror pair; and according to the node type of the sudden failure node, determining a second operation flow to be performed subsequently includes:
  • the redundant node and the other non-redundant node in the transition mirror pair are reassembled into a current mirror pair;
  • the non-redundant node in the current mirror pair is the master node
  • the redundant node is the slave node
  • the multi-controller storage system is a four-controller storage system.
  • a data cache device is provided, the device is arranged in a multi-controller storage system, the multi-controller storage system includes a plurality of controllers, each controller is a node, and the device includes:
  • An adding module for, in response to the failure node returning to normal, adding the failure node to the reorganized mirror pair according to the mirror pair where the failure node was originally located, to obtain a transition mirror pair, for use in the case where one of the nodes in the mirror pair fails during the cache data re-mirroring process, while the other nodes continue to mirror data;
  • An initiating module used for the master node in the transition mirror pair to initiate a cache data re-mirroring operation process to the failed node;
  • a deletion module configured to delete the redundant node in the transition mirror pair based on the initial mirror pair in response to the master node in the transition mirror pair completing the re-mirroring of the cached data to the failed node, so as to switch the transition mirror pair back to the initial mirror pair for data caching;
  • the reorganized mirror pair is a mirror pair obtained by reorganizing the mirror pair originally located by the failed node after the failed node exits and based on the surviving nodes reorganizing each other;
  • the initial mirror pair is a mirror pair obtained by reorganizing all nodes pairwise before the failed node exits.
  • a computer device comprising:
  • the memory stores computer instructions that can be executed by at least one processor, and the computer instructions are executed by at least one processor to enable the at least one processor to execute the method involved in the first aspect above.
  • a non-volatile computer-readable storage medium on which computer instructions are stored, characterized in that the computer instructions are used to enable a computer to execute the method involved in the above-mentioned first aspect.
  • the failure node in response to the failure node returning to normal, the failure node is added to the reorganized mirror pair to obtain a transition mirror pair.
  • the reorganized mirror pair is a mirror pair obtained by reorganizing the surviving nodes in pairs after the failure node exits.
  • the master node in the transition mirror pair initiates a cache data re-mirroring operation process to the failure node.
  • the redundant nodes in the transition mirror pair are deleted based on the initial mirror pair to switch the transition mirror pair back to the initial mirror pair for data caching.
  • the initial mirror pair is a mirror pair obtained by reorganizing all nodes in pairs before the failure node exits.
  • the failure node returns to normal, the number of nodes in the reorganized mirror pair is increased from two to three.
  • the situation where only a single node remains in the mirror pair when the node is reorganized is avoided. Even if a node fails and exits during the cache data re-mirroring process, the other two nodes can still perform data mirroring to avoid data confusion and loss, thereby ensuring the security of cached data.
  • FIG1 is a diagram of an application environment of a data caching method in some embodiments.
  • FIG2 is a schematic diagram of a flow chart of a data caching method in some embodiments.
  • FIG3 is a block diagram of a data cache device in some embodiments.
  • FIG. 4 is a schematic structural diagram of a computer device in some embodiments.
  • the data caching method provided by the present application can be applied to the system architecture shown in Figure 1.
  • the terminal 102 communicates with the server 104 through the network through the network.
  • the storage system in the terminal 102 receives the teaming method sent by the server 104, and adds the failure node to the reorganized mirror pair according to the teaming method to obtain a transition mirror pair, and the reorganized mirror pair is a mirror pair obtained by reorganizing the surviving nodes after the failure node exits.
  • the master node in the transition mirror pair initiates a cache data re-image operation process to the failure node.
  • the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers and portable wearable devices, and the server 104 can be implemented with an independent server or a server cluster consisting of multiple servers.
  • FIG2 is a flow chart of a data caching method provided in an embodiment of the present application, which can be executed by the terminal 102 in the system shown in FIG1. As shown in FIG2, the method is applied to a multi-controller storage system and can include the following steps:
  • the failed node is a node that exits due to a fault
  • the reorganized mirror pair is a mirror pair obtained by reorganizing two by two surviving nodes after the failed node exits.
  • a multi-controller storage system refers to a system including multiple controllers, for example, it may include 3, 4, 5, etc. controllers, where each controller is a node.
  • the storage system includes four controllers, namely node 0, node 1, node 2, and node 3. They can form an initial mirror pair, including four mirror pairs, namely (0,1)(1,2)(2,3)(3,0).
  • the mirror pair including the failed node needs to be reorganized.
  • node 0 exits due to a failure.
  • the original mirror pairs (0,1) and (3,0) need to be reorganized.
  • the reorganized mirror pairs become (1,2)(1,2)(2,3) and (3,1).
  • (1,2)(1,2)(2,3) and (3,1) are reorganized mirror pairs, and node 1, node 2 and node 3 are surviving nodes.
  • the four mirror pairs in the final reorganized mirror pair need to be restored to (0,1)(1,2)(2,3)(3,0). Since the cache data re-mirroring process needs to be executed when the node recovers, if the reorganized mirror pair is directly switched back to the initial mirror pair, for example, for the first mirror pair, (1,2) is switched back to (0,1), the corresponding process is to abandon the data of the mirror pair on node 2 and mirror the data from node 1 to node 0. At this time, since the cache data re-mirroring process takes a certain amount of time, if node 1 fails and exits during this period, it will cause temporary loss of the mirror pair data, and eventually lead to suspension of business.
  • the failed node is added to the reorganized mirror pair to obtain a transition mirror pair.
  • the transition mirror pair includes a mirror pair consisting of 3 nodes, which can be expressed as (1,2,0)(3,1,0). The existence of the transition mirror pair can ensure that the data can be backed up normally even if a node exits due to a failure during the cache data re-mirroring operation process, thereby improving data security.
  • the master node in the transition mirror pair initiates a cache data re-mirroring operation process to the failed node.
  • the master node in the transition mirror pair is consistent with the master node in the reorganized mirror pair.
  • the master node of the reorganized mirror pair (1,2) is node 1
  • the master node of the transition mirror pair (1,2,0) is also node 1. Only the master node can initiate the cache data re-mirroring operation process, and the newly added faulty node can only passively receive it.
  • the master node in the transition mirror pair initiates a cache data re-mirroring operation process to the failed node to achieve data backup and avoid data loss when switching to the initial mirror pair.
  • the initial mirror pair is a mirror pair obtained by reorganizing all nodes in pairs before the failed node exits.
  • a four-controller storage can be composed of (0,1)(1,2)(2,3)(3,0).
  • the redundant node is the extra node of the mirror pair including three nodes in the transition mirror pair relative to the corresponding mirror pair in the initial mirror pair.
  • the transition mirror pair is compared with the initial mirror pair to determine the redundant node, and the redundant node in the transition mirror pair is deleted to switch back to the mirror pair before the multi-controller storage system fails to cache data, that is, the transition mirror pair is switched back to the initial mirror pair so that the host input and output system can cache data to the multi-controller storage system normally.
  • the embodiment of the present application increases the number of nodes in the reorganized mirror pair from two to three by adding the failed node to the reorganized mirror pair in response to the failed node returning to normal, thereby obtaining a transition mirror pair, thereby avoiding the situation where only a single node remains in the mirror pair when the nodes are reorganized.
  • the master node in the transition mirror pair initiates a cache data re-mirroring operation process to the failed node. After the master node in the transition mirror pair completes the cache data re-mirroring to the failed node, based on the initial mirror pair, the redundant nodes in the transition mirror pair are deleted to switch back to the mirror pair before the multi-control storage system failed to cache data.
  • the other node when restoring to the initial mirror pair, even if a node fails and exits during the cache data re-mirroring process, the other node can still be used.
  • the other two nodes can also perform data mirroring to avoid data confusion and loss, ensuring the security of cached data.
  • S210 may include:
  • the target mirror pair is the mirror pair that the failed node rejoins after recovery.
  • the master node of the target mirror pair in the reorganized mirror pair is used as a new master node to add the failed node to obtain a transition mirror pair.
  • the master node identity of the target mirror pair in the reorganized mirror pair is kept unchanged, and the failed node is added to the target mirror pair as a newly joined node to obtain a transition mirror pair.
  • the transition mirror pair includes two surviving nodes and one failed node, and each node in the transition mirror pair is provided with two peer nodes.
  • the surviving node is the node remaining after the failed node exits in the multi-controller storage system.
  • the relationship established between one node and another node is called a peer, and the other node is a peer node.
  • each node establishes a peer relationship with the other two nodes, so each node is set with two peer nodes, which can be represented as partnerNode0 and partnerNode1.
  • partnerNode0 can represent the preferred peer node
  • partnerNode1 can represent the alternative peer node.
  • the importance of the preferred peer node is greater than that of the alternative peer node.
  • the newly joined node does not have the ability to receive cached data from the host input and output system, its importance as a peer node is lower than that of a surviving node.
  • the surviving node as a master node can initiate a cache data re-mirroring operation process to the newly joined node. Therefore, the surviving node as a master node is more important as a peer node than an ordinary surviving node.
  • the other surviving node is the preferred peer node, and the failed node is the backup peer node.
  • the surviving node that is the master node of the two surviving nodes is the preferred peer node, and the other surviving node is the backup peer node.
  • the candidate opposite-end node of each node in the mirror pair is set to an invalid value.
  • the transition mirror pair includes 3 nodes, and the mirror pair before the multi-controller storage system fails includes 2 nodes.
  • these 2 nodes are each other's peer nodes, that is, each node has only one peer node. In this case, there is no need for a standby peer node, and it is set to an invalid value.
  • the bit value of the standby peer node can be set to 0 or 1, which can be set according to the actual situation.
  • S230 may include:
  • the mirror pair corresponding to the transition mirror pair in the initial mirror pair is the mirror pair of the reorganized mirror pair in the initial mirror pair before the failed node is added to form the transition mirror pair.
  • the transition mirror pair is (1,2,0)
  • the reorganized mirror pair before the failed node is added is (1,2).
  • (1,2) is obtained by reorganizing (0,1) in the initial mirror pair.
  • (0,1) is the mirror pair corresponding to the transition mirror pair in the initial mirror pair.
  • the transition mirror pair (1,2,0) the mirror pair corresponding to the transition mirror pair in the initial mirror pair is (0,1), then node 2 is a redundant node, delete node 2 in the transition mirror pair (1,2,0), and get (1,0).
  • the master node of the mirror pair After deleting the redundant node, the master node of the mirror pair must be consistent with the master node of the mirror pair corresponding to the transition mirror pair in the initial mirror pair, and each node is restored to a single peer node, and the alternative peer node is set to an invalid value.
  • the method further includes:
  • a cache data discarding process is performed on the redundant node to delete the cache data corresponding to the redundant node in the transition mirror pair.
  • the cache data discard process is a process for deleting node cache data. Since the master node in the transition mirror pair has mirrored the cache data corresponding to the redundant node after completing the cache data re-mirroring operation process of the failed node, after the redundant node is deleted, the mirror pair after the redundant node is deleted no longer needs to save the cache data corresponding to the redundant node.
  • the cache data discard process is executed on the redundant node, and the cache data corresponding to the redundant node in the transition mirror pair is deleted, which can increase the cache space and improve the system's operating performance.
  • the method further includes:
  • the current master node is determined according to the identity information of the sudden fault node
  • a first operation flow to be subsequently executed is determined.
  • the sudden failure node is a node that suddenly fails during the process of the master node in the transition mirror pair performing a cache data re-mirroring operation on the failed node.
  • the first operation process includes a cache data discarding process, a cache data re-mirroring operation process, and a host input and output process.
  • the current master node is the master node in the transition mirror pair after the sudden failure.
  • the sudden fault node may be a surviving node or a faulty node. If it is a surviving node, it is necessary to further determine whether the sudden fault node is a master node. Therefore, the identity information of the sudden fault node may include the master node identity, the surviving node identity of the non-master node, and the faulty node identity. According to the identity information of the sudden fault node, the current master node is determined to determine at least one of the first operation processes to be executed subsequently.
  • a surviving node that is a non-master node is determined as the current master node
  • the current master node re-initiates the cache data re-mirroring operation process to the failed node.
  • the node with sudden failure is the master node, the remaining two nodes in the transition mirror pair will be reorganized into a new mirror pair, and the surviving node that is a non-master node will be determined as the current master node.
  • the original master node suddenly fails, resulting in the master node not re-mirroring all cached data to the failed node.
  • the current master node needs to re-initiate the cached data re-mirroring operation process for the failed node.
  • the cached data discarding process is first performed on the failed node before the current master node re-initiates the cached data re-mirroring operation process on the failed node to clear the cached data when the sudden failure node performs the cached data re-mirroring operation process on the failed node.
  • the master node in the transition mirror pair is determined as the current master node
  • the sudden failure node when the sudden failure node is a surviving node of a non-master node, the remaining two nodes in the transition mirror pair are reorganized into a new mirror pair, and the original master node in the transition mirror pair is still the current master node. Since the initiating node and receiving node of the cache data re-mirroring operation process have not changed, the current master node only needs to identify the process progress of the cache data re-mirroring operation process before the sudden failure node appears, find the place where the process is paused, and continue to complete the process.
  • the master node in the transition mirror pair is determined as the current master node
  • the master node in the transition mirror pair no longer needs to re-mirror cached data to the faulty node. There is no node in the transition mirror pair that receives cached data. The remaining two nodes in the transition mirror pair are reorganized into a new mirror pair, and the original master node in the transition mirror pair is still the current master node. Execute the host input and output process and restore the normal business process so that the host can cache data to the multi-controller storage system.
  • the method further includes: after determining the current master node, updating the preferred counterpart nodes of the remaining two nodes in the transition mirror pair, and setting the candidate counterpart nodes to invalid values.
  • the remaining two nodes in the transition mirror pair are each other's peer nodes, and are each other's preferred peer nodes. There is no alternative peer node, and it is set to an invalid value.
  • the method further includes: when there is a sudden fault node in the cache data discarding process for the redundant node, determining a second operation process to be executed subsequently according to the node type of the sudden fault node.
  • the node types include redundant nodes and non-redundant nodes in a transition mirror pair, and the second operation process may be not executing any operation process, or may be initiating a cache data discard process or a cache data re-mirroring operation process.
  • the nodes in the transition mirror pair do not execute any operation process.
  • the transition mirror pair When the sudden failure node is a redundant node, even if the node in the transition mirror pair initiates the cache data discard process again, the redundant node cannot execute it, and the redundant node is no longer in the transition mirror pair, which will not affect the normal operation of the multi-controller storage system. Therefore, the transition mirror pair The nodes in the process do not execute any operation process, which is regarded as the forced completion of the discarding of the redundant node cache data.
  • the redundant node and another non-redundant node in the transition mirror pair are reassembled into a current mirror pair;
  • the sudden failure node is one of the non-redundant nodes in the transition mirror pair, it indicates that the initial mirror pair switched back by the transition mirror pair has only one node left, and the cached data cannot be backed up.
  • a new node needs to be added to form a new mirror pair, that is, the current mirror pair.
  • the cached data corresponding to the failed node and the master node are the same, and the failed node also has the ability to initiate any process from the master node. Therefore, when any of the two non-redundant nodes in the transition mirror pair fails, the other non-redundant node can serve as the master node of the current mirror pair, and the redundant node is the slave node.
  • the cache data discarding process is executed on the redundant node to continue the cache data discarding process before the sudden failure node occurs, and the cache data previously mirrored by the redundant node is cleared.
  • the redundant node completes the cache data discarding process
  • the other non-redundant node in the transition mirror pair initiates the cache data re-mirroring operation process to the redundant node to realize the backup of the cache data and ensure the normal operation of the current mirror pair.
  • the cache data method provided in the present application can not only realize the single-node recovery of the multi-controller storage system, but also set up corresponding processing procedures in the recovery process, for example, in the cache data re-mirroring operation process and the cache data discarding process under the superimposed node failure event scenario, so as to safely, timely and effectively realize the processing of complex scenarios in the multi-controller storage node recovery process, avoid data security risks to the multi-controller storage system due to the superposition of multiple events, and further improve the security of cache data in the multi-controller storage system.
  • 2 may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with at least a part of other steps or sub-steps or stages of other steps.
  • FIG3 is a schematic diagram of the structure of a data cache device provided in an embodiment of the present application.
  • the device can be set in the terminal 102 in the system shown in FIG1 to execute the method flow shown in FIG2.
  • the device may include: an adding module 310, an initiating module 320 and a deleting module 330, and may further include: an executing module, a determining module and an updating module.
  • the main functions of each component module are as follows:
  • An adding module 310 is used for adding the failed node to the reorganized mirror pair according to the mirror pair where the failed node was originally located in response to the failed node returning to normal, so as to obtain a transition mirror pair;
  • An initiating module 320 configured for the master node in the transition mirror pair to initiate a cache data re-mirroring operation process to the failed node;
  • the deletion module 330 is used for deleting the redundant node in the transition mirror pair in response to the master node in the transition mirror pair completing the re-mirroring of the cached data to the failed node, based on the initial mirror pair, so as to switch the transition mirror pair back to the initial mirror pair for data caching,
  • the reorganized mirror pair is a mirror pair obtained by reorganizing the surviving nodes in pairs after the failed node exits;
  • the initial mirror pair is a mirror pair obtained by reorganizing all nodes in pairs before the failed node exits.
  • a module 310 is added, which is specifically used to: determine the target mirror pair to be reorganized when the failed node exits according to the reorganized mirror pair;
  • the adding module 310 is specifically used to: add the failed node with the master node of the target mirror pair in the reorganized mirror pair as a new master node to obtain a transitional mirror pair.
  • the transition mirror pair includes two surviving nodes and one failed node, and each node in the transition mirror pair is provided with two peer nodes;
  • another surviving node is the preferred peer node, and the failed node is the backup peer node;
  • the surviving node that is the master node among the two surviving nodes is the preferred peer node, and the other surviving node is the standby peer node.
  • the candidate opposite-end node of each node in the mirror pair is set to an invalid value.
  • the deletion module 330 is specifically used to: determine the redundant nodes in the transition mirror pair according to the mirror pair corresponding to the transition mirror pair in the initial mirror pair;
  • the device further includes an execution module for: after deleting the redundant node in the transition mirror pair, executing a cache data discarding process on the redundant node to delete the cache data corresponding to the redundant node in the transition mirror pair.
  • the device further includes a determination module, which is used to: when there is a sudden failure node during the process of the master node in the transition mirror pair performing a cache data re-mirroring operation on the failure node, determine the current master node according to the identity information of the sudden failure node;
  • a first operation flow to be subsequently executed is determined.
  • the identity information includes the master node identity
  • the first operation process includes a cache data discard process and a cache data re-image operation process
  • the determination module is specifically used to: when the sudden failure node is the master node identity, determine the surviving node as a non-master node as the current master node;
  • the current master node re-initiates the cache data re-mirroring operation process to the failed node.
  • the identity information includes the surviving node identity of the non-master node; the determination module is specifically used to: when the sudden failure node is the surviving node identity of the non-master node, determine the master node in the transition mirror pair as the current master node;
  • the identity information includes the identity of the faulty node, and the first operation process includes the host input and output process; the determination module is specifically used to: when the sudden faulty node is the faulty node identity, determine the master node in the transition mirror pair as the current master node;
  • the device further includes an updating module, which is used to: after determining the current master node, update the preferred counterpart nodes of the remaining two nodes in the transition mirror pair, and set the candidate counterpart nodes to invalid values.
  • an updating module which is used to: after determining the current master node, update the preferred counterpart nodes of the remaining two nodes in the transition mirror pair, and set the candidate counterpart nodes to invalid values.
  • the determination module is further used to: when there is a sudden fault node in the cache data discarding process for the redundant node, determine the second operation process to be performed subsequently according to the node type of the sudden fault node.
  • the node type includes a redundant node; the determination module is specifically used to: when the sudden failure node is a redundant node, the nodes in the transition mirror pair do not execute any operation process.
  • the node type includes a non-redundant node in a transition mirror pair;
  • the determination module is specifically used to: when the sudden failure node is one of the non-redundant nodes in the transition mirror pair, re-form the redundant node and another non-redundant node in the transition mirror pair into a current mirror pair;
  • the non-redundant node in the current mirror pair is the master node, and the redundant node is the slave node.
  • the multi-controller storage system is a four-controller storage system.
  • user-specific personal data can be used in the scheme described in this article within the scope permitted by applicable laws and regulations, provided that the applicable laws and regulations of the country are met (for example, the user's explicit consent, effective notification to the user, and the user's explicit authorization, etc.).
  • the present application also provides a computer device and a non-volatile computer-readable storage medium.
  • FIG. 4 it is a block diagram of a computer device according to an embodiment of the present application.
  • the computer device is intended to represent various forms of digital computers or mobile devices.
  • the digital computer may include a desktop computer, a portable computer, a workbench, a personal digital assistant, a server, a mainframe computer, and other suitable computers.
  • the mobile device may include a tablet computer, a smart phone, a wearable device, etc.
  • the device 400 includes a computing unit 401, a ROM 402, a RAM 403, a bus 404, and an input/output (I/O) interface 405.
  • the computing unit 401, the ROM 402, and the RAM 403 are connected to each other through the bus 404.
  • the input/output (I/O) interface 405 is also connected to the bus 404.
  • the computing unit 401 can perform various processes in the method embodiment of the present application according to the computer instructions stored in the read-only memory (ROM) 402 or the computer instructions loaded from the storage unit 408 to the random access memory (RAM) 403.
  • the computing unit 401 can be various general and/or special processing components with processing and computing capabilities.
  • the computing unit 401 may include, but is not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc.
  • the method provided in the embodiment of the present application can be implemented as a computer software program, which is tangibly contained in a non-volatile computer-readable storage medium, such as a storage unit 408.
  • RAM 403 may also store various programs and data required for the operation of system 400. Part or all of a computer program may be loaded and/or installed onto device 400 via ROM 802 and/or communication unit 409.
  • the input unit 406, output unit 407, storage unit 408 and communication unit 409 in the device 400 can be connected to the I/O interface 405.
  • the input unit 406 can be, for example, a keyboard, a mouse, a touch screen, a microphone, etc.
  • the output unit 407 can be, for example, a display, a speaker, an indicator light, etc.
  • the device 400 can exchange information, data, etc. with other devices through the communication unit 409.
  • the device may also include other components necessary for normal operation, or may only include components necessary for implementing the solution of the present application, rather than all the components shown in the figure.
  • Various implementations of the systems and techniques described herein can be realized in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof.
  • FPGAs field programmable gate arrays
  • ASICs application specific integrated circuits
  • ASSPs application specific standard products
  • SOCs system on a chip
  • CPLDs load programmable logic devices
  • the computer instructions for implementing the method of the present application can be written in any combination of one or more programming languages. These computer instructions can be provided to the computing unit 401, so that when the computer instructions are executed by the computing unit 401 such as a processor, the steps involved in the method embodiment of the present application are executed.
  • the non-volatile computer-readable storage medium provided in the present application may be a tangible medium that may contain or store computer instructions for executing the various steps involved in the method embodiments of the present application.
  • the non-volatile computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, and other forms of storage media.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Memory System Of A Hierarchy Structure (AREA)
  • Hardware Redundancy (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

一种数据缓存方法,方法包括:响应于故障节点恢复正常,根据故障节点最初所在的镜像对向重组镜像对添加故障节点,得到过渡镜像对,以用于在缓存数据重镜像过程中,当镜像对的其中一个节点故障时,其他节点之间继续进行数据镜像;过渡镜像对中的主节点向故障节点发起缓存数据重镜像操作流程;响应于过渡镜像对中的主节点完成向故障节点缓存数据重镜像,基于初始镜像对,删除过渡镜像对中的冗余节点,将过渡镜像对切换回初始镜像对以进行数据缓存。

Description

一种数据缓存方法、装置、设备和存储介质
本申请要求于2022年12月06日提交中国专利局,申请号为202211553153.X,发明名称为“一种数据缓存方法、装置、设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机数据存储技术领域,特别是涉及一种数据缓存方法、装置、设备和存储介质。
背景技术
四控存储系统指一个机框中包含四个控制器的存储系统,每个控制器可视为一个节点,数据可以根据需要及具体场景在机框中的四个节点中进行保存与备份,提高了存储系统的性能与数据安全性。四控存储系统主要采用镜像对的方式缓存数据,当其中一个控制器故障后,可以继续按照循环镜像方式重新找到每个节点对应的镜像节点,从而保证节点依次故障时存储系统可以正常运行且数据完整。
当故障节点恢复正常时,该节点根据集群确认新的镜像对组队方式,并指定一个原来存活的节点向该节点发起缓存数据重镜像流程。由于节点在重新组队时需要退出一个节点,并放弃该节点对应的数据,在此过程中容易造成数据混乱和丢失,无法保障数据的安全性。
发明内容
基于此,本申请提供了一种数据缓存方法、装置、设备和存储介质,能够及时恢复节点的正常运行,避免数据丢失,提高缓存数据的安全性。
第一方面,提供一种数据缓存方法,该方法应用于多控存储系统,多控存储系统包括多个控制器,每个控制器为一个节点,该方法包括:
响应于故障节点恢复正常,根据故障节点最初所在的镜像对向重组镜像对添加所述故障节点,得到过渡镜像对,以用于在缓存数据重镜像过程中镜像对的其中一个节点故障,其他节点之间继续进行数据镜像;过渡镜像对中的主节点向故障节点发起缓存数据重镜像操作流程;
响应于过渡镜像对中的主节点完成向故障节点缓存数据重镜像,基于初始镜像对,删除过渡镜像对中的冗余节点,以将过渡镜像对切换回初始镜像对进行数据缓存,
其中,重组镜像对为故障节点退出后因重组所述故障节点最初所在的镜像对而基于存活节点两两重组得到的镜像对;
初始镜像对为故障节点退出前基于全部节点两两重组得到的镜像对。
根据本申请实施例中一种可实现的方式,响应于故障节点恢复正常,向重组镜像对添加故障节点,得到过渡镜像对,包括:
根据故障节点最初所在的镜像对确定故障节点退出时进行重组的目标镜像对;
向重组镜像对中的目标镜像对添加故障节点,得到过渡镜像对。
根据本申请实施例中一种可实现的方式,向重组镜像对中的目标镜像对添加故障节点,得到过渡镜像对,包括:
以重组镜像对中的目标镜像对的主节点作为新的主节点添加故障节点,得到过渡镜像对。
根据本申请实施例中一种可实现的方式,过渡镜像对包括两个存活节点和一个故障节点,过渡镜像对中的每个节点设置有2个对端节点;
在存活节点的对端节点中,另一个存活节点为首选对端节点,故障节点为备选对端节点;
在故障节点的对端节点中,两个存活节点中作为主节点的存活节点为首选对端节点,另一个存活节点为备选对端节点。
根据本申请实施例中一种可实现的方式,当过渡镜像对切换回多控存储系统故障前的镜像对时,过渡镜像对中的每个节点的备选对端节点设置为无效值。
根据本申请实施例中一种可实现的方式,基于初始镜像对,删除过渡镜像对中的冗余节点,包括:根据过渡镜像对在初始镜像对中对应的镜像对,确定过渡镜像对中的冗余节点;
删除过渡镜像对中的冗余节点。
根据本申请实施例中一种可实现的方式,该方法还包括:
在删除过渡镜像对中的冗余节点之后,对冗余节点执行缓存数据丢弃流程,以删除冗余节点在过渡镜像对中对应的缓存数据。
根据本申请实施例中一种可实现的方式,该方法还包括:
在过渡镜像对中的主节点向故障节点进行缓存数据重镜像操作过程中存在突发故障节点时,根据突发故障节点的身份信息,确定当前主节点;
基于当前主节点,确定后续执行的第一操作流程。
根据本申请实施例中一种可实现的方式,身份信息包括主节点身份,第一操作流程包括缓存数据丢弃流程和缓存数据重镜像操作流程;根据突发故障节点的身份信息,确定当前主节点,包括:
当突发故障节点为主节点身份时,将作为非主节点的存活节点确定为当前主节点;
基于当前主节点,确定后续执行的第一操作流程,包括:
对故障节点执行缓存数据丢弃流程,以清除突发故障节点对故障节点执行缓存数据重镜像操作流程时缓存的数据;
当前主节点向故障节点重新发起缓存数据重镜像操作流程。
根据本申请实施例中一种可实现的方式,身份信息包括非主节点的存活节点身份;根据突发故障节点的身份信息,确定当前主节点,包括:
当突发故障节点为非主节点的存活节点身份时,将过渡镜像对中的主节点确定为当前主节点;
基于当前主节点,确定后续执行的第一操作流程,包括:
当前主节点识别突发故障节点出现前的缓存数据重镜像操作流程的流程进度;
根据流程进度,继续执行突发故障节点出现前的缓存数据重镜像操作流程。
根据本申请实施例中一种可实现的方式,身份信息包括故障节点身份,第一操作流程包括主机输入输出流程;根据突发故障节点的身份信息,确定当前主节点,包括:
当突发故障节点为故障节点身份时,将过渡镜像对中的主节点确定为当前主节点;
基于当前主节点,确定后续执行的第一操作流程,包括:
执行主机输入输出流程,以使得主机正常向多控存储系统缓存数据。
根据本申请实施例中一种可实现的方式,该方法还包括:
在确定当前主节点之后,更新过渡镜像对中剩余两个节点的首选对端节点,并将备选对端节点设置为无效值。
根据本申请实施例中一种可实现的方式,该方法还包括:
在对冗余节点执行缓存数据丢弃流程中存在突发故障节点时,根据突发故障节点的节点类型,确定后续执行的第二操作流程。
根据本申请实施例中一种可实现的方式,节点类型包括冗余节点;根据突发故障节点的节点类型,确定后续执行的第二操作流程,包括:
当突发故障节点为冗余节点时,过渡镜像对中的节点不执行任何操作流程。
根据本申请实施例中一种可实现的方式,节点类型包括过渡镜像对中的非冗余节点;根据突发故障节点的节点类型,确定后续执行的第二操作流程,包括:
当突发故障节点为过渡镜像对中的非冗余节点的其中一个时,将冗余节点和过渡镜像对中另一个非冗余节点重新组成当前镜像对;
对冗余节点执行缓存数据丢弃流程,以继续突发故障节点出现前进行的缓存数据丢弃流程;
当冗余节点执行完缓存数据丢弃流程时,过渡镜像对中另一个非冗余节向冗余节点发起缓存数据重镜像操作流程,以实现缓存数据的备份。
根据本申请实施例中一种可实现的方式,当前镜像对中的非冗余节点为主节点,冗余节点为从节点。
根据本申请实施例中一种可实现的方式,多控存储系统为四控存储系统。
第二方面,提供了一种数据缓存装置,装置设置于多控存储系统,多控存储系统包括多个控制器,每个控制器为一个节点,该装置包括:
添加模块,用于响应于故障节点恢复正常,根据故障节点最初所在的镜像对向重组镜像对添加所述故障节点,得到过渡镜像对,以用于在缓存数据重镜像过程中镜像对的其中一个节点故障,其他节点之间继续进行数据镜像;
发起模块,用于过渡镜像对中的主节点向故障节点发起缓存数据重镜像操作流程;
删除模块,用于响应于过渡镜像对中的主节点完成向故障节点缓存数据重镜像,基于初始镜像对,删除过渡镜像对中的冗余节点,以将过渡镜像对切换回初始镜像对进行数据缓存;
其中,重组镜像对为故障节点退出后因重组所述故障节点最初所在的镜像对而基于存活节点两两重组得到的镜像对;
初始镜像对为故障节点退出前基于全部节点两两重组得到的镜像对。
第三方面,提供了一种计算机设备,包括:
至少一个处理器;以及
与至少一个处理器通信连接的存储器;其中,
存储器存储有可被至少一个处理器执行的计算机指令,计算机指令被至少一个处理器执行,以使至少一个处理器能够执行上述第一方面中涉及的方法。
第四方面,提供了一种非易失性计算机可读存储介质,其上存储有计算机指令,其特征在于,计算机指令用于使计算机执行上述第一方面中涉及的方法。
根据本申请实施例所提供的技术内容,通过响应于故障节点恢复正常,向重组镜像对添加故障节点,得到过渡镜像对,重组镜像对为故障节点退出后基于存活节点两两重组得到的镜像对,过渡镜像对中的主节点向故障节点发起缓存数据重镜像操作流程,在过渡镜像对中的主节点完成向故障节点缓存数据重镜像后,基于初始镜像对,删除过渡镜像对中的冗余节点,以将过渡镜像对切换回初始镜像对进行数据缓存,初始镜像对为故障节点退出前基于全部节点两两重组得到的镜像对。在故障节点恢复正常时,将重组镜像对中节点数量由两个增加为三个,在恢复至初始镜像对时,避免了重组节点时镜像对中仅存单个节点的情况,即使在缓存数据重镜像过程中某个节点故障退出,另外两个节点还可以进行数据镜像,以免数据混乱和丢失,保障缓存数据的安全性。
附图说明
图1为一些实施例中数据缓存方法的应用环境图;
图2为一些实施例中数据缓存方法的流程示意图;
图3为一些实施例中数据缓存装置的结构框图;
图4为一些实施例中计算机设备的示意性结构图。
具体实施方式
以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
为了方便理解,首先对本申请所适用的系统进行描述。本申请提供的数据缓存方法,可以应用于如图1所示的系统架构中。其中,终端102中通过网络与服务器104通过网络进行通信。响应于故障节点恢复正常,终端102中的存储系统接收服务器104发送来的组队方式,并根据组队方式向重组镜像对添加故障节点,得到过渡镜像对,重组镜像对为故障节点退出后基于存活节点两两重组得到的镜像对。过渡镜像对中的主节点向故障节点发起缓存数据重镜像操作流程。在过渡镜像对中的主节点完成向故障节点缓存数据重镜像后,基于初始镜像对,删除过渡镜像对中的冗余节点,以切换回多控存储系统故障前的镜像对进行数据缓存,初始镜像对为故障节点退出前基于全部节点两两重组得到的镜像对。其中,终端102可以但不限于是各种个人计算机、笔记本电脑、智能手机、平板电脑和便携式可穿戴设备,服务器104可以用独立的服务器或者是多个服务器组成的服务器集群来实现。
图2为本申请实施例提供的一种数据缓存方法的流程图,该方法可以由如图1所示系统中的终端102执行。如图2所示,该方法应用于多控存储系统,可以包括以下步骤:
S210,响应于故障节点恢复正常,根据故障节点最初所在的镜像对向重组镜像对添加所述故障节点,得到过渡镜像对。
故障节点为因故障退出的节点,重组镜像对为故障节点退出后基于存活节点两两重组得到的镜像对。 多控存储系统指包括多个控制器的系统,例如,可以包括3个、4个、5个等控制器。其中,每个控制器为一个节点。
以多控存储系统为四控存储系统为例,该存储系统包括四个控制器,分别为节点0、节点1、节点2、节点3,可以组成初始镜像对,包括4个镜像对,分别为(0,1)(1,2)(2,3)(3,0)。当一个节点故障退出,需要对包含故障节点的镜像对进行重组。例如节点0因故障退出,按照循环镜像原则,原来(0,1)及(3,0)两组镜像对需要重组,重组后的镜像对变为(1,2)(1,2)(2,3)及(3,1)。在本示例中,(1,2)(1,2)(2,3)及(3,1)为重组镜像对,节点1、节点2、节点3为存活节点。
当节点0恢复正常重新加入时,最终重组镜像对中的四个镜像对需要恢复成(0,1)(1,2)(2,3)(3,0)。由于节点恢复时需要执行缓存数据重镜像操作流程,如果直接由重组镜像对回切到初始镜像对,例如对于第一个镜像对,由(1,2)回切为(0,1),对应流程为放弃该镜像对在节点2的数据,并将数据由节点1向节点0镜像。此时由于缓存数据重镜像操作流程需要耗费一定的时间,如果在此期间节点1故障退出,则会造成该镜像对数据的暂时丢失,最终导致业务的暂停。
根据故障节点最初所在的镜像对向重组镜像对添加故障节点,得到过渡镜像对。过渡镜像对包括由3个节点组成的镜像对,可以表示为(1,2,0)(3,1,0)。过渡镜像对的存在可以保证在缓存数据重镜像操作流程即使有节点因故障退出也能正常备份数据,提高数据的安全性。
S220,过渡镜像对中的主节点向故障节点发起缓存数据重镜像操作流程。
过渡镜像对中的主节点与重组镜像对中的主节点保持一致,比如说,重组镜像对中的(1,2),其主节点为节点1,过渡镜像对中(1,2,0)也以节点1作为主节点。只有主节点能够发起缓存数据重镜像操作流程,而新加入的故障节点只能被动接收。
过渡镜像对中的主节点向故障节点发起缓存数据重镜像操作流程,实现数据备份,避免切换至初始镜像对时出现数据缺失的情况。
S230,响应于过渡镜像对中的主节点完成向故障节点缓存数据重镜像,基于初始镜像对,删除过渡镜像对中的冗余节点。
初始镜像对为故障节点退出前基于全部节点两两重组得到的镜像对,例如四控存储器可以组成(0,1)(1,2)(2,3)(3,0)。
冗余节点为过渡镜像对中包括3个节点的镜像对相对于初始镜像对中对应镜像对多出的节点。将过渡镜像对和初始镜像对进行比较确定冗余节点,删除过渡镜像对中的冗余节点,以切换回多控存储系统故障前的镜像对进行数据缓存,即,将过渡镜像对切换回初始镜像对使得主机输入输出系统正常向多控存储系统缓存数据。
可以看出,本申请实施例通过响应于故障节点恢复正常,向重组镜像对添加故障节点,得到过渡镜像对,将重组镜像对中节点数量由两个增加为三个,避免了重组节点时镜像对中仅存单个节点的情况。过渡镜像对中的主节点向故障节点发起缓存数据重镜像操作流程,在过渡镜像对中的主节点完成向故障节点缓存数据重镜像后,基于初始镜像对,删除过渡镜像对中的冗余节点,以切换回多控存储系统故障前的镜像对进行数据缓存。如此,在恢复至初始镜像对时,即使在缓存数据重镜像过程中某个节点故障退出,另 外两个节点还可以进行数据镜像,以免数据混乱和丢失,保障缓存数据的安全性。
下面对上述方法流程中的各步骤进行详细描述。首先结合实施例对上述S210即“响应于故障节点恢复正常,向重组镜像对添加故障节点,得到过渡镜像对”进行详细描述。
作为一种可实现的方式,S210可以包括:
根据重组镜像对确定故障节点退出时进行重组的目标镜像对;
向重组镜像对中的目标镜像对添加故障节点,得到过渡镜像对。
目标镜像对为故障节点恢复后重新加入的镜像对。故障节点退出时,故障节点原先所在镜像对中的节点需要重组,将重组镜像对中经过重组得到的镜像对确定为目标镜像对,并向目标镜像对添加故障节点。
具体地,以重组镜像对中的目标镜像对的主节点作为新的主节点添加故障节点,得到过渡镜像对。
保持重组镜像对中的目标镜像对的主节点身份不变,将故障节点作为新加入节点,添加到目标镜像对中,得到过渡镜像对。
过渡镜像对包括两个存活节点和一个故障节点,过渡镜像对中的每个节点设置有2个对端节点。其中,存活节点为多控存储系统中故障节点退出后剩余的节点。一个节点与另一个节点之间建立的关系称为对端,且另一个节点为对端节点。
因为过渡镜像对中存在3个节点,每个节点分别与其他两个节点建立对端关系,所以,每个节点设置有2个对端节点,可以表示为partnerNode0和partnerNode1。但是不同类型的节点作为对端节点,其重要程度也不同,其中,partnerNode0可以代表首选对端节点,partnerNode1可以代表备选对端节点。首选对端节点的重要程度大于备选对端节点的重要程度。
由于新加入节点没有接收主机输入输出系统缓存数据的能力,其作为对端节点的重要程度低于存活节点的重要程度,而作为主节点的存活节点可以向新加入节点发起缓存数据重镜像操作流程,所以,作为主节点的存活节点作为对端节点的重要程度高于普通的存活节点。
在存活节点的对端节点中,另一个存活节点为首选对端节点,故障节点为备选对端节点。在故障节点的对端节点中,两个存活节点中作为主节点的存活节点为首选对端节点,另一个存活节点为备选对端节点。
作为一种可实现的方式,当过渡镜像对切换回多控存储系统故障前的镜像对时,镜像对中的每个节点的备选对端节点设置为无效值。
过渡镜像对包括3个节点,多控存储系统故障前的镜像对包括2个节点。当一个镜像对仅包含2个节点时,这2个节点互为对端节点,也就是说,每个节点只有一个对端节点,此时,不需要备选对端节点,将其设置为无效值。可以将备选对端节点的bit值设为0或1,可根据实际情况进行设置。
下面结合实施例对上述S230即“在过渡镜像对中的主节点完成向故障节点缓存数据重镜像后,基于初始镜像对,删除过渡镜像对中的冗余节点”进行详细描述。
作为一种可实现的方式,S230可以包括:
根据过渡镜像对在初始镜像对中对应的镜像对,确定过渡镜像对中的冗余节点;
删除过渡镜像对中的冗余节点。
过渡镜像对在初始镜像对中对应的镜像对是重组镜像对在添加故障节点形成过渡镜像对前在初始镜像对中的镜像对。比如说,过渡镜像对为(1,2,0),在未添加故障节点前的重组镜像对为(1,2),(1,2)是由于初始镜像对中(0,1)重组得到的,那么,(0,1)则为过渡镜像对在初始镜像对中对应的镜像对。
从过渡镜像对中查找出过渡镜像对在初始镜像对中对应的镜像对中不存在的节点,将其确定为冗余节点,并删除冗余节点。例如,过渡镜像对(1,2,0),过渡镜像对在初始镜像对中对应的镜像对为(0,1),那么,节点2为冗余节点,将过渡镜像对(1,2,0)中的节点2删除,得到(1,0)。
删除冗余节点之后的镜像对的主节点需与过渡镜像对在初始镜像对中对应的镜像对的主节点保持一致,且每个节点恢复为单个对端节点,将备选对端节点设置为无效值。
作为一种可实现的方式,该方法还包括:
在删除过渡镜像对中的冗余节点之后,对冗余节点执行缓存数据丢弃流程,以删除冗余节点在过渡镜像对中对应的缓存数据。
缓存数据丢弃流程是一种删除节点缓存数据的流程。由于过渡镜像对中的主节点完成对故障节点的缓存数据重镜像操作过程后,已经镜像冗余节点对应的缓存数据了,在冗余节点删除后,删除冗余节点之后的镜像对已无需再保存冗余节点对应的缓存数据了,对冗余节点执行缓存数据丢弃流程,删除冗余节点在过渡镜像对中对应的缓存数据,可以增加缓存空间,提高系统的运行性能。
作为一种可实现的方式,该方法还包括:
在过渡镜像对中的主节点向故障节点进行缓存数据重镜像操作过程中存在突发故障节点时,根据突发故障节点的身份信息,确定当前主节点;
基于当前主节点,确定后续执行的第一操作流程。
其中,突发故障节点为在过渡镜像对中的主节点向故障节点进行缓存数据重镜像操作过程中突然发生故障的节点。第一操作流程包括缓存数据丢弃流程、缓存数据重镜像操作流程和主机输入输出流程。当前主节点为突然发生故障后的过渡镜像对中的主节点。
由于缓存数据重镜像操作过程需要消耗一定的时间,且这一过程中过渡镜像对中的3个节点处于特殊状态,新加入的故障节点无法替代原有的存活节点。因此,在此过程上再发生节点故障事件时,需要根据具体情况制定不同的处理流程。
突发故障节点可能为存活节点,也可能为故障节点,若为存活节点,需进一步确定突发故障节点是否主节点。因此,突发故障节点的身份信息可以包括主节点身份、非主节点的存活节点身份、故障节点身份。根据突发故障节点的身份信息,确定当前主节点,以确定后续执行的第一操作流程中的至少一种。
作为一种可实现的方法,当突发故障节点为主节点身份时,将作为非主节点的存活节点确定为当前主节点;
对故障节点执行缓存数据丢弃流程,以清除突发故障节点对故障节点执行缓存数据重镜像操作流程时缓存的数据;
当前主节点向故障节点重新发起缓存数据重镜像操作流程。
需要说明的是,只要过渡镜像对中有节点退出,主节点向故障节点的缓存数据重镜像操作过程中断。
若突发故障节点为主节点身份,将过渡镜像对中剩余两个节点重新组成新的镜像对,将作为非主节点的存活节点确定为当前主节点。
由原先的主节点突然发生故障导致主节点向故障节点未重镜像全部缓存数据,需要当前主节点对故障节点重新发起缓存数据重镜像操作流程。为避免故障节点的缓存数据出现重复和混乱,在当前主节点对故障节点重新发起缓存数据重镜像操作流程之前先对故障节点执行缓存数据丢弃流程,以清除突发故障节点对故障节点执行缓存数据重镜像操作流程时缓存的数据。
作为一种可实现的方法,当突发故障节点为非主节点的存活节点身份时,将过渡镜像对中的主节点确定为当前主节点;
当前主节点识别突发故障节点出现前的缓存数据重镜像操作流程的流程进度;
根据流程进度,继续执行突发故障节点出现前的缓存数据重镜像操作流程。
其中,当突发故障节点为非主节点的存活节点身份时,将过渡镜像对中剩余两个节点重新组成新的镜像对,过渡镜像对中原先的主节点仍然为当前主节点。由于缓存数据重镜像操作流程的发起节点和接收节点未发生变化,当前主节点只需识别突发故障节点出现前的缓存数据重镜像操作流程的流程进度,找到流程暂停的地方,继续完成该流程。
作为一种可实现的方法,当突发故障节点为故障节点身份时,将过渡镜像对中的主节点确定为当前主节点;
执行主机输入输出流程,以使得主机正常向多控存储系统缓存数据。
当突发故障节点为故障节点身份时,此时,过渡镜像对中的主节点无需再向故障节点进行缓存数据重镜像,过渡镜像对中不存在接收缓存数据的节点,将过渡镜像对中剩余两个节点重新组成新的镜像对,过渡镜像对中原先的主节点仍然为当前主节点。执行主机输入输出流程,恢复正常业务流程,使得主机可以向多控存储系统缓存数据。
作为一种可实现的方法,该方法还包括:在确定当前主节点之后,更新过渡镜像对中剩余两个节点的首选对端节点,并将备选对端节点设置为无效值。
若过渡镜像对中存在节点故障退出,过渡镜像对中剩余两个节点互为对端节点,均为彼此的首选对端节点,不存在备选对端节点,将其设置为无效值。
作为一种可实现的方式,该方法还包括:在对冗余节点执行缓存数据丢弃流程中存在突发故障节点时,根据突发故障节点的节点类型,确定后续执行的第二操作流程。
其中,节点类型包括冗余节点和过渡镜像对中的非冗余节点,第二操作流程可以是不执行任何操作流程,也可以是发起缓存数据丢弃流程或者缓存数据重镜像操作流程。
在对冗余节点执行缓存数据丢弃流程中断,对冗余节点和过渡镜像对中的非冗余节点的影响是不一样的,需要根据突发故障节点的节点类型,确定后续的操作流程。
作为一种可实现的方式,当突发故障节点为冗余节点时,过渡镜像对中的节点不执行任何操作流程。
当突发故障节点为冗余节点时,即使过渡镜像对中的节点再次发起缓存数据丢弃流程,冗余节点也无法执行,且冗余节点已经不在过渡镜像对中,也不会影响多控存储系统的正常运行,因此,过渡镜像对 中的节点不执行任何操作流程,认作是强制完成了对冗余节点缓存数据的丢弃。
作为一种可实现的方式,当突发故障节点为过渡镜像对中的非冗余节点的其中一个时,将冗余节点和过渡镜像对中另一个非冗余节点重新组成当前镜像对;
对冗余节点执行缓存数据丢弃流程,以继续突发故障节点出现前进行的缓存数据丢弃流程;
当冗余节点执行完缓存数据丢弃流程时,过渡镜像对中另一个非冗余节向冗余节点发起缓存数据重镜像操作流程,以实现缓存数据的备份。
当突发故障节点为过渡镜像对中的非冗余节点的其中一个时,表明由过渡镜像对切换回的初始镜像对仅剩一个节点,无法进行缓存数据的备份,需要新加入一个节点组成新的镜像对,即,当前镜像对。
在过渡镜像对中的主节点完成向故障节点缓存数据重镜像后,故障节点和主节点对应的缓存数据相同,故障节点也具备了主节点发起任何流程的能力。所以,过渡镜像对中两个非冗余节点的任意一个故障时,另一个非冗余节点都可以作为当前镜像对的主节点,而冗余节点为从节点。
对冗余节点执行缓存数据丢弃流程,以继续突发故障节点出现前进行的缓存数据丢弃流程,清除掉冗余节点之前镜像的缓存数据。当冗余节点执行完缓存数据丢弃流程时,过渡镜像对中另一个非冗余节向冗余节点发起缓存数据重镜像操作流程,以实现缓存数据的备份,保证当前镜像对正常运行。
本申请提供的缓存数据方法不仅能够实现多控存储系统的单节点恢复,还在恢复过程,例如,缓存数据重镜像操作流程、缓存数据丢弃流程中叠加节点故障事件场景下设置相应的处理流程,安全、及时、有效地实现了多控存储节点恢复过程中复杂场景的处理,避免因多种事件叠加而对多控存储系统造成数据安全性隐患,进一步提高了多控存储系统缓存数据的安全性。
应该理解的是,虽然图2的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本申请中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图2中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。
图3为本申请实施例提供的一种数据缓存装置的结构示意图,该装置可以设置于图1所示系统中的终端102,用以执行如图2中所示的方法流程。如图3所示,该装置可以包括:添加模块310、发起模块320和删除模块330,还可以进一步包括:执行模块、确定模块和更新模块。其中各组成模块的主要功能如下:
添加模块310,用于响应于故障节点恢复正常,根据故障节点最初所在的镜像对向重组镜像对添加所述故障节点,得到过渡镜像对;
发起模块320,用于过渡镜像对中的主节点向故障节点发起缓存数据重镜像操作流程;
删除模块330,用于响应于过渡镜像对中的主节点完成向故障节点缓存数据重镜像,基于初始镜像对,删除过渡镜像对中的冗余节点,以将过渡镜像对切换回初始镜像对进行数据缓存,
其中,重组镜像对为故障节点退出后基于存活节点两两重组得到的镜像对;
初始镜像对为故障节点退出前基于全部节点两两重组得到的镜像对。
作为一种可实现的方式,添加模块310,具体用于:根据重组镜像对确定故障节点退出时进行重组的目标镜像对;
向重组镜像对中的目标镜像对添加故障节点,得到过渡镜像对。
作为一种可实现的方式,添加模块310,具体用于:以重组镜像对中的目标镜像对的主节点作为新的主节点添加故障节点,得到过渡镜像对。
作为一种可实现的方式,过渡镜像对包括两个存活节点和一个故障节点,过渡镜像对中的每个节点设置有2个对端节点;
在存活节点的对端节点中,另一个存活节点为首选对端节点,故障节点为备选对端节点;
在故障节点的对端节点中,两个存活节点中作为主节点的存活节点为首选对端节点,另一个存活节点为备选对端节点。
作为一种可实现的方式,当过渡镜像对切换回多控存储系统故障前的镜像对时,镜像对中的每个节点的备选对端节点设置为无效值。
作为一种可实现的方式,删除模块330,具体用于:根据过渡镜像对在初始镜像对中对应的镜像对,确定过渡镜像对中的冗余节点;
删除过渡镜像对中的冗余节点。
作为一种可实现的方式,该装置还包括执行模块,用于:在删除过渡镜像对中的冗余节点之后,对冗余节点执行缓存数据丢弃流程,以删除冗余节点在过渡镜像对中对应的缓存数据。
作为一种可实现的方式,该装置还包括确定模块,用于:在过渡镜像对中的主节点向故障节点进行缓存数据重镜像操作过程中存在突发故障节点时,根据突发故障节点的身份信息,确定当前主节点;
基于当前主节点,确定后续执行的第一操作流程。
作为一种可实现的方式,身份信息包括主节点身份,第一操作流程包括缓存数据丢弃流程和缓存数据重镜像操作流程;确定模块,具体用于:当突发故障节点为主节点身份时,将作为非主节点的存活节点确定为当前主节点;
对故障节点执行缓存数据丢弃流程,以清除突发故障节点对故障节点执行缓存数据重镜像操作流程时缓存的数据;
当前主节点向故障节点重新发起缓存数据重镜像操作流程。
作为一种可实现的方式,身份信息包括非主节点的存活节点身份;确定模块,具体用于:当突发故障节点为非主节点的存活节点身份时,将过渡镜像对中的主节点确定为当前主节点;
当前主节点识别突发故障节点出现前的缓存数据重镜像操作流程的流程进度;
根据流程进度,继续执行突发故障节点出现前的缓存数据重镜像操作流程。
作为一种可实现的方式,身份信息包括故障节点身份,第一操作流程包括主机输入输出流程;确定模块,具体用于:当突发故障节点为故障节点身份时,将过渡镜像对中的主节点确定为当前主节点;
执行主机输入输出流程,以使得主机正常向多控存储系统缓存数据。
作为一种可实现的方式,该装置还包括更新模块,用于:在确定当前主节点之后,更新过渡镜像对中剩余两个节点的首选对端节点,并将备选对端节点设置为无效值。
作为一种可实现的方式,确定模块,还用于:在对冗余节点执行缓存数据丢弃流程中存在突发故障节点时,根据突发故障节点的节点类型,确定后续执行的第二操作流程。
作为一种可实现的方式,节点类型包括冗余节点;确定模块,具体用于:当突发故障节点为冗余节点时,过渡镜像对中的节点不执行任何操作流程。
作为一种可实现的方式,节点类型包括过渡镜像对中的非冗余节点;确定模块,具体用于:当突发故障节点为过渡镜像对中的非冗余节点的其中一个时,将冗余节点和过渡镜像对中另一个非冗余节点重新组成当前镜像对;
对冗余节点执行缓存数据丢弃流程,以继续突发故障节点出现前进行的缓存数据丢弃流程;
当冗余节点执行完缓存数据丢弃流程时,过渡镜像对中另一个非冗余节向冗余节点发起缓存数据重镜像操作流程,以实现缓存数据的备份。
作为一种可实现的方式,当前镜像对中的非冗余节点为主节点,冗余节点为从节点。
作为一种可实现的方式,多控存储系统为四控存储系统。
上述各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于装置实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
需要说明的是,本申请实施例中可能会涉及到对用户数据的使用,在实际应用中,可以在符合所在国的适用法律法规要求的情况下(例如用户明确同意,对用户切实通知,用户明确授权等),在适用法律法规允许的范围内在本文描述的方案中使用用户特定的个人数据。
根据本申请的实施例,本申请还提供了一种计算机设备、一种非易失性计算机可读存储介质。
如图4所示,是根据本申请实施例的计算机设备的框图。计算机设备旨在表示各种形式的数字计算机或移动装置。其中数字计算机可以包括台式计算机、便携式计算机、工作台、个人数字助理、服务器、大型计算机和其它适合的计算机。移动装置可以包括平板电脑、智能电话、可穿戴式设备等。
如图4所示,设备400包括计算单元401、ROM 402、RAM 403、总线404以及输入/输出(I/O)接口405,计算单元401、ROM 402以及RAM 403通过总线404彼此相连。输入/输出(I/O)接口405也连接至总线404。
计算单元401可以根据存储在只读存储器(ROM)402中的计算机指令或者从存储单元408加载到随机访问存储器(RAM)403中的计算机指令,来执行本申请方法实施例中的各种处理。计算单元401可以是各种具有处理和计算能力的通用和/或专用处理组件。计算单元401可以包括但不限于中央处理单元(CPU)、图形处理单元(GPU)、各种专用的人工智能(AI)计算芯片、各种运行机器学习模型算法的计算单元、数字信号处理器(DSP)、以及任何适当的处理器、控制器、微控制器等。在一些实施例中,本申请实施例提供的方法可被实现为计算机软件程序,其被有形地包含于非易失性计算机可读存储介质,例如存储单元408。
RAM 403还可存储系统400操作所需的各种程序和数据。计算机程序的部分或者全部可以经由ROM802和/或通信单元409而被载入和/或安装到设备400上。
设备400中的输入单元406、输出单元407、存储单元408和通信单元409可以连接至I/O接口405。其中,输入单元406可以是诸如键盘、鼠标、触摸屏、麦克风等;输出单元407可以是诸如显示器、扬声器、指示灯等。设备400能够通过通信单元409与其他设备进行信息、数据等的交换。
需要说明的是,该设备还可以包括实现正常运行所必需的其他组件。也可以仅包含实现本申请方案所必需的组件,而不必包含图中所示的全部组件。
此处描述的系统和技术的各种实施方式可以在数字电子电路系统、集成电路系统、场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、芯片上系统的系统(SOC)、负载可编程逻辑设备(CPLD)、计算机硬件、固件、软件和/或它们的组合中实现。
用于实施本申请的方法的计算机指令可以采用一个或多个编程语言的任何组合来编写。这些计算机指令可以提供给计算单元401,使得计算机指令当由诸如处理器等计算单元401执行时使执行本申请方法实施例中涉及的各步骤。
本申请提供的非易失性计算机可读存储介质可以是有形的介质,其可以包含或存储计算机指令,用以执行本申请方法实施例中涉及的各步骤。非易失性计算机可读存储介质可以包括但不限于电子的、磁性的、光学的、电磁的等形式的存储介质。
上述具体实施方式,并不构成对本申请保护范围的限制。本领域技术人员应该明白的是,根据设计要求和其他因素,可以进行各种修改、组合、子组合和替代。任何在本申请的精神和原则之内所作的修改、等同替换和改进等,均应包含在本申请保护范围之内。

Claims (20)

  1. 一种数据缓存方法,其特征在于,所述方法应用于多控存储系统,所述多控存储系统包括多个控制器,每个控制器为一个节点,所述方法包括:
    响应于故障节点恢复正常,根据故障节点最初所在的镜像对向重组镜像对添加所述故障节点,得到过渡镜像对,以用于在缓存数据重镜像过程中镜像对的其中一个节点故障,其他节点之间继续进行数据镜像;
    所述过渡镜像对中的主节点向所述故障节点发起缓存数据重镜像操作流程;
    响应于过渡镜像对中的主节点完成向所述故障节点缓存数据重镜像,基于初始镜像对,删除所述过渡镜像对中的冗余节点,以将所述过渡镜像对切换回所述初始镜像对进行数据缓存;
    其中,所述重组镜像对为所述故障节点退出后因重组所述故障节点最初所在的镜像对而基于存活节点两两重组得到的镜像对;
    所述初始镜像对为所述故障节点退出前基于全部节点两两重组得到的镜像对。
  2. 根据权利要求1所述的方法,其特征在于,所述响应于故障节点恢复正常,向重组镜像对添加所述故障节点,得到过渡镜像对,包括:
    根据故障节点最初所在的镜像对确定所述故障节点退出时进行重组的目标镜像对;
    向所述重组镜像对中的目标镜像对添加所述故障节点,得到过渡镜像对。
  3. 根据权利要求2所述的方法,其特征在于,所述向所述重组镜像对中的目标镜像对添加所述故障节点,得到过渡镜像对,包括:
    以所述重组镜像对中的目标镜像对的主节点作为新的主节点添加所述故障节点,得到过渡镜像对。
  4. 根据权利要求1-3任一项所述的方法,其特征在于,所述过渡镜像对包括两个存活节点和一个故障节点,所述过渡镜像对中的每个节点设置有2个对端节点;
    在所述存活节点的对端节点中,另一个存活节点为首选对端节点,所述故障节点为备选对端节点;
    在所述故障节点的对端节点中,两个存活节点中作为主节点的存活节点为首选对端节点,另一个存活节点为备选对端节点。
  5. 根据权利要求4所述的方法,其特征在于,当所述过渡镜像对切换回所述多控存储系统故障前的镜像对时,所述过渡镜像对中的每个节点的备选对端节点设置为无效值。
  6. 根据权利要求1所述的方法,其特征在于,所述基于初始镜像对,删除所述过渡镜像对中的冗余节点,包括:
    根据所述过渡镜像对在所述初始镜像对中对应的镜像对,确定所述过渡镜像对中的冗余节点;
    删除所述过渡镜像对中的冗余节点。
  7. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    在删除所述过渡镜像对中的冗余节点之后,对所述冗余节点执行缓存数据丢弃流程,以删除所述冗余节点在所述过渡镜像对中对应的缓存数据。
  8. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    在所述过渡镜像对中的主节点向所述故障节点进行缓存数据重镜像操作过程中存在突发故障节点时,根据所述突发故障节点的身份信息,确定当前主节点;
    基于所述当前主节点,确定后续执行的第一操作流程。
  9. 根据权利要求8所述的方法,其特征在于,所述身份信息包括主节点身份,所述第一操作流程包括缓存数据丢弃流程和缓存数据重镜像操作流程;所述根据所述突发故障节点的身份信息,确定当前主节点,包括:
    当所述突发故障节点为主节点身份时,将作为非主节点的存活节点确定为当前主节点;
    所述基于所述当前主节点,确定后续执行的第一操作流程,包括:
    对所述故障节点执行缓存数据丢弃流程,以清除所述突发故障节点对所述故障节点执行缓存数据重镜像操作流程时缓存的数据;
    所述当前主节点向所述故障节点重新发起缓存数据重镜像操作流程。
  10. 根据权利要求8所述的方法,其特征在于,所述身份信息包括非主节点的存活节点身份;所述根据所述突发故障节点的身份信息,确定当前主节点,包括:
    当所述突发故障节点为非主节点的存活节点身份时,将所述过渡镜像对中的主节点确定为当前主节点;
    所述基于所述当前主节点,确定后续执行的第一操作流程,包括:
    所述当前主节点识别所述突发故障节点出现前的缓存数据重镜像操作流程的流程进度;
    根据所述流程进度,继续执行所述突发故障节点出现前的缓存数据重镜像操作流程。
  11. 根据权利要求8所述的方法,其特征在于,所述身份信息包括故障节点身份,所述第一操作流程包括主机输入输出流程;所述根据所述突发故障节点的身份信息,确定当前主节点,包括:
    当所述突发故障节点为故障节点身份时,将所述过渡镜像对中的主节点确定为当前主节点;
    所述基于所述当前主节点,确定后续执行的第一操作流程,包括:
    执行所述主机输入输出流程,以使得主机正常向所述多控存储系统缓存数据。
  12. 根据权利要求8-11任一项所述的方法,其特征在于,所述方法还包括:
    在确定当前主节点之后,更新所述过渡镜像对中剩余两个节点的首选对端节点,并将备选对端节点设置为无效值。
  13. 根据权利要求7所述的方法,其特征在于,所述方法还包括:
    在对所述冗余节点执行缓存数据丢弃流程中存在突发故障节点时,根据所述突发故障节点的节点类型,确定后续执行的第二操作流程。
  14. 根据权利要求13所述的方法,其特征在于,所述节点类型包括冗余节点;所述根据所述突发故障节点的节点类型,确定后续执行的第二操作流程,包括:
    当所述突发故障节点为冗余节点时,所述过渡镜像对中的节点不执行任何操作流程。
  15. 根据权利要求13所述的方法,其特征在于,所述节点类型包括所述过渡镜像对中的非冗余节点;所述根据所述突发故障节点的节点类型,确定后续执行的第二操作流程,包括:
    当所述突发故障节点为所述过渡镜像对中的非冗余节点的其中一个时,将所述冗余节点和所述过渡镜像对中另一个非冗余节点重新组成当前镜像对;
    对所述冗余节点执行缓存数据丢弃流程,以继续所述突发故障节点出现前进行的缓存数据丢弃流程;
    当所述冗余节点执行完缓存数据丢弃流程时,所述过渡镜像对中另一个非冗余节向所述冗余节点发起缓存数据重镜像操作流程,以实现缓存数据的备份。
  16. 根据权利要求15所述的方法,其特征在于,所述当前镜像对中的非冗余节点为主节点,所述冗余节点为从节点。
  17. 根据权利要求1所述的方法,其特征在于,所述多控存储系统为四控存储系统。
  18. 一种数据缓存装置,其特征在于,所述装置设置于多控存储系统,所述多控存储系统包括多个控制器,每个控制器为一个节点,所述装置包括:
    添加模块,用于响应于故障节点恢复正常,根据故障节点最初所在的镜像对向重组镜像对添加所述故障节点,得到过渡镜像对,以用于在缓存数据重镜像过程中镜像对的其中一个节点故障,其他节点之间继续进行数据镜像;
    发起模块,用于所述过渡镜像对中的主节点向所述故障节点发起缓存数据重镜像操作流程;
    删除模块,用于响应于过渡镜像对中的主节点完成向所述故障节点缓存数据重镜像,基于初始镜像对,删除所述过渡镜像对中的冗余节点,以将所述过渡镜像对切换回所述初始镜像对进行数据缓存;
    其中,所述重组镜像对为所述故障节点退出后因重组所述故障节点最初所在的镜像对而基于存活节点两两重组得到的镜像对;
    所述初始镜像对为所述故障节点退出前基于全部节点两两重组得到的镜像对。
  19. 一种计算机设备,包括:
    至少一个处理器;以及
    与所述至少一个处理器通信连接的存储器;其中,
    所述存储器存储有可被所述至少一个处理器执行的计算机指令,所述计算机指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行权利要求1-17中任一项所述的方法。
  20. 一种非易失性计算机可读存储介质,其上存储有计算机指令,其特征在于,所述计算机指令用于使计算机执行权利要求1至17中任一项所述的方法。
PCT/CN2023/103138 2022-12-06 2023-06-28 一种数据缓存方法、装置、设备和存储介质 Ceased WO2024119786A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US18/875,283 US12367143B2 (en) 2022-12-06 2023-06-28 Data caching method and apparatus, device, and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211553153.XA CN115563028B (zh) 2022-12-06 2022-12-06 一种数据缓存方法、装置、设备和存储介质
CN202211553153.X 2022-12-06

Publications (1)

Publication Number Publication Date
WO2024119786A1 true WO2024119786A1 (zh) 2024-06-13

Family

ID=84769995

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/103138 Ceased WO2024119786A1 (zh) 2022-12-06 2023-06-28 一种数据缓存方法、装置、设备和存储介质

Country Status (3)

Country Link
US (1) US12367143B2 (zh)
CN (1) CN115563028B (zh)
WO (1) WO2024119786A1 (zh)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115563028B (zh) 2022-12-06 2023-03-14 苏州浪潮智能科技有限公司 一种数据缓存方法、装置、设备和存储介质
CN119718760B (zh) * 2025-02-26 2025-05-30 苏州元脑智能科技有限公司 缓存数据清理的方法及装置、电子设备和存储介质
CN120803373A (zh) * 2025-09-11 2025-10-17 苏州元脑智能科技有限公司 缓存镜像确定方法和存储系统
CN120803798B (zh) * 2025-09-12 2025-12-02 浪潮电子信息产业股份有限公司 存储控制器的故障处理方法和电子设备
CN120929313B (zh) * 2025-10-14 2025-12-12 浪潮电子信息产业股份有限公司 多控存储系统的故障处理方法和电子设备

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107003920A (zh) * 2014-09-22 2017-08-01 Netapp股份有限公司 用于处置灾难恢复群集中的多节点故障的系统和方法
CN107357688A (zh) * 2017-07-28 2017-11-17 广东神马搜索科技有限公司 分布式系统及其故障恢复方法和装置
CN113064755A (zh) * 2021-03-17 2021-07-02 北京沃东天骏信息技术有限公司 数据恢复方法、装置、设备、介质及程序产品
CN114281591A (zh) * 2021-12-30 2022-04-05 郑州云海信息技术有限公司 存储节点故障处理方法、装置、设备及存储介质
CN115237683A (zh) * 2022-07-21 2022-10-25 苏州浪潮智能科技有限公司 一种四控存储设备故障下缓存数据的处理方法及系统
CN115563028A (zh) * 2022-12-06 2023-01-03 苏州浪潮智能科技有限公司 一种数据缓存方法、装置、设备和存储介质

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5944815A (en) * 1998-01-12 1999-08-31 Advanced Micro Devices, Inc. Microprocessor configured to execute a prefetch instruction including an access count field defining an expected number of access
CN112269683B (zh) * 2020-10-22 2022-12-06 苏州浪潮智能科技有限公司 一种离线节点上线业务恢复方法及相关组件
CN115268784B (zh) * 2022-07-26 2025-08-15 苏州浪潮智能科技有限公司 基于四控存储系统的raid校验写保护方法及系统

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107003920A (zh) * 2014-09-22 2017-08-01 Netapp股份有限公司 用于处置灾难恢复群集中的多节点故障的系统和方法
CN107357688A (zh) * 2017-07-28 2017-11-17 广东神马搜索科技有限公司 分布式系统及其故障恢复方法和装置
CN113064755A (zh) * 2021-03-17 2021-07-02 北京沃东天骏信息技术有限公司 数据恢复方法、装置、设备、介质及程序产品
CN114281591A (zh) * 2021-12-30 2022-04-05 郑州云海信息技术有限公司 存储节点故障处理方法、装置、设备及存储介质
CN115237683A (zh) * 2022-07-21 2022-10-25 苏州浪潮智能科技有限公司 一种四控存储设备故障下缓存数据的处理方法及系统
CN115563028A (zh) * 2022-12-06 2023-01-03 苏州浪潮智能科技有限公司 一种数据缓存方法、装置、设备和存储介质

Also Published As

Publication number Publication date
US20250165399A1 (en) 2025-05-22
US12367143B2 (en) 2025-07-22
CN115563028A (zh) 2023-01-03
CN115563028B (zh) 2023-03-14

Similar Documents

Publication Publication Date Title
WO2024119786A1 (zh) 一种数据缓存方法、装置、设备和存储介质
CN115237683A (zh) 一种四控存储设备故障下缓存数据的处理方法及系统
CN110049091A (zh) 数据存储方法及装置、电子设备、存储介质
CN103678608B (zh) 日志管理方法和装置
CN104954444A (zh) 一种迁移缓存数据的方法及设备
CN110413687B (zh) 基于节点互证校验的分布式事务故障处理方法及相关设备
CN108733808B (zh) 大数据软件系统切换方法、系统、终端设备及存储介质
CN114879905B (zh) 一种数据存储方法、装置、电子设备及存储介质
US20260010440A1 (en) Data Disaster Recovery Method, Apparatus, and System, Node Device, and Standby Node Device
CN114722121B (zh) 一种数据库集群间主备方法及装置
CN112131201A (zh) 一种网络附加存储高可用性的方法、系统、设备及介质
CN110413225A (zh) 高可靠集群存储双活配置方法、系统、终端及存储介质
CN117395263B (zh) 一种数据同步方法、装置、设备和存储介质
CN111488247B (zh) 一种管控节点多次容错的高可用方法及设备
WO2025223127A1 (zh) 一种故障处理方法、装置及电子设备和存储介质
WO2025124210A1 (zh) 一种分布式PostgreSQL数据库的快速克隆方法
CN118331496A (zh) 存储集群的仲裁方法、装置、计算机设备及存储介质
WO2025055385A1 (zh) 页面的镜像存储方法、装置、设备及存储介质
CN117130830A (zh) 对象的数据恢复方法、装置、计算机设备及存储介质
CN116414625A (zh) 一种日志管理方法、装置、设备及存储介质
US11238019B2 (en) Distributed database systems partition merge
CN115934742A (zh) 一种故障处理方法、装置、设备及存储介质
CN113742132B (zh) 一种存储系统故障修复方法及装置
CN118295982B (zh) 一种redo日志重演方法、装置、设备及存储介质
CN113326268A (zh) 一种数据写入、读取方法及装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23899373

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 18875283

Country of ref document: US

WWP Wipo information: published in national office

Ref document number: 18875283

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 23899373

Country of ref document: EP

Kind code of ref document: A1