A data processing method, device, electronic equipment and storage medium
Patent Information
- Application Number
- CN202310912100.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-24
- Publication Date
- 2026-10-16
- Estimated Expiration
- 2043-07-24
AI Technical Summary
这种恢复方法严重影响主机的业务和处理效率
[0029] The embodiments of the present invention have the following advantages: by dividing the cached data area in all controller nodes into multiple cached data sub-areas, a new mirror pair is formed between the first controller node that has lost its mirror backup node and the second controller node. The cached data sub-areas of the first controller node are sorted according to the size of the cached data. Starting from the side with the largest cached data, the cached data is written to the disk, and starting from the side with the smallest cached data, the cached data is synchronized to the second controller node. This reduces the impact on host I/O processing during fault recovery, effectively improves the processing efficiency of the storage system, and improves the reliability of the storage system from multiple dimensions.
Smart Images

Figure CN117093141B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of storage software, and in particular to data processing methods, apparatus and storage media for storage systems. Background Technology
[0002] With the rapid development of technologies such as big data, cloud computing, and cloud disks, high performance and high availability of massive data storage have become one of the research topics in the industry. Various corresponding storage system architectures are also becoming more and more perfect. For example, SAN (Storage Area Network) and NAS (Network Attached Storage) are common storage system architectures.
[0003] Adding extra controllers to a storage system can improve its overall performance; many storage systems support dual or quad controllers. When a storage system has multiple controller nodes, a cached circular mirror backup approach can be used to improve the utilization of memory and computing resources, while ensuring data security.
[0004] The cache circular mirror backup means that the cache data of one controller node N1 as the master is backed up to another controller node N2, and the cache data of N2 as the master is backed up to another controller node N3, and so on, with each controller node forming a mirror team.
[0005] In existing technologies, when a storage system fails, such as when a controller node goes offline, host I / O (host writing / reading data to disk) needs to be stopped. The cached data of the still-online controller nodes needs to be written to the hard drive, the root area (the root node area of metadata) needs to be synchronized, and a new mirror pair relationship needs to be established before host I / O can be restored. This recovery method severely impacts the host's business and processing efficiency. Summary of the Invention
[0006] In view of the above problems, a data processing method, apparatus, and storage medium are proposed to provide a storage system that overcomes or at least partially solves the above problems, including:
[0007] Divide the cached data area in all controller nodes into multiple cached data sub-areas;
[0008] For the first controller node that has lost its mirror backup node, a new mirror pair is formed with the second controller node;
[0009] The cached data sub-regions of the first controller node are sorted according to the size of the cached data.
[0010] Starting from the side with the largest amount of cached data, write the cached data to disk, and starting from the side with the smallest amount of cached data, synchronize the cached data to the second controller node.
[0011] Optionally, after the step of sorting the cached data sub-regions of the first controller node according to the size of the cached data, the method further includes:
[0012] Obtain the cache region sub-objects corresponding to each of the cached data sub-regions, and put the cache region sub-objects into the pending processing list according to the sorting.
[0013] Optionally, dividing the cached data area in all controller nodes into multiple cached data sub-areas specifically includes:
[0014] Determine the smallest unit of memory size occupied by the cached data, and divide the cached data area in all controller nodes into multiple cached data sub-areas according to the unit.
[0015] Optionally, the process of forming a new mirror pair between the first controller node that has lost its mirror backup node and the second controller node includes:
[0016] Obtain the number of mirror pairs currently formed by each controller node, and determine the controller node with the smallest number of mirror pairs currently formed as the second controller node.
[0017] Optionally, the method further includes:
[0018] In response to a newly added cached data event, the cache sub-region corresponding to the newly added cached data is moved forward to the side with the largest amount of cached data, and the cached data is written to disk.
[0019] Optionally, the method further includes:
[0020] In response to a disk offline event, the operation of writing cached data to disk is stopped, and only the operation of synchronizing cached data to the second controller node is retained.
[0021] Optionally, after stopping the operation of writing cached data to disk and retaining only the operation of synchronizing cached data to the second controller node, the method further includes:
[0022] In response to a disk come back online event, the operation of writing cached data to disk is restarted.
[0023] A data processing apparatus, the apparatus comprising:
[0024] The re-mirror module is used to create a new mirror pair between the first controller node, which has lost its mirror backup node, and the second controller node.
[0025] The cached data sub-region sorting module sorts each of the cached data sub-regions of the first controller node according to the size of the cached data.
[0026] The data processing module is used to write cached data to disk starting from the side with the largest amount of cached data, and to synchronize cached data to the second controller node starting from the side with the smallest amount of cached data.
[0027] An electronic device for data processing, characterized in that it includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the steps of the data processing method described above.
[0028] A computer-readable storage medium for data processing, characterized in that a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, it implements the steps of the data processing method described above.
[0029] The embodiments of the present invention have the following advantages: by dividing the cached data area in all controller nodes into multiple cached data sub-areas, a new mirror pair is formed between the first controller node that has lost its mirror backup node and the second controller node. The cached data sub-areas of the first controller node are sorted according to the size of the cached data. Starting from the side with the largest cached data, the cached data is written to the disk, and starting from the side with the smallest cached data, the cached data is synchronized to the second controller node. This reduces the impact on host I / O processing during fault recovery, effectively improves the processing efficiency of the storage system, and improves the reliability of the storage system from multiple dimensions. Attached Figure Description
[0030] To more clearly illustrate the technical solution of the present invention, the accompanying drawings used in the description of the present invention will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0031] Figure 1 This is a flowchart of the steps of a data processing method provided in an embodiment of the present invention;
[0032] Figure 2 This is a process diagram of controller nodes re-grouping in a single-replica mirror pair according to an embodiment of the present invention;
[0033] Figure 3 This is a structural block diagram of a data processing apparatus provided in an embodiment of the present invention. Detailed Implementation
[0034] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0035] In the embodiments of this application, the terms "first" and "second" are used to distinguish identical or similar items with essentially the same function and effect, only for the purpose of clearly describing the technical solution of the embodiments of this application, and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated.
[0036] In the embodiments of this application, "multiple" means two or more, and "at least two" means two or more, unless otherwise explicitly specified.
[0037] This invention proposes a method for quickly restoring the dual-replica redundancy of each controller node when a controller node fails. Dual-replica redundancy refers to all controllers forming mirror pairs, with each pair of controller nodes synchronizing their cached data. Once all mirror pairs have synchronized their cached data, the next step, reassembling the mirror pairs, can be initiated.
[0038] There are two ways to synchronize cached data: First, write all cached data to disk for persistent storage, in which case neither controller node has any cached data. Second, perform mirror backup, where the cached data of the master controller node in the mirror pair is backed up to the other controller node paired with it.
[0039] When data is written to the write cache, memory resources are allocated. Once all data is written from the cache to the disk, completing data persistence, the corresponding memory resources are released. At this point, it can be understood that there is no corresponding cached data in memory; all data has been written to the disk. For a four-controller storage system in normal operation, every two controller nodes cache cached data belonging to their respective mirror pairs. When the host writes data, it is first written to the master controller node of the mirror pair, and then the data is backed up to the other node. Only after these steps is a write success response returned to the host for the write request. This two-backup cache data backup method ensures the security of the cached data.
[0040] Reference Figure 1The diagram illustrates a flowchart of a data processing method according to an embodiment of the present invention, which may specifically include the following steps:
[0041] Step 101: Divide the cached data area in all controller nodes into multiple cached data sub-areas;
[0042] Sub-step 11: Determine the smallest unit of memory size occupied by the cached data, and divide the cached data area in all controller nodes into multiple cached data sub-areas according to the unit.
[0043] In one embodiment of the present invention, the cached data area can be divided according to a certain granularity, which can refer to the smallest unit of memory space occupied by the cached data, such as 32M (megabytes).
[0044] Step 102: For the first controller node that has lost its mirror backup node, form a new mirror pair with the second controller node;
[0045] In one embodiment of the present invention, when a controller node failure event occurs, the mirror pair to which the failed controller node originally belonged will become a single copy state. That is, the other controller node that was paired with the failed controller node loses the controller node that backed up its cached data. At this time, it is necessary to find other controller nodes that are still online to form a new mirror pair.
[0046] Sub-step 21: Obtain the number of current mirror pairs formed by each controller node, and determine the controller node with the smallest number of current mirror pairs as the second controller node.
[0047] In one embodiment of the present invention, when a controller node failure event occurs, during the process of re-forming mirror pairs among the controller nodes, there may be a situation where one controller node forms a mirror pair with multiple controller nodes. In this case, based on the consideration of balanced allocation of controller performance, the mirror pairs become single replicas. When the controller nodes that are still online are looking for another controller node to form a new mirror pair, they will prioritize selecting the controller node with the smallest number of mirror pairs to form a team, thereby achieving effective allocation of resources and avoiding waste of resources.
[0048] In one example, such as Figure 2 As shown, a process for re-grouping controller nodes into a single-replica mirror pair is illustrated.
[0049] In the four-controller storage system, the four controller nodes are represented as nodes 0 / 1 / 2 / 3, and each node forms a mirror pair of nodes 0 / 1 / 2 / 3. The four storage segments are named storage segments 0 / 1 / 2 / 3. Each storage segment stores code and data that can be directly accessed by the program. Storage segment 0 represents a data address from bit 0 to bit 32, and this data address is assigned to mirror pair 0. Mirror pair 0 consists of controller node 0 and controller node 1, where node 0 is the master controller of mirror pair 0 and holds the master data of mirror pair 0. Similarly, storage segment 1 represents a data address from bit 32 to bit 64, and this data address is assigned to mirror pair 1, which consists of controller node 1 and controller node 2, where node 1 is the master controller of mirror pair 1. The same rules are used for allocating other storage segments and mirror pairs, and will not be elaborated further here.
[0050] In a normally operating four-controller storage system, the controller nodes form mirror pairs, with each node having two redundant copies. For example, in mirror pair 0, node 0 stores the primary data belonging to mirror pair 0 and backs up a copy of this data to its paired node 1. Following this rule, the controller nodes form pairs sequentially until node 3, where the primary data belonging to mirror pair 3 is backed up to node 0. This establishes a circular mirror backup relationship among the controller nodes.
[0051] For events such as controller node failure, Figure 2 As shown, node 0 is offline. The original mirror pair 1 consisting of node 0 and node 1, and the mirror pair 3 consisting of node 0 and node 3, have become single-copy states. At this time, both node 1 and node 3 need to find a new controller node to form a new mirror pair.
[0052] In this example, node 3 synchronizes the cached data belonging to mirror pair 3 to node 2. Node 2 serves as a backup data node for node 3, forming a new mirror pair 3 with node 3.
[0053] After mirror pair 3 restores its two-replica redundant state, node 1 also needs to find a new node to form a new mirror pair 0. At this point, node 2 has formed three mirror pairs (mirror pairs 1, 2, and 3), and node 3 has formed two mirror pairs (mirror pairs 1 and 3). Based on the principle of balanced distribution of controller node performance, in this example, node 1 does not choose node 2, but instead chooses node 3 to form a new mirror pair. Node 2 synchronizes the data belonging to mirror pair 0 to node 3. At this time, node 3 becomes the master controller of the mirror pair, holding the master data of mirror pair 0, while node 1 remains the backup data node for mirror pair 0. Thus, all mirror pairs that have become single-replicas have restored their two-replica redundant state.
[0054] Step 103: Sort each of the cached data sub-regions of the first controller node according to the size of the cached data;
[0055] In one embodiment of the present invention, after dividing the cache area of all controller nodes into multiple cache sub-areas with a certain granularity, the cache sub-areas are sorted according to the size of the cached data.
[0056] Sub-step 31: Obtain the cache region sub-objects corresponding to each of the cached data sub-regions, and put the cache region sub-objects into the pending processing list according to the sorting.
[0057] In one embodiment of the present invention, each cache sub-region is abstracted into a corresponding cache sub-object. The method of abstraction into an object refers to extracting the characteristic data information corresponding to each cache sub-region, and summarizing and generalizing each cache sub-object into data containing the corresponding characteristic data information and possessing identifiable characteristics—that is, a cache sub-object. During data processing, it is only necessary to call the cache sub-object to operate on the cached data in the cache sub-region corresponding to that sub-object.
[0058] The aforementioned cached sub-objects are added to the pending processing list according to their cache size. A linked list storage structure refers to using a set of arbitrary storage units to store the data elements of a linear list, linked together by pointers.
[0059] The cache sub-object corresponding to the cache sub-region with the largest amount of cached data is placed at the head of the linked list, and correspondingly, the cache sub-object corresponding to the cache sub-region with the smallest amount of cached data is placed at the tail of the linked list.
[0060] Step 104: Starting from the side with the largest amount of cached data, write the cached data to the disk, and starting from the side with the smallest amount of cached data, synchronize the cached data to the second controller node.
[0061] In one embodiment of the present invention, the cache areas of all controller nodes are divided into multiple cache sub-areas with a certain granularity. The cache sub-areas in the controller nodes are sorted according to the size of the cached data. Each cache sub-area is abstracted into a cache area sub-object and placed into a list to be processed. Starting from the head of the list, the cache area sub-object is called to write the cached data in its corresponding cache sub-area to the hard disk. When all the cached data has been written, the synchronization of the metadata root node area is started and synchronized to the team controller node in the new mirror pair.
[0062] While writing the cached data corresponding to the head of the linked list, the cached data in the cached sub-area corresponding to the cached sub-object at the tail of the linked list is synchronized to another controller node formed with this controller node using a mirror synchronization method. After the corresponding cached data synchronization is completed, the synchronization of the metadata root node area is started and synchronized to the team controller node in the new mirror pair.
[0063] The above method is used to synchronize cached data on all controller nodes. After synchronization is complete, all mirror pairs are in a state of double-copy redundancy, at which point the reassembly of mirror pairs can be initiated.
[0064] In this embodiment, when a controller node failure occurs, during the process of reassembling new mirror pairs among the controller nodes, the cache data area is divided. Since the cache data area is no longer a single area but is split into many sub-areas with a certain granularity, and the cache data is written to the disk while the cache data mirroring synchronization between controller nodes is used, the idle sub-areas in the cache area do not stop responding to host I / O. This non-globally blocking method of writing cache data to the disk can effectively reduce the impact on host I / O services.
[0065] Sub-step 41: In response to the newly added cached data event, the cache sub-region corresponding to the newly added cached data is moved forward to the side with the largest amount of cached data, and the cached data is written to the disk.
[0066] In one embodiment of the present invention, in the event of a controller node failure, during the process of reassembling a new mirror pair from the various controller nodes, the cache regions of all controller nodes are divided into multiple cache sub-regions with a certain granularity. Each cache sub-region in the controller node is sorted according to the size of the cached data. Each cache sub-region is then abstracted into a cache region sub-object and placed into a pending linked list. Starting from the head of the linked list, the cache region sub-object is called, and the cached data in its corresponding cache sub-region is written to the hard disk. Once all cached data has been written, synchronization of the metadata root node region is initiated and synchronized to the pairing controller nodes in the new mirror pair. At this time, if the host writes new data, the sub-objects in the pending linked list corresponding to the cache sub-region containing that data will be prioritized and moved towards the head of the linked list. This ensures that newly added data is written to the disk at a faster speed, reducing the latency of host data writing and minimizing the impact on host services.
[0067] Sub-step 51: In response to a disk offline event, stop the operation of writing cached data to disk, and only retain the operation of synchronizing cached data to the second controller node.
[0068] In one embodiment of the present invention, in the event of a controller node failure, during the process of reassembling a new mirror pair from the various controller nodes, the cache areas of all controller nodes are divided into multiple cache sub-regions with a certain granularity. Each cache sub-region in the controller node is sorted according to the size of the cached data. Each cache sub-region is then abstracted into a cache region sub-object and placed into a pending linked list. Starting from the head of the linked list, the cache region sub-object is called, and the cached data in its corresponding cache sub-region is written to the hard disk. Once all cached data has been written, synchronization of the metadata root node area is initiated and synchronized to the grouping controller nodes in the new mirror pair. At this time, if a disk offline event occurs, the operation of writing cached data to the disk will be suspended. All controller nodes are synchronized using a node-to-node mirror synchronization method, ensuring the normal reassembly of the mirror pair and improving the reliability of the storage system.
[0069] Sub-step 511: In response to the disk coming back online event, the operation of writing cached data to disk is restarted.
[0070] When the disk is offline, the operation of writing cached data to the hard drive is suspended. The system will continuously listen for disk coming back online. When the system detects that the disk has come back online, it will restart the operation of writing cached data to the hard drive and restore the different data synchronization methods on both sides.
[0071] In this embodiment of the invention, by dividing the cached data area in all controller nodes into multiple cached data sub-areas, a new mirror pair is formed between the first controller node that has lost its mirror backup node and the second controller node. The cached data sub-areas of the first controller node are sorted according to the size of the cached data. Starting from the side with the largest cached data, the cached data is written to the disk, and starting from the side with the smallest cached data, the cached data is synchronized to the second controller node. This reduces the impact on host I / O processing during fault recovery, effectively improves the processing efficiency of the storage system, and improves the reliability of the storage system from multiple dimensions.
[0072] Reference Figure 3 The diagram shows a structural schematic of a data processing apparatus according to an embodiment of the present invention, which may specifically include the following modules:
[0073] The cache data region partitioning module 301 is used to divide the cache data region in all controller nodes into multiple cache data sub-regions;
[0074] The re-mirror module 302 is used to form a new mirror pair between the first controller node, which has lost its mirror backup node, and the second controller node.
[0075] The cached data sub-region sorting module 303 sorts each of the cached data sub-regions of the first controller node according to the size of the cached data.
[0076] The data processing module 304 is used to write cached data to disk starting from the side with the largest amount of cached data, and to synchronize cached data to the second controller node starting from the side with the smallest amount of cached data.
[0077] In one embodiment of the present invention, the device further includes:
[0078] The sub-object acquisition module is used to acquire the cache region sub-objects corresponding to each of the cached data sub-regions, and put the cache region sub-objects into the pending processing linked list according to the sorting.
[0079] In one embodiment of the present invention, the cache data region partitioning module 301 may include:
[0080] The granularity determination submodule is used to determine the smallest unit of memory size occupied by the cached data, and divide the cached data area in all controller nodes into multiple cached data sub-areas according to the unit.
[0081] In one embodiment of the present invention, the re-mirroring module 302 may include:
[0082] The team controller node determination module obtains the number of current image pairs formed by each controller node and determines the controller node with the smallest number of current image pairs as the second controller node.
[0083] In one embodiment of the present invention, the device further includes:
[0084] A new data processing module is added to respond to the event of newly added cached data by moving the cache sub-region corresponding to the newly added cached data to the side with the largest amount of cached data, and writing the cached data to the disk.
[0085] The cache data write control module is used to stop the operation of writing cache data to disk in response to a disk offline event, and only retain the operation of synchronizing cache data to the second controller node.
[0086] In one embodiment of the present invention, the cached data write control module may include:
[0087] The cached data write-recall submodule is used to re-initiate the operation of writing cached data to disk in response to a disk re-coming online event.
[0088] An embodiment of the present invention also provides an electronic device, which may include a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, it implements the above-described data processing method.
[0089] An embodiment of the present invention also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, it implements the above-described data processing method.
[0090] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.
[0091] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation portals are provided for users to choose to authorize or refuse.
[0092] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0093] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, embodiments of the present invention can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present invention can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0094] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1A device that provides the functions specified in one or more boxes.
[0095] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0096] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0097] Although preferred embodiments of the present invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present invention.
[0098] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes the aforementioned element.
[0099] The above provides a detailed description of the data synchronization method, apparatus, electronic device, and storage medium. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A data processing method applied to a four-controller storage system, characterized in that, The method includes: Divide the cached data area in all controller nodes into multiple cached data sub-areas; For the first controller node that has lost its mirror backup node, a new mirror pair is formed with the second controller node; The cached data sub-regions of the first controller node are sorted according to the size of the cached data. Starting from the side with the largest amount of cached data, write the cached data to disk, and starting from the side with the smallest amount of cached data, synchronize the cached data to the second controller node; In response to a newly added cached data event, the cache sub-region corresponding to the newly added cached data is moved forward to the side with the largest amount of cached data, and the cached data is written to disk.
2. The method according to claim 1, characterized in that, After the step of sorting the cached data sub-regions of the first controller node according to the size of the cached data, the method further includes: Obtain the cache region sub-objects corresponding to each of the cached data sub-regions, and put the cache region sub-objects into the pending processing list according to the sorting.
3. The method according to claim 1, characterized in that, The process of dividing the cached data area in all controller nodes into multiple cached data sub-areas specifically includes: Determine the smallest unit of memory size occupied by the cached data, and divide the cached data area in all controller nodes into multiple cached data sub-areas according to the unit.
4. The method according to claim 1, characterized in that, The process of forming a new mirror pair between the first controller node, which has lost its mirror backup node, and the second controller node includes: Obtain the number of mirror pairs currently formed by each controller node, and determine the controller node with the smallest number of mirror pairs currently formed as the second controller node.
5. The method according to claim 1, characterized in that, The method includes: In response to a disk offline event, the operation of writing cached data to disk is stopped, and only the operation of synchronizing cached data to the second controller node is retained.
6. The method according to claim 5, characterized in that, After the step of stopping the operation of writing cached data to disk and retaining only the operation of synchronizing cached data to the second controller node, the method further includes: In response to a disk come back online event, the operation of writing cached data to disk is restarted.
7. A data processing apparatus, characterized in that, The device includes: The cache data region partitioning module is used to divide the cache data region in all controller nodes into multiple cache data sub-regions; The re-mirror module is used to create a new mirror pair between the first controller node, which has lost its mirror backup node, and the second controller node. The cached data sub-region sorting module sorts each of the cached data sub-regions of the first controller node according to the size of the cached data. The data processing module is used to write cached data to disk starting from the side with the largest amount of cached data, and to synchronize cached data to the second controller node starting from the side with the smallest amount of cached data. The device further includes: A new data processing module is added to respond to the event of newly added cached data by moving the cache sub-region corresponding to the newly added cached data to the side with the largest amount of cached data, and writing the cached data to the disk.
8. An electronic device for data processing, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the data processing method as described in any one of claims 1 to 6.
9. A computer-readable storage medium for data processing, characterized in that, A computer program is stored on the computer-readable storage medium, which, when executed by a processor, implements the data processing method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Data caching method, system and device and medium
CN112131046A
Cache data processing method and system under four-control storage device fault
CN115237683A