Cache data recovery method and electronic device
By establishing communication connections between the cache manager and multiple backup nodes, reliable backup and rapid recovery of cached data are achieved, solving the problem of data loss caused by power outages or hardware failures, and improving the stability and availability of the system.
Patent Information
- Application Number
- CN202511135879.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-14
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2045-08-14
AI Technical Summary
In existing technologies, power failure or hardware malfunction of the cache manager can lead to the loss of cached data, affecting the normal operation of the system, and the stability of external capacitors is relatively poor.
The system establishes communication connections between the cache manager and multiple backup nodes, broadcasts the data to be backed up to the backup node storage in response to abnormal events, and restores the data from the backup nodes in the event of a recovery. It uses a multi-node backup mechanism and remote direct memory access connections for data transmission.
It enables reliable backup and rapid recovery of cached data, reduces the risk of data loss, improves system stability and availability, avoids the instability of external capacitors, and ensures the continuity and reliability of system data.
Smart Images

Figure CN120653492B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data storage and data computing, in particular to a cache data recovery method and an electronic device. BACKGROUND
[0002] In a computer system, cache as a key component to improve data access speed can be used as a data access medium between memory and processor to improve the efficiency of data access and is crucial to system performance. During use, abnormal events such as power failure of the cache manager may occur, resulting in loss or damage of cache data and affecting the normal operation of the system. In related technologies, external power sources such as capacitor devices are usually set to realize power failure protection of the cache manager.
[0003] In the implementation of the present application, it is found that the related technologies at least have the following problems. Since high temperature, vibration and other environments may cause leakage of electrolyte and device burst of the capacitor device, the use of external capacitor devices as power sources has risks and poor stability. SUMMARY
[0004] In view of the above problems, the present application provides a cache data recovery method and an electronic device.
[0005] According to a first aspect of the present application, a cache data recovery method is provided, comprising: establishing a communication connection between a server where a cache manager is located and a plurality of backup nodes; determining backup-to-be data in a cache of the cache manager in response to detecting an abnormal event of the cache manager; broadcasting the backup-to-be data to the plurality of backup nodes through the communication connection to store the backup-to-be data as backup data in the plurality of backup nodes; and receiving the backup data from the plurality of backup nodes through the communication connection and restoring the backup data to the cache of the cache manager in response to detecting a recovery event of the cache manager.
[0006] A second aspect of the present application provides a cache data recovery apparatus, comprising: a connection establishing module configured to establish a communication connection between a server where a cache manager is located and a plurality of backup nodes; a data determining module configured to determine backup-to-be data in a cache of the cache manager in response to detecting an abnormal event of the cache manager; a data storing module configured to broadcast the backup-to-be data to the plurality of backup nodes through the communication connection to store the backup-to-be data as backup data in the plurality of backup nodes; and a data restoring module configured to receive the backup data from the plurality of backup nodes through the communication connection and restore the backup data to the cache of the cache manager in response to detecting a recovery event of the cache manager.
[0007] The third aspect of the present application provides an electronic device, comprising: one or more processors; a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the method.
[0008] The fourth aspect of the present application further provides a computer readable storage medium having stored thereon a computer program or instructions, wherein the computer program or instructions, when executed by a processor, implement the steps of the method.
[0009] The fifth aspect of the present application further provides a computer program product comprising a computer program or instructions, wherein the computer program or instructions, when executed by a processor, implement the steps of the method. BRIEF DESCRIPTION OF DRAWINGS
[0010] The above content of the present application and other purposes, features and advantages will be more apparent through the following description of the embodiments of the present application with reference to the accompanying drawings, in which:
[0011] Figure 1 An application scenario diagram of the cache data recovery method and the electronic device according to the embodiments of the present application is shown;
[0012] Figure 2 A flowchart of the cache data recovery method according to the embodiments of the present application is shown;
[0013] Figure 3 A communication topology constructed by the cache data recovery method according to the embodiments of the present application is shown;
[0014] Figure 4 A flowchart of the cache data recovery method according to the embodiments of the present application is shown;
[0015] Figure 5 A flowchart of the cache data recovery method according to the embodiments of the present application is shown;
[0016] Figure 6 A structural block diagram of the cache data recovery device according to the embodiments of the present application is shown;
[0017] Figure 7 A block diagram of the electronic device suitable for implementing the cache data recovery method according to the embodiments of the present application is shown. DETAILED DESCRIPTION
[0018] Embodiments of the present application will be described below with reference to the accompanying drawings. It should be understood, however, that the description that follows is merely exemplary and is not intended to limit the scope of the application. In the following detailed description of embodiments of the present application, numerous specific details are set forth in order to provide a thorough understanding of the present application. However, it will be apparent to one skilled in the art that one or more embodiments of the present application can be practiced without these specific details. In other instances, well-known structures and functions have not been described in detail in order to avoid obscuring the concepts of the present application.
[0019] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the present application. As used herein, the term "includes" and tautological expressions thereof, such as "including," "includes," "include," "contains," "containing," and so forth, mean "comprising."
[0020] All terms used herein including technical and scientific terms have the same meanings as commonly understood by one of ordinary skill in the art unless otherwise defined herein. It should be noted that the terms used herein are merely specific examples and should not be construed to limit the present application. Unless otherwise defined, all terms used herein, including technical and scientific terms, have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the relevant art and the present disclosure, and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
[0021] In the case of using expressions similar to "at least one of A, B, and C, etc.", it should generally be interpreted to include any of them, to include, for example, only A, only B, only C, or a combination of A and B, A and C, B and C, or A and B and C, etc.
[0022] Embodiments of the present application provide a cache data recovery method, comprising: establishing a communication connection between a server where a cache manager is located and a plurality of backup nodes; in response to detecting an abnormal event of the cache manager, determining backup data to be backed up in a cache of the cache manager; broadcasting the backup data to be backed up to the plurality of backup nodes through the communication connection, to be stored as backup data in the plurality of backup nodes; and in response to detecting a recovery event of the cache manager, receiving the backup data from the plurality of backup nodes through the communication connection, and restoring to the cache of the cache manager.
[0023] Figure 1 An application scenario diagram of a cache data recovery method and an electronic device according to embodiments of the present application is shown.
[0024] As Figure 1As shown, the application scenario 100 according to this embodiment can include a first processor 101, a second processor 102, a cache manager 103, a first memory 104, a second memory 105, and a third memory 106. The above components can be disposed in the same server. Although two processors and three memories are shown here, the present application is not limited thereto, but can include more or fewer processors and / or memories. In addition, the application scenario 100 can also include other components.
[0025] The first processor 101 and the second processor 102 can be any processor having a data processing function. In the present example, the first processor 101 is a central processing unit (CPU) and the second processor 102 is a graphics processing unit (GPU). The first memory 104, the second memory 105, and the third memory 106 can include various non-volatile memories such as hard disks, flash memories, etc. The first memory 104, the second memory 105, and the third memory 106 can be deployed as a redundant array of independent disks (RAID). The RAID combines multiple independent physical hard disks to form a logical storage unit.
[0026] During the operation of the server, there is a need to process data stored in the first memory 104, the second memory 105, and the third memory 106 using the first processor 101 and the second processor 102. Due to the difference between the processing speed of the processor such as the first processor 101 and the second processor 102 and the access speed of the memory such as the first memory 104, the second memory 105, and the third memory 106, the overall efficiency of the server is reduced.
[0027] Therefore, the cache manager 103 can be used as a data access medium between the first processor 101, the second processor 102, and the first memory 104, the second memory 105, and the third memory 106 to pre-fetch data from the first memory 104, the second memory 105, and the third memory 106 in order to provide it to the first processor 101 and the second processor 102 in time for processing, and to organize the data processed by the first processor 101 and the second processor 102 according to a certain strategy for more efficient transmission to the first memory 104, the second memory 105, and the third memory 106 for storage. For example, the cache manager 103 can include a RAID card which can include a RAID controller chip, a cache, an interface controller, and other components to manage the cooperative work of multiple disks in the RAID.
[0028] The following will be based onFigure 1 The described scenario is achieved by Figures 2-5 The cache data recovery method of the application embodiment is described in detail.
[0029] Figure 2 The flowchart of the cache data recovery method according to the application embodiment is shown.
[0030] As Figure 2 shown, the cache data recovery method of the embodiment includes operations S210-S240.
[0031] In operation S210, a communication connection is established between the server where the cache manager is located and a plurality of backup nodes.
[0032] In operation S220, in response to detecting an abnormal event of the cache manager, the data to be backed up in the cache of the cache manager is determined.
[0033] In operation S230, the data to be backed up is broadcast to the plurality of backup nodes through the communication connection, and stored in the plurality of backup nodes as backup data.
[0034] In operation S240, in response to detecting a recovery event of the cache manager, the backup data is received from the plurality of backup nodes through the communication connection, and recovered into the cache of the cache manager.
[0035] According to the embodiment of the application, the cache manager can be used as a data access medium between the memory and the processor of the server where it is located, for example, the cache manager can pre-fetch data from the memory of the server and deliver the data to the processor, after the processor completes the calculation, the cache manager delivers the calculation result to the memory for disk saving. For example, the cache manager can be a RAID card, which includes a cache.
[0036] According to the embodiment of the application, the backup node can refer to other servers different from the server where the cache manager is located. A communication connection is established between the server where the cache manager is located and other servers, so that the server where the cache manager is located and other servers can perform data transmission.
[0037] According to the embodiment of the application, the abnormal event of the cache manager can include power failure of the cache manager, hardware failure of the cache manager, etc., wherein the power failure of the cache manager can be determined by monitoring the power voltage of the cache manager, and the hardware failure of the cache manager can be determined by analyzing the log file of the cache manager.
[0038] For example, the power voltage of the cache manager is monitored, and in a case where it is determined that the power voltage of the cache manager is lower than a voltage threshold, an abnormal event of the cache manager is triggered. The voltage threshold can be set between a voltage at which the cache manager normally works and a voltage at which the cache manager cannot work, so as to ensure that the backup of data in the cache manager is triggered before the cache manager cannot work.
[0039] For another example, a log file of the cache manager can be parsed, and in a case where it is determined that a hardware fault of the cache manager occurs, especially a fault that cannot be recovered, an abnormal event of the cache manager is triggered.
[0040] According to an embodiment of the present application, instead of simply backing up all cache data in the cache manager to the backup node, it is determined that a part of the cache data (the “to-be-backed-up data”) is backed up. The to-be-backed-up data can refer to data that is temporarily stored in the cache manager, has been calculated by the processor, but is temporarily not stored in the memory.
[0041] According to an embodiment of the present application, after the to-be-backed-up data is determined, the to-be-backed-up data is broadcast to the plurality of backup nodes through the communication connection, so as to ensure that the to-be-backed-up data has been sent to the plurality of backup nodes and stored in the plurality of backup nodes as backup data.
[0042] According to an embodiment of the present application, the recovery event can correspond to the abnormal event, including that the cache manager recovers power supply, the cache manager hardware recovers normal, etc.
[0043] For example, in a case where the abnormal event is triggered in response to the cache manager power failure, after the power voltage of the cache manager is monitored and it is found that the power voltage of the cache manager reaches the voltage at which the cache manager normally works, the recovery event of the cache manager is triggered.
[0044] For another example, in a case where the abnormal event is triggered in response to the cache manager hardware fault, after the hardware fault of the cache manager is repaired, the log file of the cache manager is parsed, and in a case where it is determined that the cache manager recovers normal operation, the recovery event of the cache manager is triggered.
[0045] According to an embodiment of the present application, in response to detecting the recovery event of the cache manager, a data recovery request is sent to the plurality of backup nodes through the communication connection, and the backup node sends the backup data through the communication connection after receiving the data recovery request. The server where the cache manager is located receives the backup data from the plurality of backup nodes, and recovers the backup data to the cache of the cache manager, so as to enable the cache manager to complete subsequent data writing to disk and the like.
[0046] According to the embodiments of the present application, by pre-establishing a communication connection between the server and the plurality of backup nodes, the to-be-backed-up data is broadcasted and distributed to the backup nodes in parallel when the cache manager is abnormal, and the data is obtained from the backup nodes when recovery, so that reliable backup and fast recovery of the cache data are realized. The multi-node backup mechanism improves the redundancy of the data, reduces the risk of data loss, ensures that the cache manager can quickly recover to normal operation after an exception, and guarantees the continuity and availability of system data. In addition, the establishment of the above communication connection and the use of the above communication connection for data transmission and reception can also realize backup and restoration of cache data without using a capacitor as an external power supply, thereby avoiding the instability and danger of the capacitor and improving the stability, security and reliability of cache data restoration.
[0047] According to the embodiments of the present application, the backup nodes can be determined in the following manner: discovering a plurality of alternative nodes capable of communicating with the server; and determining a preset number of alternative nodes from the plurality of alternative nodes as the plurality of backup nodes according to the performance parameters of the plurality of alternative nodes, and determining other alternative nodes as standby nodes.
[0048] According to the embodiments of the present application, the server where the cache manager is located can be in a local area network or the Internet, and other servers capable of communicating with the server in the local area network or the Internet can be determined as alternative nodes.
[0049] According to the embodiments of the present application, the performance of each of the plurality of alternative nodes is analyzed, and the performance parameters of the plurality of alternative nodes are determined by weighted summation of attribute information such as node network quality, node storage space availability, and node historical transmission reliability.
[0050] For a certain alternative node, the node network quality of the node can be determined according to information such as the delay and packet loss rate of communication between the alternative node and the server, the node storage space availability of the node can be determined according to the ratio of the available capacity of the hard disk of the node to the total capacity of the hard disk, and the node historical transmission reliability of the node can be determined according to the ratio of the number of successful transmissions to the total number of transmissions in the historical transmission behavior of the node.
[0051] According to the embodiments of the present application, after obtaining the performance parameters of the plurality of alternative nodes, a preset number (for example, 5 or more) of alternative nodes with optimal performance parameters can be selected as backup nodes, and other alternative nodes can be used as standby nodes. The standby nodes can not be used for data backup and data recovery, but can be used to replace the backup nodes that fail.
[0052] According to the embodiments of the present application, the preset number of backup nodes are determined based on the performance parameters of the alternative nodes, which can filter out nodes with better performance as backup nodes, and improve the efficiency of backup and recovery process. Meanwhile, the backup nodes provide replacement guarantee when the backup nodes fail, and enhance the stability and fault tolerance of the backup system, ensuring the continuous effectiveness of the backup mechanism.
[0053] If the backup nodes and the backup nodes are fixed, only when the backup nodes fail, the backup nodes are replaced by the backup nodes, there may be a case that the backup nodes do not fail but their performance decreases, resulting in poor effect when the above-mentioned backup nodes are used to backup and recover the cache data. Therefore, the backup nodes and the backup nodes can be periodically rediscovered and determined.
[0054] For example, the probe signal can be broadcasted according to a first preset time period, and the plurality of backup nodes and the backup nodes are re-determined based on the responses to the probe signal. This can be performed in the normal state of the cache manager, i.e. during normal operation.
[0055] According to the embodiments of the present application, the server can periodically scan the network, and broadcast a probe signal every time a first preset time period is reached. The surrounding available nodes can respond to the probe signal by sending their respective attribute information used to calculate the performance parameters to the server. For example, the attribute information can include hardware configuration information such as storage type, free capacity, network bandwidth, etc. The server can maintain a dynamic node registration table to record the available node IP, capacity and state information, etc.
[0056] According to the embodiments of the present application, the server discovers a plurality of alternative nodes capable of communicating with the server based on the responses to the probe signal, calculates the latest performance parameters of the plurality of alternative nodes, and re-ranks the plurality of alternative nodes according to the latest performance parameters, so as to determine a preset number of alternative nodes as a plurality of backup nodes from the plurality of alternative nodes, and determine other alternative nodes as backup nodes. In the case that the number of alternative nodes is less than the preset number, all alternative nodes can be used as backup nodes.
[0057] According to the embodiments of the present application, the probe signal is broadcasted according to a first preset time period and the backup nodes and the backup nodes are re-determined, which can timely discover the state changes of the nodes and dynamically update the backup node pool. This mechanism ensures that the backup nodes are always available and suitable in performance, avoids backup failure caused by node failure or performance degradation, and improves the adaptability and reliability of the backup system.
[0058] According to an embodiment of the present application, the cache data recovery method can further comprise: detecting whether there is a failed backup node by sending a heartbeat signal to the plurality of backup nodes and detecting responses to the heartbeat signal according to a second preset time period, wherein when the number of times that a target backup node fails to correctly respond to the heartbeat signal reaches a preset failure number, it is determined that the target backup node is failed; and in response to determining that the target backup node is failed, determining at least one standby node as a replacement node to replace the target backup node based on respective performance parameters of the standby nodes. This can be performed in the normal state of the cache manager, i.e. during normal operation.
[0059] According to an embodiment of the present application, the heartbeat signal is sent to the plurality of backup nodes and the responses of the plurality of backup nodes to the heartbeat signal are obtained at each time when the second preset time period is reached. The responses of the respective backup nodes to the heartbeat signal are analyzed and counted to determine the situation that each backup node fails to correctly respond to the heartbeat signal and the number of times that the backup node consecutively fails to correctly respond to the heartbeat signal. When it is determined that there is a target backup node that fails to correctly respond to the heartbeat signal and the number of times that the target backup node consecutively fails to correctly respond to the heartbeat signal reaches a preset failure number, it is determined that the target backup node is failed. For example, the preset failure number can be 3, i.e. when there is a backup node that consecutively fails to correctly respond to the heartbeat signal for 3 times, the backup node is determined as the target backup node.
[0060] According to an embodiment of the present application, the most optimal standby node is selected as the replacement node from the backup nodes according to the respective performance parameters of the standby nodes, and the target backup node is replaced by the replacement node.
[0061] According to an embodiment of the present application, the backup node failure is detected by periodically sending the heartbeat signal, and the replacement node is determined based on the performance parameters of the standby nodes. When an abnormal event occurs, the pre-connection is directly reused, the handshake time is saved, and the real-time monitoring and rapid replacement of the backup nodes are realized. The failed node is found and replaced in time, the number of backup nodes is maintained at a preset level, the incomplete data backup caused by node failure is avoided, and the security and recoverability of the backup data are ensured.
[0062] Figure 3 A communication topology constructed according to a cache data recovery method according to an embodiment of the present application is shown.
[0063] As shown in Figure 3 For example, the preset number is 5, the communication topology includes a server 301, a first backup node 302, a second backup node 303, a third backup node 304, a fourth backup node 305, a fifth backup node 306, a first standby node 307, a kth standby node 308, and an nth standby node 309, where n and k are positive integers and k < n. In the communication topology, the server 301 is connected to the first backup node 302, the second backup node 303, the third backup node 304, the fourth backup node 305, and the fifth backup node 306 through a first connection 310, a second connection 311, a third connection 312, a fourth connection 313, and a fifth connection 314, respectively. The first backup node 302 is connected to the first standby node 307 through a first standby connection 315, the second backup node 303 is connected to the kth standby node 308 through a kth standby connection 316, and the fifth backup node 306 is connected to the nth standby node 309 through an nth standby connection 317. Figure 3The backup nodes between the first backup node 302 and the kth backup node 308, and the backup nodes between the kth backup node 308 and the nth backup node 309 are not shown.
[0064] There are n+5 alternative nodes capable of communicating with the server 301. The performance parameters of the n+5 alternative nodes are calculated respectively, and the five alternative nodes with the best performance are selected as backup nodes, obtaining the first backup node 302, the second backup node 303, the third backup node 304, the fourth backup node 305 and the fifth backup node 306. The other alternative nodes are backup nodes. The one-to-many topology between the server 301 and the first backup node 302, the second backup node 303, the third backup node 304, the fourth backup node 305 and the fifth backup node 306 can be called a broadcast tree.
[0065] According to the first preset time period, the server 301 broadcasts a probe signal to the network, and receives responses of the available nodes in the network to the probe signal. Based on the responses, the alternative nodes are rediscovered, the performance parameters of the alternative nodes are recalculated to obtain the latest performance parameters, and the five alternative nodes with the best performance are reselected as backup nodes according to the latest performance parameters.
[0066] For example, in the case where it is determined based on the responses of the available nodes in the network to the probe signal that there is no new alternative node, the five alternative nodes with the best performance are determined to be the first backup node 302, the third backup node 304, the fourth backup node 305, the fifth backup node 306 and the first backup node 307 according to the latest performance parameters, and the first backup node 307 is used to replace the second backup node 303.
[0067] For another example, in the case where it is determined based on the responses of the available nodes in the network to the probe signal that there is a new alternative node, the performance parameter of the new alternative node can be calculated. If the performance parameter indicates that the new alternative node belongs to the five alternative nodes with the best performance among all the alternative nodes, the new alternative node can be used as a backup node.
[0068] According to the second preset time period, the server 301 broadcasts a heartbeat signal to all backup nodes, and receives responses of the backup nodes to the heartbeat signal to determine whether the backup nodes have failed. For example, in the case where the preset number of failures is 3 and the third backup node 304 has failed to respond to the heartbeat signal for three times in a row, it is determined that the third backup node 304 has failed. The second preset time period can be less than the first preset time period.
[0069] In the presence of a malfunctioning target backup node, a replacement node is determined from the backup nodes based on their respective performance parameters, and the target backup node is replaced by the replacement node. In this example, after the third backup node 304 malfunctions, the kth backup node 308 is determined to be the backup node with the best performance among the first to nth backup nodes 307-309 based on their respective performance parameters, and thus the kth backup node 308 is selected as the replacement node and replaces the third backup node 304.
[0070] In another example, there are more than one malfunctioning backup nodes, and the same number of replacement nodes as the number of malfunctioning backup nodes are determined from the backup nodes, and the malfunctioning backup nodes are respectively replaced by the replacement nodes.
[0071] According to an embodiment of the present application, the cache data recovery method can further include: sending the configuration parameters of the cache manager to the plurality of backup nodes through the communication connection in the normal state of the cache manager, i.e., during normal operation.
[0072] According to an embodiment of the present application, the configuration parameters of the cache manager are relatively fixed, unlike the data cached in the cache manager, and thus the configuration parameters of the cache manager can be sent to the plurality of backup nodes through the communication connection after the backup nodes are determined in the above manner.
[0073] According to an embodiment of the present application, after the backup nodes are replaced by the replacement nodes or new backup nodes are determined based on the latest performance parameters, the configuration parameters of the cache manager can be sent to the new backup nodes through the communication connection.
[0074] According to an embodiment of the present application, after the selection and determination of the backup nodes are completed, the configuration parameters of the cache manager are sent to the backup nodes in advance, so that after an abnormal event is triggered, the backup can be completed by sending only the data to be backed up without sending the configuration parameters, thereby reducing the amount of data to be sent after an abnormal event is triggered.
[0075] According to an embodiment of the present application, the communication connection includes a remote direct memory access (RDMA) connection, which means that the plurality of nodes participating in the connection can directly access their respective memories.
[0076] According to an embodiment of the present application, by establishing a remote direct memory access connection, a one-to-many communication topology between the server where the cache manager is located and the plurality of backup nodes can be constructed, so as to complete the subsequent data backup and data recovery processes using the communication topology.
[0077] According to the embodiments of the present application, the remote direct memory access connection is used as the communication connection, which allows the servers participating in the connection to directly access the respective memories, reduces the intervention and data copying links in the data transmission process. This significantly improves the transmission speed during data backup and recovery, shortens the data synchronization and recovery time, and improves the efficiency of cache data recovery.
[0078] Figure 4 A flowchart of establishing a connection topology in a cache data recovery method according to an embodiment of the present application is shown.
[0079] As shown in Figure 4 The flowchart includes operations S401-S412.
[0080] In operation S401, a server broadcasts a probe signal, and based on the received response to the probe signal, determines a plurality of candidate nodes capable of communicating with the server.
[0081] In operation S402, according to the attribute information of each of the plurality of candidate nodes, the performance parameters of each of the plurality of candidate nodes are determined.
[0082] In operation S403, according to the performance parameters of each of the plurality of candidate nodes, a plurality of backup nodes and standby nodes other than the backup nodes are selected from the plurality of candidate nodes.
[0083] In operation S404, a remote direct memory access connection between the backup nodes and the server is established.
[0084] In operation S405, the configuration parameters of the cache manager are sent to the backup nodes.
[0085] In operation S406, it is determined whether the second preset time period is met. If the second preset time period is met, operation S407 is performed; if the second preset time period is not met, operation S406 is returned.
[0086] In operation S407, a heartbeat signal is sent to the backup nodes.
[0087] In operation S408, based on the responses of the plurality of backup nodes to the heartbeat signal, it is determined whether there is a backup node that fails to correctly respond to the heartbeat signal. If there is, operation S409 is performed; if there is not, operation S406 is returned.
[0088] In operation S409, the incorrect response count of the backup node that fails to correctly respond to the heartbeat signal is incremented by 1.
[0089] In operation S410, it is determined whether there is a backup node whose incorrect response count reaches a preset failure number. If there is, operation S411 is performed; if there is not, operation S406 is returned.
[0090] In operation S411, it is determined that the backup node that the number of incorrect responses reaches the preset failure number fails.
[0091] In operation S412, according to the performance parameters of the backup nodes, a replacement node is selected and the failed backup node is replaced, and the operation returns to operation S404.
[0092] According to an embodiment of the present application, the cache data recovery method further comprises: in the normal state of the cache manager, i.e. during normal operation, scanning the data in the cache, and marking the data as one of the following states: having been modified but not yet stored in the non-volatile storage medium, having been stored in the non-volatile storage medium and discardable, and not having been modified. The data to be backed up only includes the cache data in the cache that has been modified but not yet stored in the non-volatile storage medium.
[0093] According to an embodiment of the present application, the memory of the server includes a non-volatile storage medium. When the cache manager is used as a data access medium between the memory and the processor, the flow path of the data includes: pre-fetching from the memory to the cache, cache hit by the processor, reading from the processor and storing in the cache, and sending from the cache to the memory. The data can be marked as the corresponding state by analyzing the flow path of the data saved in the cache and by the state of the last step in the current flow path of the data.
[0094] For example, in the case that the state of the last step in the current flow path is pre-fetching from the memory to the cache or cache hit by the processor, the data is marked as not having been modified. In the case that the state of the last step in the current flow path is reading from the processor and storing in the cache, the data is marked as having been modified but not yet stored in the non-volatile storage medium. In the case that the state of the last step in the current flow path is sending from the cache to the memory, the data is marked as having been stored in the non-volatile storage medium and discardable.
[0095] Among the above three types of data, for the data not having been modified, the type of data has not been processed or modified by the processor, so if the cache manager triggers an exception event at this time, the data can be pre-fetched from the memory again after the exception event is repaired, and therefore it is not necessary to rely on the above cache data recovery to ensure data correctness and integrity.
[0096] For the data having been stored in the non-volatile storage medium and discardable, the type of data has been processed by the processor and stored in the memory, so during the cache data backup process, even if such data is not backed up, it will not affect the data correctness and integrity.
[0097] For the data that has been modified but not yet stored into the non-volatile storage medium, the type of data has been processed or modified by the processor, but has not yet been stored into the non-volatile storage medium, if an abnormal event occurs at this time, the data will be lost. Therefore, such data can be taken as backup data, and timely backup can be performed on such data, so that after the abnormal event is repaired and the recovery event is triggered, such data is recovered into the cache and sent to the memory for disk saving.
[0098] According to the embodiments of the present application, the cache data is marked with a state, and the backup data only includes the cache data that has been modified but not yet stored into the non-volatile storage medium, thereby reducing the amount of data that needs to be backed up. The key data is backed up in a targeted manner, thereby reducing the resource consumption of data transmission and storage, avoiding repeated backup of data that has been stably stored, and improving the backup efficiency.
[0099] According to the embodiments of the present application, after the recovery event is executed, the reestablishment of the unmodified data that is lost in the cache can be completed by re-reading the unmodified data from the memory, and the reestablishment of the data that has been stored into the non-volatile storage medium and can be discarded and is lost in the cache can be completed by reading the data from the memory. The reestablishment of the data that has been stored into the non-volatile storage medium and can be discarded can be performed only when the data is hot data, i.e., the frequency of use is high, otherwise the reestablishment process can not be performed, so as to reduce the number of cache memory accesses.
[0100] According to another embodiment of the present application, after the backup of the data that has been modified but not yet stored into the non-volatile storage medium is completed, if the cache manager has not yet been disconnected or damaged, the unmodified data and the data that has been stored into the non-volatile storage medium and can be discarded can be backed up in the same backup manner. When the recovery event is executed, the data that has been modified but not yet stored into the non-volatile storage medium is recovered first, and then the recovery of the remaining data blocks is performed asynchronously in the background.
[0101] For example, after the data that has been modified but not yet stored in the non-volatile storage medium is verified by the check code, it is confirmed that the data is complete and correct, and the above data is stored in the cache of the cache manager at one time, and the backup of the data that has been modified but not yet stored in the non-volatile storage medium is completed. At this time, the cache manager can be controlled to normally perform subsequent work, and the recovery work for the data that has not been modified and the data that has been stored in the non-volatile storage medium and can be discarded is performed asynchronously in the background, thereby reducing the number of accesses to the memory and improving the overall efficiency of the system. In addition, by performing recovery on other data blocks except the data blocks that have been modified but not yet stored in the non-volatile storage medium in the background and asynchronously, the impact on the normal work of the cache manager can be reduced.
[0102] According to an embodiment of the present application, broadcasting the data to be backed up to the plurality of backup nodes through the communication connection for storage in the plurality of backup nodes as backup data comprises: dividing the data to be backed up into backup blocks according to a preset block size (for example, 256 KB / block), obtaining backup blocks and check codes corresponding to the backup blocks; and broadcasting the backup blocks and the corresponding check codes to the plurality of backup nodes. Each backup block can have its own identity (Identity document, ID).
[0103] According to an embodiment of the present application, the check code corresponding to the backup block can be used to verify the data integrity of the backup block and ensure that the data has not been tampered with during the backup process, for example, the hash value of the backup block can be obtained by calculation.
[0104] According to an embodiment of the present application, the backup block, the corresponding check code and the corresponding ID are taken as a group of data (for example, packaged into a data packet), and are broadcast to the plurality of backup nodes respectively.
[0105] According to an embodiment of the present application, the data to be backed up is divided into blocks and the check code is generated, and the blocks and the check code are broadcast to the backup nodes, which realizes the basic management of data block and integrity check. By dividing the data to be backed up into blocks, the backup nodes can receive the data transmitted in blocks and process the data of multiple blocks in parallel, thereby improving the backup efficiency. The check code provides a basis for integrity verification during subsequent data recovery, ensuring the accuracy of the backup data, and each backup node does not need to return an acknowledgement after receiving.
[0106] According to an embodiment of the present application, in response to detecting the recovery event of the cache manager, receiving the backup data from the plurality of backup nodes through the communication connection and restoring the backup data into the cache of the cache manager comprises: in response to detecting the recovery event of the cache manager, broadcasting a data recovery request to the plurality of backup nodes through the communication connection; receiving the backup chunks and the corresponding check codes sent by the plurality of backup nodes in response to the data recovery request; in response to receiving more than one copies of the same backup chunk from more than one backup nodes, sequentially selecting the copies received from the backup nodes arranged in descending order according to the performance parameters and verifying the copies using the corresponding check codes until the verification is passed, storing the backup chunk verified by the check code into the non-volatile cache area; after all the backup chunks obtained by chunking the data to be backed up are stored into the non-volatile cache area, writing the data in the cache of the cache manager.
[0107] According to an embodiment of the present application, the data recovery request is also sent in the form of broadcasting, so that the plurality of backup nodes can all obtain the data recovery request and send the plurality of backup chunks and the check codes corresponding to the plurality of backup chunks to the server based on the data recovery request.
[0108] According to an embodiment of the present application, after the server obtains the plurality of backup chunks and the check codes corresponding to the plurality of backup chunks sent by the plurality of backup nodes respectively, for the backup chunk of each ID, the backup chunk of the ID sent by the plurality of backup nodes is regarded as different copies, and the backup chunk verified by the check code is selected from the plurality of copies of the backup chunk of the same ID.
[0109] In the process of selecting the backup chunk verified by the check code from the plurality of copies of the backup chunk of the same ID, the copies sent by the plurality of backup nodes can be arranged in descending order according to the performance parameters, and the copies are verified sequentially using the check codes corresponding to the copies, and the first copy verified is determined as the backup chunk.
[0110] For the backup chunk of each ID, after the backup chunk verified by the check code is determined according to the above process, the backup chunk is stored into the non-volatile cache area. After all the backup chunks are stored into the non-volatile cache area, the data stored in the non-volatile cache area is written into the cache of the cache manager, and the cache data recovery process is completed.
[0111] According to the embodiments of the present application, the backup chunks are obtained from the multiple backup nodes during recovery and verified by the check codes, and the chunks of the high-performance nodes are preferentially selected and written into the cache after all the chunks are complete, which ensures the integrity and accuracy of the recovered data. The multiple backup nodes are provided to ensure proper redundancy, i.e., in the case of failure of the backup nodes or lag of data transmission, the subsequent data completion operation can be completed by using the backup chunks provided by other backup nodes, and the reliability of the cache data recovery is further ensured.
[0112] Figure 5 A flowchart of the cache data recovery performed by the cache data recovery method according to the embodiments of the present application is shown.
[0113] As shown in Figure 5 The flowchart includes operation S501 to operation S515.
[0114] In operation S501, the power voltage of the cache manager and the log file are monitored.
[0115] In operation S502, it is determined whether the power voltage is lower than the power threshold or the log file indicates that the hardware of the cache manager fails. If the above conditions occur, operation S503 is performed; if the above conditions do not occur, operation S501 is returned.
[0116] In operation S503, based on the marking result of the cache data, the cache data that has been modified in the cache but has not been stored in the non-volatile storage medium is taken as the backup data.
[0117] In operation S504, the backup data is chunked according to a preset chunk size to obtain the backup chunks, the check codes corresponding to the backup chunks, and the IDs.
[0118] In operation S505, the backup chunks, the check codes corresponding to the backup chunks, and the IDs are broadcasted to the multiple backup nodes.
[0119] In operation S506, the power voltage of the cache manager and the log file are continuously monitored.
[0120] In operation S507, it is determined whether the power voltage is restored to the power threshold or the log file indicates that the hardware failure of the cache manager has been repaired. If the above conditions occur, operation S508 is performed; if the above conditions do not occur, operation S506 is returned.
[0121] In operation S508, a data recovery request is broadcasted to the multiple backup nodes.
[0122] In operation S509, for each backup chunk, it is determined whether multiple copies sent by the multiple backup nodes are received. If yes, operation S510 is performed; if no, operation S511 is performed.
[0123] In operation S510, the backup chunk sent by the backup node with better performance is selected.
[0124] In operation S511, the backup chunk is checked according to the check code corresponding to the backup chunk.
[0125] In operation S512, it is determined whether the backup chunk passes the check. If yes, operation S514 is performed; if not, operation S513 is performed.
[0126] In operation S513, the backup chunk is discarded, and operation S510 is returned.
[0127] In operation S514, the backup chunk is stored in the non-volatile cache area.
[0128] In operation S515, after all the backup chunks of the data to be backed up are stored in the non-volatile cache area, the data to be backed up is written into the cache of the cache manager.
[0129] Based on the above cache data recovery method, the application further provides a cache data recovery device. The following will be combined with Figure 6 to describe the device in detail.
[0130] Figure 6 The structure block diagram of the cache data recovery device according to the embodiment of the application is shown.
[0131] As Figure 6 shown, the cache data recovery device 600 of the embodiment includes a connection establishment module 610, a data determination module 620, a data storage module 630 and a data recovery module 640.
[0132] The connection establishment module 610 is used to establish a communication connection between the server where the cache manager is located and the plurality of backup nodes. In an embodiment, the connection establishment module 610 can be used to perform the operation S210 described above, and details are not repeated here.
[0133] The data determination module 620 is used to determine the data to be backed up in the cache of the cache manager in response to detecting an abnormal event of the cache manager. In an embodiment, the data determination module 620 can be used to perform the operation S220 described above, and details are not repeated here.
[0134] The data storage module 630 is used to broadcast the data to be backed up to the plurality of backup nodes through the communication connection, so as to be stored in the plurality of backup nodes as backup data. In an embodiment, the data storage module 630 can be used to perform the operation S230 described above, and details are not repeated here.
[0135] The data recovery module 640 is configured to receive backup data from the plurality of backup nodes through the communication connection and restore the backup data into the cache of the cache manager in response to detecting a recovery event of the cache manager. In an embodiment, the data recovery module 640 can be configured to perform the operation S240 described above, and thus details are not repeated here.
[0136] According to an embodiment of the present application, the cache data recovery apparatus 600 further comprises a node determining module and a node screening module.
[0137] The node determining module is configured to discover a plurality of candidate nodes capable of communicating with the server.
[0138] The node screening module is configured to determine a preset number of candidate nodes from the plurality of candidate nodes as the plurality of backup nodes according to respective performance parameters of the plurality of candidate nodes, and determine other candidate nodes as standby nodes.
[0139] According to an embodiment of the present application, the cache data recovery apparatus 600 further comprises a first signal broadcasting module and a node re-screening module.
[0140] The first signal broadcasting module is configured to broadcast a probe signal according to a first preset time period.
[0141] The node re-screening module is configured to re-determine the plurality of backup nodes and the standby nodes based on the received responses to the probe signal.
[0142] According to an embodiment of the present application, the cache data recovery apparatus 600 further comprises a second signal broadcasting module and a node replacing module.
[0143] The second signal broadcasting module is configured to detect whether there is a failed backup node by sending a heartbeat signal to the plurality of backup nodes according to a second preset time period and detecting responses to the heartbeat signal, wherein a target backup node is determined to be failed when a number of times that the target backup node fails to correctly respond to the heartbeat signal reaches a preset failure number.
[0144] The node replacing module is configured to determine at least one standby node as a replacement node to replace the target backup node based on respective performance parameters of the standby nodes in response to determining that the target backup node is failed.
[0145] According to an embodiment of the present application, the cache data recovery apparatus 600 further comprises a configuration synchronization module.
[0146] The configuration synchronization module is configured to send configuration parameters of the cache manager to the plurality of backup nodes through the communication connection when the cache manager is normally running.
[0147] According to an embodiment of the present application, the cache data recovery apparatus 600 further comprises a data marking module.
[0148] a data marking module, configured to scan data in the cache when the cache manager is running normally, and mark the data as one of the following states: having been modified but not yet stored into the non-volatile storage medium, having been stored into the non-volatile storage medium and discardable, or not having been modified.
[0149] According to an embodiment of the present application, the data storage module 630 comprises a data chunking submodule and a data broadcasting submodule.
[0150] The data chunking submodule is configured to chunk the data to be backed up according to a preset chunking size, to obtain backup chunks and check codes corresponding to the backup chunks.
[0151] The data broadcasting submodule is configured to broadcast the backup chunks and the corresponding check codes to the plurality of backup nodes.
[0152] According to an embodiment of the present application, the data recovery module 640 comprises a request broadcasting submodule, a data receiving submodule, a data storage submodule and a data writing submodule.
[0153] The request broadcasting submodule is configured to broadcast a data recovery request to the plurality of backup nodes through the communication connection in response to detecting a recovery event of the cache manager.
[0154] The data receiving submodule is configured to receive the backup chunks and the corresponding check codes sent by the plurality of backup nodes in response to the data recovery request.
[0155] The data storage submodule is configured to, in response to receiving more than one copy of the same backup chunk from more than one backup node, sequentially select the copies received from the backup nodes arranged in descending order according to a performance parameter, and verify the copies using the corresponding check codes until the verification is passed, and store the backup chunk that passes the check code verification into the non-volatile cache area.
[0156] The data writing submodule is configured to, after all the backup chunks obtained by chunking the data to be backed up are stored into the non-volatile cache area, write the data to be backed up into the cache of the cache manager.
[0157] According to an embodiment of the present application, any of the connection establishing module 610, the data determining module 620, the data storing module 630 and the data recovering module 640 can be combined in one module, or any of them can be split into multiple modules. Alternatively, at least part of the function of one or more of these modules can be combined with at least part of the function of other modules, and implemented in one module. According to an embodiment of the present application, at least one of the connection establishing module 610, the data determining module 620, the data storing module 630 and the data recovering module 640 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on chip, a system on board, a system in package, an application specific integrated circuit (ASIC), or any other reasonable way of integrating or packaging a circuit, etc. or implemented by hardware or firmware, or implemented in any one of software, hardware and firmware or in a proper combination of any of them. Alternatively, at least one of the connection establishing module 610, the data determining module 620, the data storing module 630 and the data recovering module 640 can be at least partially implemented as a computer program module which, when executed, can perform the corresponding function.
[0158] Figure 7 A block diagram of an electronic device suitable for implementing the method of recovering cached data according to an embodiment of the present application is shown.
[0159] As shown in Figure 7 The electronic device 700 according to an embodiment of the present application includes a processor 701 which can perform various appropriate actions and processes according to a program stored in a read only memory (ROM) 702 or a program loaded from a storage portion 708 into a random access memory (RAM) 703. The processor 701 can include, for example, a general purpose microprocessor (such as a CPU), an instruction set processor and / or a related chipset and / or a special purpose microprocessor (such as an application specific integrated circuit (ASIC)), etc. The processor 701 can also include an on-board memory for cache use. The processor 701 can include a single processing unit or multiple processing units for performing different actions of the method processes according to embodiments of the present application.
[0160] In the RAM 703, various programs and data required for the operation of the electronic device 700 are stored. The processor 701, the ROM 702, and the RAM 703 are connected to each other via the bus 704. The processor 701 performs various operations of the method flow according to the embodiments of the present application by executing the programs in the ROM 702 and / or the RAM 703. It should be noted that the programs can also be stored in one or more memories other than the ROM 702 and the RAM 703. The processor 701 can also perform various operations of the method flow according to the embodiments of the present application by executing the programs stored in the one or more memories.
[0161] According to the embodiments of the present application, the electronic device 700 can further include an input / output (I / O) interface 705, which is also connected to the bus 704. The electronic device 700 can further include one or more of the following components connected to the input / output (I / O) interface 705: an input part 706 including a keyboard, a mouse, and the like; an output part 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), and the like, and a speaker, and the like; a storage part 708 including a hard disk, and the like; and a communication part 709 including a network interface card such as a LAN card, a modem, and the like. The communication part 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the input / output (I / O) interface 705 as necessary. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, and the like is mounted on the drive 710 as necessary, so that a computer program read therefrom is installed in the storage part 708 as necessary.
[0162] The present application also provides a computer readable storage medium, which can be included in the device / apparatus / system described in the above embodiments; or can exist separately without being assembled into the device / apparatus / system. The above computer readable storage medium carries one or more programs, when the one or more programs are executed, the method according to the embodiments of the present application is implemented.
[0163] According to an embodiment of the present application, the computer readable storage medium can be a non-transitory computer readable storage medium, for example, can include but not limited to: a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this application, a computer readable storage medium can be any tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. For example, according to an embodiment of the present application, the computer readable storage medium can include the ROM 702 and / or the RAM 703 described above and / or one or more memory other than the ROM 702 and the RAM 703.
[0164] Embodiments of the present application also include a computer program product, which includes a computer program containing program codes for executing the methods shown in the flowcharts. When the computer program product is run in a computer system, the program codes are used to make the computer system implement the methods provided by the embodiments of the present application.
[0165] The above functions defined in the system / device / apparatus of the embodiments of the present application are performed when the computer program is executed by the processor 701. According to an embodiment of the present application, the system, device, module, unit, etc. described above can be implemented by computer program modules.
[0166] In one embodiment, the computer program can rely on tangible storage media such as optical storage media, magnetic storage media, etc. In another embodiment, the computer program can also be transmitted, distributed, and downloaded in the form of signals on network media. The computer program containing program codes can be transmitted by any appropriate network media, including but not limited to wireless, wired, etc., or any suitable combination of the foregoing.
[0167] In such an embodiment, the computer program can be downloaded and installed from the network by the communication part 709, and / or installed from the detachable medium 711. When the computer program is executed by the processor 701, the above functions defined in the system of the embodiments of the present application are performed. According to an embodiment of the present application, the system, device, apparatus, module, unit, etc. described above can be implemented by computer program modules.
[0168] According to embodiments of the present application, program code for implementing the computer programs provided by embodiments of the present application can be written in any combination of one or more programming languages, and can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. The programming language includes, but is not limited to, such languages as Java, C++, python, "C" language, or the like. The program code can execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the remote computing device, or entirely on the remote computing device or server. In the latter scenario, the remote computing device can be connected to the user's computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computing device, such as through the Internet using an Internet Service Provider.
[0169] The computer program instructions can also be loaded onto a computer or other programmable information processing apparatus to cause a series of operations to be performed on the computer or other programmable information processing apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable information processing apparatus implement the functions / acts specified in the flowchart and / or block diagram block or blocks.
[0170] Those skilled in the art will understand that features recited in the various embodiments of the present application can be combined and / or integrated in a variety of ways, even if such combinations or integrations are not expressly noted in the present application. In particular, features recited in the various embodiments of the present application can be combined and / or integrated in ways that do not depart from the spirit and scope of the present application. All such combinations and / or integrations are within the scope of the present application.
[0171] The embodiments of the present application are described above. However, these embodiments are merely for illustration purposes, and are not intended to limit the scope of the present application. Although the embodiments are described separately above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. Those skilled in the art can make various substitutions and modifications without departing from the scope of the present application, and these substitutions and modifications shall fall within the scope of the present application.
Claims
1. A method for recovering cached data, characterized in that, The cached data recovery method includes: Establish communication connections between the server where the cache manager resides and multiple backup nodes; In response to detecting an abnormal event in the cache manager, determine the data to be backed up in the cache manager's cache; The data to be backed up is broadcast to the plurality of backup nodes via the communication connection, so that it can be stored as backup data on the plurality of backup nodes; and In response to detecting a recovery event of the cache manager, a data recovery request is broadcast to the plurality of backup nodes via the communication connection; Receive backup blocks and corresponding checksums sent by the plurality of backup nodes in response to the data recovery request; In response to receiving more than one replica of the same backup block from more than one backup node, the replicas received from the backup nodes ranked from high to low according to the performance parameters are selected in turn and verified using the corresponding check code until the verification is passed. The backup block that has passed the check code verification is stored in the non-volatile buffer. After all backup blocks obtained by dividing the data to be backed up are stored in the non-volatile cache, they are written into the cache of the cache manager.
2. The cached data recovery method according to claim 1, characterized in that, The multiple backup nodes are identified in the following manner: Multiple alternative nodes capable of communicating with the server were identified; as well as Based on the performance parameters of each of the multiple candidate nodes, a preset number of candidate nodes are determined from the multiple candidate nodes as the multiple backup nodes, and the other candidate nodes are used as standby nodes.
3. The cached data recovery method according to claim 2, characterized in that, The cached data recovery method further includes: Broadcast detection signals according to the first preset time period; and Based on the received response to the detection signal, the plurality of backup nodes and the standby node are re-determined.
4. The cached data recovery method according to claim 2, characterized in that, The cached data recovery method further includes: By sending heartbeat signals to the multiple backup nodes according to a second preset time period and detecting the response to the heartbeat signals, it is possible to detect whether there is a faulty backup node. When the number of times the target backup node fails to respond correctly to the heartbeat signal reaches a preset number of faults, it is determined that the target backup node has failed. In response to determining that the target backup node has failed, at least one of the backup nodes is determined as a substitute node to replace the target backup node based on the performance parameters of each of the backup nodes.
5. The cached data recovery method according to claim 1, characterized in that, The cached data recovery method further includes: When the cache manager is running normally, the configuration parameters of the cache manager are sent to the multiple backup nodes through the communication connection.
6. The cached data recovery method according to claim 1, characterized in that, The communication connection includes a remote direct memory access connection.
7. The cached data recovery method according to claim 1, characterized in that, The data to be backed up includes only cached data that has been modified but has not yet been stored in non-volatile storage media. The cached data recovery method further includes: When the cache manager is running normally, it scans the data in the cache and marks the data as one of the following states: it has been modified but has not yet been stored in a non-volatile storage medium, it has been stored in a non-volatile storage medium and is disposable, and it has not been modified.
8. The cached data recovery method according to claim 1, characterized in that, Broadcasting the data to be backed up to the plurality of backup nodes via the communication connection, so that it can be stored as backup data on the plurality of backup nodes, includes: The data to be backed up is divided into blocks according to a preset block size to obtain backup blocks and corresponding checksums; and The backup blocks and their corresponding checksums are broadcast to the multiple backup nodes.
9. An electronic device, comprising: One or more processors; Memory, used to store one or more computer programs. The characteristic feature is that the one or more processors execute the one or more computer programs to implement the steps of the cache data recovery method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Cache data power failure protection method and computer equipment
CN103049070A
Backup method and device of distributed database, equipment and storage medium
CN119493692A