Methods, computer equipment, storage media, and program products for updating synchronization logs

By generating and managing synchronization logs between the primary and secondary storage systems, the inefficiency of difference bitmaps is resolved, enabling more efficient request processing and data synchronization, and ensuring data consistency and resource conservation in the event of system failure.

CN119396851BActive Publication Date: 2025-10-28INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411980960.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-10-28
Estimated Expiration
2044-12-30

AI Technical Summary

Technical Problem

In existing technologies, the remote replication relationship built by the difference bitmap at the storage granularity is inefficient when processing continuously received data modification requests for different locations of the same storage granularity, resulting in low efficiency in request processing and data synchronization.

Method used

By adopting the method of updating the synchronization log, a target log corresponding to the target request is generated and added to the synchronization log file to mark the difference data between the primary storage system and the secondary storage system, replacing the role of the difference bitmap. This allows the difference data to be marked at a smaller dimension and the synchronization operation to be performed in parallel.

Benefits of technology

It improves request processing efficiency and data synchronization efficiency, reduces network and computing resource consumption, ensures data consistency, and conserves network resources in case of failure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119396851B_ABST
    Figure CN119396851B_ABST
Patent Text Reader

Abstract

This invention relates to the field of storage technology and discloses a method, computer device, storage medium, and program product for updating synchronization logs. The method includes: upon receiving a target request, parsing the target request to obtain data operation information corresponding to the target request; generating a target log corresponding to the target request based on a pre-built data synchronization mechanism and the data operation information; obtaining the identification information of the current node; determining the synchronization log file corresponding to the identification information of the current node; adding the target log to the synchronization log file; and sending synchronization instruction information to the secondary node corresponding to the current node in the secondary storage system to perform data synchronization operations. This invention can improve request processing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of storage technology, and more specifically to methods for updating and synchronizing logs, computer devices, storage media, and program products. Background Technology

[0002] In the field of storage technology, the Remote Copy (RC) relationship is defined as the relationship between the primary storage system and the volumes on the primary storage system. Based on the remote copy relationship, the primary storage system will synchronize the data on each primary volume to the corresponding secondary volume in the primary storage system.

[0003] When creating a remote replication relationship, a difference bitmap can be created on the primary storage system. Each difference bit in the difference bitmap indicates whether the latest written data on the corresponding storage grain on the primary volume has been synchronized to the secondary volume. Upon receiving a request, any node in the primary storage system will modify the difference bit in its managed difference bitmap corresponding to the storage grain containing the requested data to "dirty," and then synchronize the requested data to the corresponding storage location on the secondary storage system. After completing the write operation on the primary storage system and the synchronization operation on the secondary storage system, the current node will modify the difference bit corresponding to the storage grain to "clean."

[0004] Because the difference bitmap is constructed at the storage granularity level, if consecutive requests are received that modify data at different locations within the same storage granularity, subsequent requests can only be processed after the preceding requests have completed their synchronization operations and updated the difference bitmap, resulting in low efficiency. For example, if three requests are received that modify different locations in storage granular 1, the data corresponding to request 1 must first be written to storage granular 1, the difference bit in the difference bitmap for storage granular 1 must be changed to "dirty", and the data corresponding to request 1 must be synchronized to the secondary storage system. Only after completing the synchronization operation for request 1 and changing the difference bit in storage granular 1 to "clean" can the operations for request 2 be executed. Summary of the Invention

[0005] In view of this, the present invention provides a method, apparatus, computer device, storage medium, and program product for updating synchronization logs to solve the problems of low request processing efficiency and data synchronization efficiency.

[0006] In a first aspect, the present invention provides a method for updating a synchronization log. This method is applied to a data synchronization system, which includes a primary storage system and a secondary storage system. The primary and secondary storage systems each include a plurality of nodes of the same number. The method is executed by the current node, which is any one of the plurality of nodes included in the primary storage system. The method includes:

[0007] When a target request is obtained, it is parsed to obtain the data operation information corresponding to the target request;

[0008] Based on the pre-built data synchronization mechanism and data operation information, generate target logs corresponding to the target request;

[0009] Get the identifier information of the current node;

[0010] Based on the identification information of the current node, determine the synchronization log file corresponding to the identification information of the current node;

[0011] Add the target log to the synchronization log file;

[0012] The synchronization instruction information is sent to the secondary node corresponding to the current node in the secondary storage system. The synchronization instruction information includes the data to be synchronized corresponding to the target log and the location information corresponding to the data to be synchronized, so that the secondary node can perform data synchronization operation.

[0013] The method for updating synchronization logs provided by this invention has the following advantages:

[0014] This solution parses each request to obtain data operation information. Furthermore, it generates logs based on the current node's data synchronization mechanism and the parsed data operation information. Additionally, it determines the corresponding synchronization log file based on the current node's identifier. Further, the current node can add the generated logs to the synchronization log file to mark the differences between the primary and secondary storage systems, replacing the use of difference bitmaps in related technologies. Thus, for multiple consecutive requests targeting different storage locations of the same storage granularity, this solution can record a separate log for each request in the synchronization log file. In other words, this solution can mark difference data at a dimension smaller than the storage granularity, enabling parallel execution of synchronization operations for multiple requests targeting different storage locations of the same storage granularity, thereby improving request processing efficiency.

[0015] In some optional implementations, after sending synchronization indication information to the secondary node corresponding to the current node in the secondary storage system, the method further includes:

[0016] Receive target response information from the auxiliary node, wherein the target response information is the response information generated by the auxiliary node after completing the data synchronization operation according to the synchronization instruction information;

[0017] Delete the target log from the synchronization log file based on the target response information.

[0018] Specifically, upon receiving the target response information from the secondary node, the data synchronization operation can be initiated. At this point, the corresponding target log should be promptly deleted to indicate that the difference data with the target log has been synchronized. This frees up storage resources in a timely manner.

[0019] In one alternative implementation, the data operation information includes the target logical starting address and the target data length.

[0020] Specifically, the target logical starting address and target data length can indicate the storage location of the target requested operation data. When generating the target log based on this information, the target log can indicate the specific storage location, which facilitates accurate data synchronization operations.

[0021] In one optional implementation, a target log corresponding to the target request is generated based on a pre-built data synchronization mechanism and data operation information, including:

[0022] When the data synchronization mechanism is a real-time type, the target log is generated based on the target logical starting address and the target data length.

[0023] Specifically, since the real-time data synchronization mechanism refers to performing data synchronization operations after each write operation in the main storage system is completed, this solution can generate a target log based on the target logical starting address and the target data length to mark the location of the currently stored differential data.

[0024] In one optional implementation, a target log corresponding to the target request is generated based on a pre-built data synchronization mechanism and data operation information, including:

[0025] When the data synchronization mechanism is a periodic data synchronization mechanism, determine whether the current node is in a data synchronization state. The data synchronization state is used to indicate that the current node is performing the data synchronization operation of the current period.

[0026] When it is determined that the current node is not in a data synchronization state, the identification information of the target storage particle corresponding to the target request is determined according to the target logical starting address and the preset data length, wherein the preset data length is the data length of the storage particle;

[0027] Target logs are generated based on the identification information of the target storage granules.

[0028] Specifically, for periodic data synchronization mechanisms, each period requires synchronizing multiple requests. These requests may involve write operations on data at different storage locations within the same storage granularity, and each synchronization consumes both network and computing resources. Therefore, under this mechanism, when a node is not in a data synchronization state, the identifier information of the target storage granularity corresponding to the data operated on by the target request is calculated based on the target logical starting address and the preset data length, and recorded as a target log. This allows data synchronization operations to be performed on a granular basis, conserving network and computing resources.

[0029] In one alternative implementation, the method further includes:

[0030] When it is determined that the current node is in a data synchronization state, a target log is generated based on the target logical starting address and the target data length.

[0031] Specifically, when a node is in data synchronization mode, a target log is generated based on the target logical starting address and the target data length. This distinguishes it from the data that needs to be synchronized in the current period, making the data synchronization operation more standardized and clear.

[0032] In an alternative implementation, after adding the target log to the synchronization log file, the method further includes:

[0033] When the data synchronization operation of the current cycle is determined to be over, the identification information of the target storage granule corresponding to the target request is determined based on the target logical starting address and the preset data length.

[0034] The target logical starting address and target data length included in the target log are converted into the identification information of the target storage granules, which are then used to perform data synchronization operations for the next cycle corresponding to the current cycle.

[0035] Specifically, under the periodic data synchronization mechanism, when the data synchronization operation of the current period is completed, the target log can be converted from the target logical starting address and target data length into the identification information of the target storage granules, so as to facilitate the data synchronization operation of the next period.

[0036] In one alternative implementation, the method further includes:

[0037] When it is determined that the data synchronization operation corresponding to the target request has failed, the identification information of the target storage granule corresponding to the target request is determined based on the target logical starting address and the preset data length.

[0038] Add the target storage granule's identification information to the target log to indicate that the data synchronization operation corresponding to the target request should be re-executed.

[0039] Specifically, in a real-time data synchronization mechanism, if the data synchronization operation fails, the target log, which includes the target logical starting address and the target data length, can be converted into the identifier information of the target storage granule. This facilitates subsequent comprehensive processing of failed data synchronization requests at the storage granule level, ensuring that faults are handled while conserving network and computing resources.

[0040] In an optional implementation, after adding the identification information of the target storage particle to the target log, the method further includes:

[0041] Start timing;

[0042] When the preset timeout period is reached, each log entry in the synchronization log file is iterated through.

[0043] Each time a log entry is encountered, it is determined whether the log entry contains the identification information of the storage granule.

[0044] When it is determined that the traversed log contains the identification information of the storage granules, the traversed log is identified as a candidate log;

[0045] When at least one candidate log is identified, each candidate log is classified according to the identification information of the storage particles included in each candidate log to obtain at least one log group. Among them, all candidate logs belonging to the same log group include the same identification information of the storage particles.

[0046] Based on the identification information of the storage granule corresponding to the first log group, perform data synchronization operation on the storage granule corresponding to the first log group, wherein the first log group is any one of at least one log group.

[0047] Specifically, if the data synchronization operation fails, it indicates a possible failure in either the primary or secondary storage system. The nodes in the primary storage system can be timed; during this time, the failure may be corrected. Therefore, when the preset timeout period is reached, the logs are traversed again, and data synchronization is performed on failed requests to ensure data consistency between the primary and secondary storage systems.

[0048] In one alternative implementation, the method further includes:

[0049] When it is determined that the data synchronization operation for the storage granules corresponding to the first log group is complete, each candidate log entry included in the first log group is deleted from the synchronization log file.

[0050] Specifically, when it is determined that the data synchronization operation of the storage granules corresponding to the first log group is completed, each candidate log in the first log group is deleted from the synchronization log file, which can free up storage resources in a timely manner.

[0051] In an optional implementation, when the current node is the master node in the master storage system, the method further includes:

[0052] When a failure is detected in any node other than the master node in the main storage system, the identification information of the failed node is obtained.

[0053] Based on the identification information of the faulty node, and the mapping relationship between the identification information of the pre-built management node and the identification information of the candidate node, the first candidate node corresponding to the faulty node is determined. The first candidate node is any node among the other nodes in the main storage system other than the faulty node.

[0054] The management of the synchronization log file corresponding to the faulty node is transferred to the first backup node.

[0055] Specifically, after a node fails, the master node can promptly identify the first backup node corresponding to the failed node. This backup node then takes over the log files managed by the failed node and can accurately mark any differences during the node's failure period. Currently, to ensure accurate marking of differences even during failures, the management node needs to synchronize the changed difference bitmap to the corresponding backup node whenever any bit in the difference bitmap changes (i.e., the backup node needs to back up the difference bitmap and update it in real time). This requires two interactions for each request, resulting in significant network resource consumption. In contrast, this solution only requires transferring management of the corresponding synchronized log files after a management node fails, eliminating the need for multiple interactions and saving network resources.

[0056] In one alternative implementation, the method further includes:

[0057] Based on the identification information and mapping relationship of the faulty node, determine the target management node corresponding to the faulty node;

[0058] Based on the pre-built fault handling mechanism, a second alternative node is selected from the nodes in the main storage system other than the target management node and the faulty node.

[0059] The second alternative node is determined as the alternative node corresponding to the target management node.

[0060] Specifically, for log files of faulty nodes that are used as backup nodes, a new backup node should be selected for the log file in a timely manner to avoid the problem that data synchronization cannot be performed when the management node corresponding to the log file fails and there is no node to manage the log file.

[0061] In one alternative implementation, the method further includes:

[0062] When performing data synchronization operations on the primary and secondary storage systems for the first time, each storage granularity managed by the current node is traversed.

[0063] Each time a storage particle is traversed, the data stored in the traversed storage particle will be synchronized to the corresponding backup storage particle in the secondary storage system.

[0064] When the data synchronization operation of each storage granule is completed, the value of the pre-built synchronization progress variable is updated according to the preset data length.

[0065] When the value of the synchronization progress variable is equal to the preset threshold, the data synchronization operation is stopped. The preset threshold is the total amount of data stored in all storage granules managed by the current node.

[0066] Specifically, in the case of the first data synchronization operation, there is no need to use a difference bitmap; the data synchronization progress can be understood by updating the synchronization progress variable, which is more convenient.

[0067] Secondly, the present invention provides an apparatus for updating synchronization logs, the apparatus comprising:

[0068] The acquisition module is used to parse the target request when it is acquired, and obtain the data operation information corresponding to the target request.

[0069] The generation module is used to generate target logs corresponding to the target request based on a pre-built data synchronization mechanism and data operation information;

[0070] The acquisition module is also used to acquire the identification information of the current node;

[0071] The determination module is used to determine the synchronization log file corresponding to the current node's identification information based on the current node's identification information;

[0072] Add a module to add the target log to the synchronization log file;

[0073] The sending module is used to send synchronization indication information to the secondary node corresponding to the current node in the secondary storage system. The synchronization indication information includes the data to be synchronized corresponding to the target log and the location information corresponding to the data to be synchronized, so that the secondary node can perform data synchronization operation.

[0074] Thirdly, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the computer instructions to perform the method for updating and synchronizing logs as described in the first aspect or any corresponding embodiment.

[0075] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to execute the method for updating and synchronizing logs described in the first aspect or any corresponding embodiment thereof.

[0076] Fifthly, the present invention provides a computer program product, including computer instructions for causing a computer to execute the method for updating and synchronizing logs described in the first aspect or any corresponding embodiment thereof. Attached Figure Description

[0077] To more clearly illustrate the technical solutions in the specific embodiments or related technologies of the present invention, the drawings used in the description of the specific embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0078] Figure 1 This is a schematic diagram of the architecture of the main storage system according to an embodiment of the present invention;

[0079] Figure 2 This is a flowchart illustrating a method for updating synchronization logs according to an embodiment of the present invention;

[0080] Figure 3 This is a schematic diagram of a synchronization log file under a real-time data synchronization mechanism according to an embodiment of the present invention;

[0081] Figure 4 This is a schematic diagram of a synchronization log file under a periodic data synchronization mechanism according to an embodiment of the present invention;

[0082] Figure 5 This is a schematic diagram of a synchronization log file under another periodic data synchronization mechanism according to an embodiment of the present invention;

[0083] Figure 6 This is a schematic diagram of a synchronization log file under another real-time data synchronization mechanism according to an embodiment of the present invention;

[0084] Figure 7 This is a flowchart illustrating a method for determining candidate nodes according to an embodiment of the present invention.

[0085] Figure 8 This is a schematic diagram of the synchronization log file of a faulty node according to an embodiment of the present invention;

[0086] Figure 9 This is a schematic diagram illustrating the mapping relationship between the identification information of the management node and the identification information of the candidate node according to an embodiment of the present invention;

[0087] Figure 10 This is a flowchart illustrating the initial data synchronization operation method according to an embodiment of the present invention;

[0088] Figure 11 This is a schematic diagram of the synchronization progress of the initial data synchronization operation according to an embodiment of the present invention;

[0089] Figure 12 This is a structural block diagram of an apparatus for updating and synchronizing logs according to an embodiment of the present invention;

[0090] Figure 13 This is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. Detailed Implementation

[0091] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0092] The embodiments of the present invention can be applied to a data synchronization system, which may include a primary storage system and a secondary storage system, such as... Figure 1 As shown, the primary storage system and secondary storage system can each include nodes and storage devices that handle the same data. In the primary storage system, one node acts as the master node, managing the other nodes. This primary storage system can be a multi-controller storage system (MCS).

[0093] During the initialization of the primary storage system, a log volume can be created among the storage devices included in the system. This log volume can contain multiple log files, the number of which can be the same as the number of nodes in the primary storage system. Each node in the primary storage system can manage one log file, and the log file's identification information can include the identification information of its corresponding management node. For example... Figure 1As shown, node 1 in the primary storage system can manage log file 1. Furthermore, the primary storage system can access all log files in the log volume. Additionally, the primary storage system includes storage volumes (which can be called primary volumes) for storing data; a storage volume can include multiple storage grains. Each node in the primary storage system manages the data on a portion of the storage grains on the primary storage system's storage devices. The secondary storage system also includes storage volumes (which can be called secondary volumes), and each node in the secondary storage system manages the data on a portion of the storage grains on the secondary storage system's storage devices.

[0094] For example, the identifier of a log volume can be "9999", its size can be "400GB", and it can be hidden from users, meaning users cannot use the log volume. The identifier of a log file can be "NODE1.LOG", indicating that the log file is managed by node 1.

[0095] According to an embodiment of the present invention, a method embodiment for updating a synchronization log is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0096] This embodiment provides a method for updating synchronization logs, which can be executed by any node included in the main storage system (hereinafter referred to as the current node). Figure 2 This is a flowchart of a method for updating synchronization logs according to an embodiment of the present invention, such as... Figure 2 As shown, the process includes the following steps:

[0097] Step S201: When the target request is obtained, the target request is parsed to obtain the data operation information corresponding to the target request.

[0098] The target request is any request obtained by the current node. The data synchronization mechanism can be either real-time or periodic. A real-time data synchronization mechanism performs data synchronization after each write operation to the main storage system upon completion of a request. A periodic data synchronization mechanism involves the node periodically performing data synchronization operations according to a preset period duration. Data operation information may include the target logical starting address, the target data length (which can be called Size), and the operation data. The target logical starting address can be a logical block address (LBA).

[0099] Specifically, the current node can receive requests from clients (this will be used as an example in the following explanation), or it can generate requests based on its own business processing mechanism. In this way, the current node can obtain the requests. Taking the target request as an example, after obtaining the target request, the current node can parse the target request to obtain data operation information.

[0100] After parsing the data operation information, the current node can perform write operations on the corresponding target storage location on the storage devices included in the primary storage system, based on the target logical starting address, target data length, and operation data. Additionally, the current node can synchronize newly written data from the target storage location to the corresponding storage location in the secondary storage system based on the remote copy (RC) relationship between the primary and secondary storage systems. Remote copy relationships can include synchronous, asynchronous, and periodic remote copy relationships. Under synchronous remote copy, after completing each write operation, the current node synchronizes the data to the secondary storage system and sends a completion notification to the client. Under asynchronous remote copy, the current node sends a completion notification to the client after completing each write operation and then performs data synchronization. Periodic remote copy sends a completion notification to the client after completing each write operation and performs data synchronization according to a set periodic interval.

[0101] During the write operation on the target request described above, a write failure to the current node's cache may occur. In this case, the current node can return a write failure notification to the client. Alternatively, during the data synchronization process described above, a write failure to the secondary storage system may occur. In this case, as long as the write operation on the current node is successful, a write success notification can be sent to the client.

[0102] Step S202: Generate the target log corresponding to the target request based on the pre-built data synchronization mechanism and data operation information.

[0103] Specifically, based on different data synchronization mechanisms and data operation information, the following three scenarios can be considered:

[0104] In the first scenario, when the data synchronization mechanism is real-time, the current node can generate the target log based on the target logical starting address and the target data length. For example, Figure 3 All logs in the synchronization log file shown include a logical starting address and data length. Data synchronization operations under this mechanism can be performed based on either the synchronous remote replication relationship or the asynchronous remote replication relationship described above.

[0105] In the second scenario, when the data synchronization mechanism is a periodic type, it can be determined whether the current node is in a data synchronization state. If it is determined that the current node is not in a data synchronization state, the identifier information (Grain Index) of the target storage granule corresponding to the target request is determined based on the target logical starting address and the preset data length. The target log is then generated based on the identifier information of the target storage granule. For example, Figure 4 All logs in the synchronization log file shown include identification information for the storage granules. Data synchronization operations under this mechanism can be performed based on the aforementioned periodic remote replication relationship.

[0106] The data synchronization status indicates that the current node is performing data synchronization operations for the current period. The identification information of the target storage particle can be obtained by rounding down the ratio of the target logical starting address to the preset data length. The preset data length is the data length of the storage particle.

[0107] In the third scenario, when the data synchronization mechanism is a periodic type, it determines whether the current node is in a data synchronization state. If it is determined that the current node is in a data synchronization state, the target log is generated based on the target logical starting address and the target data length. For example... Figure 5 As shown, some logs in the synchronization log file only include the identification information of the storage granules, while others only include the logical starting address and data length. The latter is the log corresponding to the request received during the execution of the data synchronization operation of the current cycle.

[0108] Step S203: Obtain the identification information of the current node.

[0109] Step S204: Determine the synchronization log file corresponding to the current node's identification information based on the current node's identification information.

[0110] Specifically, the current node can determine its synchronization log file in the log volume of the storage devices included in the main storage system based on its own identification information.

[0111] Step S205: Add the target log to the synchronization log file.

[0112] Specifically, the current node can obtain the number of the latest log in the synchronization log file, increment that number by one to get the number of the target log, and then store the target log at the position corresponding to the target log number.

[0113] In some alternative implementations, since writing logs directly to the storage device is inefficient, the current node can first record the target log in its cache to speed up processing. Then, based on a preset caching algorithm, when it's time to perform a disk write operation, the target log in the cache is written to the synchronization log file of the primary storage system's storage device. This improves the efficiency of updating the synchronization log.

[0114] Step S206: Send synchronization indication information to the secondary node corresponding to the current node in the secondary storage system.

[0115] The synchronization indication information may include the data to be synchronized corresponding to the target log, as well as the location information of the data to be synchronized.

[0116] Specifically, depending on the data synchronization mechanism, sending synchronization indication information to the secondary node corresponding to the current node in the secondary storage system can include the following two cases:

[0117] In scenario one, when the data synchronization mechanism is a real-time mechanism, the current node can generate synchronization indication information based on the parsed target logical start address, target data length, and operation data (or, based only on the target logical start address and operation data), and send it to the corresponding secondary node (e.g., node 1 in the primary storage system sends synchronization indication information to node 1 in the secondary storage system). Here, the operation data is the data to be synchronized mentioned above, and the target logical start address and target data length are the location information corresponding to the data to be synchronized. The secondary node, based on the target logical start address and target data length (or, based only on the target logical start address) included in the synchronization indication information, determines the corresponding storage location on the storage devices included in the secondary storage system and writes the operation data, thus completing the data synchronization operation corresponding to the target request.

[0118] Scenario 2: When the data synchronization mechanism is a periodic type, the current node can begin traversing the synchronization log file at the periodic trigger time. For each log entry encountered, it determines whether the log contains the identification information of the storage granule. If the log contains the identification information, it is designated as a candidate log. When at least one candidate log is identified, it is categorized based on the identification information of the storage granule included in each candidate log, resulting in at least one log group. Based on the identification information of the storage granule corresponding to the target log group, data is extracted from the storage granule corresponding to the target log group. Synchronization indication information is generated based on the identification information of the storage granule and the data extracted from the storage granule corresponding to the target log group, and sent to the auxiliary node corresponding to the current node. The target log group can be any one of at least one log group. When the target log group includes the target log, the data extracted from the storage granule corresponding to the target log group includes the data to be synchronized corresponding to the target log. The location information of the data to be synchronized is the identification information of the storage granule corresponding to the target log group.

[0119] It should be noted that when the data synchronization mechanism is periodic, all logs in the synchronization log file at the trigger time of the current period include the identification information of the storage granules. However, the data synchronization operation also takes some time, and new requests may be received during this period. To distinguish the data corresponding to newly received requests from the periodically synchronized data, these logs are recorded with the data length and starting address to mark the data corresponding to these logs as not participating in the current data synchronization operation but participating in the data synchronization operation of the next period. Therefore, during the traversal process, only the logs containing the storage granule identification information are traversed during the data synchronization of the current period.

[0120] In some alternative implementations, after sending synchronization indication information to the secondary node corresponding to the current node in the secondary storage system, the current node may perform the following operations:

[0121] Receive target response information from the auxiliary node, wherein the target response information is the response information generated by the auxiliary node after completing the data synchronization operation according to the synchronization instruction information;

[0122] Delete the target log from the synchronization log file based on the target response information.

[0123] Specifically, when the data synchronization mechanism is a real-time type of synchronized log, upon receiving the target response information from the secondary node, it can be determined that the data synchronization operation corresponding to the target request was successful. At this point, the target log can be deleted from the synchronized log file. Alternatively, when the data synchronization mechanism is a real-time type of synchronized log, upon receiving the response information from the secondary node, it can be determined that the data synchronization operation of the storage granular corresponding to the target log group is complete. At this point, all logs belonging to the target log group in the synchronized log file can be deleted.

[0124] In some optional implementations, under a real-time synchronization mechanism, when the data synchronization operation corresponding to the target request fails (such as failure to write to the current node's cache or failure to write to the secondary storage system, for example, failure to receive a response within a preset time period), the following processing can be performed:

[0125] Step 1: Determine the identification information of the target storage granule corresponding to the target request based on the target logical starting address and the preset data length.

[0126] Step two: Add the identification information of the target storage granule to the target log to indicate that the data synchronization operation corresponding to the target request should be re-executed.

[0127] For example, in Figure 6 In the log, the first and second log entries are the logs corresponding to requests where data synchronization operations failed.

[0128] In some optional implementations, after adding the target storage granule's identification information to the target log, the current node can set the current remote replication relationship to a resynchronization state. At this time, all nodes in the primary storage system will enter the resynchronization state and perform the following specific operations (that is, the following operations can be performed after step three above):

[0129] Step one: Start timing.

[0130] Step 2: When the timeout period reaches the preset timeout period, iterate through each log entry in the synchronization log file.

[0131] For example, the preset timer duration can be 7.5 minutes.

[0132] Step 3: For each log entry encountered, determine whether the log entry contains the identification information of the storage granule.

[0133] Step 4: When it is determined that the traversed log contains the identification information of the storage granules, the traversed log is identified as a candidate log.

[0134] Step 5: When at least one candidate log is identified, classify each candidate log according to the identification information of the storage granules included in each candidate log to obtain at least one log group.

[0135] Among them, all candidate logs belonging to the same log group contain the same identification information for their storage granules.

[0136] Step 6: Based on the identification information of the storage granule corresponding to the first log group, perform data synchronization operation on the storage granule corresponding to the first log group.

[0137] The first log group can be any log group from at least one log group.

[0138] In some alternative implementations, to conserve resources, when it is determined that the data synchronization operation for the storage granules corresponding to the first log group is complete, the current node may delete each candidate log entry included in the first log group from the synchronization log file.

[0139] For the second and third scenarios in step S202 above, the current node can execute the following specific steps:

[0140] Step 1: Once the data synchronization operation for the current period is determined to be complete, the identification information of the target storage granule corresponding to the target request is determined based on the target logical starting address and the preset data length.

[0141] Step 2: Convert the target logical starting address and target data length in the target log into the identification information of the target storage granules and add it to the target log to perform the data synchronization operation for the next cycle corresponding to the current cycle.

[0142] The method for updating synchronization logs provided in this embodiment can parse each request to obtain data operation information. Furthermore, it can generate logs based on the current node's data synchronization mechanism and the parsed data operation information. Additionally, this solution determines the corresponding synchronization log file based on the current node's identification information. Further, the current node can add the generated logs to the synchronization log file to mark the differences between the primary and secondary storage systems corresponding to the target log, replacing the use of difference bitmaps to mark differences in related technologies. Thus, for multiple consecutive requests targeting different storage locations of the same storage granularity, this solution can record a log for each request in the synchronization log file. In other words, this solution can mark difference data at a dimension smaller than the storage granularity, and execute synchronization operations for multiple requests targeting different storage locations of the same storage granularity in parallel, thereby improving request processing efficiency.

[0143] For the master node, it can monitor whether each node in the main storage system has failed, and transfer the log files managed by the failed node to the corresponding backup node. Accordingly, this embodiment provides a method for determining backup nodes, which can be executed by the master node in the main storage system (the current node mentioned above can be the master node). Figure 7 This is a flowchart of a method for determining candidate nodes according to an embodiment of the present invention, such as... Figure 7 As shown, the process includes the following steps:

[0144] Step S701: When a fault is detected in any node other than the master node in the main storage system, obtain the identification information of the faulty node.

[0145] Specifically, when the master node detects a failure in any node, it can obtain the identification information of the failed node.

[0146] Step S702: Based on the identification information of the faulty node and the mapping relationship between the identification information of the pre-built management node and the identification information of the candidate node, determine the first candidate node corresponding to the faulty node.

[0147] The first backup node is any node in the primary storage system other than the faulty node.

[0148] Specifically, the mapping relationship described above is as follows: Figure 8 As shown, when the identification information of the faulty node is node 1, the identification information of the candidate node corresponding to node 1 can be determined as node 2 according to the mapping relationship, and the current node can determine node 2 as the first candidate node.

[0149] Step S703: Transfer the management rights of the synchronization log file corresponding to the faulty node to the first backup node.

[0150] Specifically, the current node can generate a management handover notification based on the faulty node's identification information and send it to the first backup node. Upon receiving the management handover notification, the first backup node can parse it to obtain the faulty node's identification information. Based on this identification information, the first backup node can then perform management operations on the synchronization log files corresponding to the faulty node's identification information within the storage devices of the main storage system.

[0151] In some optional implementations, when the data synchronization mechanism is a real-time type and the first candidate node is the current node, the current node may perform the following operations:

[0152] Based on the identification information of the faulty node, determine the synchronization log file corresponding to the faulty node's identification information. Based on the first logical starting address and first data length included in the first log, calculate the identification information of the first storage particle (the process is similar to calculating the identification information of the target storage particle, and will not be repeated here), and add the identification information of the first storage particle to the first log. The first log is any log entry in the synchronization log file corresponding to the faulty node's identification information that does not include the identification information of the storage particle. The first candidate node can immediately traverse all logs in the synchronization log file corresponding to the faulty node's identification information and perform grouping operations based on the storage particle identification information in each log entry. The current node can perform data synchronization operations on a per-storage-particle basis, for each storage particle corresponding to each group. For example, Figure 8 This demonstrates that after node 1 fails, all logs in the synchronization log file will include the logical starting address, data length, and identification information of the storage granules.

[0153] In this way, after the management authority is transferred to the first backup node, the first backup node can complete the incomplete data synchronization operations in a timely manner, ensuring data consistency between the primary storage system and the secondary storage system.

[0154] In some optional implementations, the faulty node may serve as a backup node for other nodes in addition to being a management node. Therefore, the current node can reselect a backup node for the management node corresponding to the faulty node by following specific steps:

[0155] Step 1: Based on the identification information and mapping relationship of the faulty node, determine the target management node corresponding to the faulty node.

[0156] Step 2: Based on the pre-built fault handling mechanism, select a second alternative node from the nodes in the main storage system other than the target management node and the faulty node.

[0157] Step 3: Determine the second alternative node as the alternative node corresponding to the target management node.

[0158] Specifically, the current node can, based on the identification information of the faulty node, in situations such as... Figure 9 The mapping relationship shown identifies the corresponding target management node. For example, node 1 determines the corresponding target management node as node 3.

[0159] When the current node selects a candidate node for the target management node, it can first determine the number of log files managed by each candidate node (other nodes besides the target management node and the faulty node), and select the candidate node with the fewest managed log files as the candidate node corresponding to the target management node.

[0160] The method for determining alternative nodes provided in this embodiment allows the master node to promptly identify the first alternative node corresponding to the failed node after a node failure. This first alternative node then takes over the log files managed by the failed node and accurately marks the difference data during the failure period. Currently, to ensure the marking of difference data even during failures, the management node needs to synchronize the changed difference bitmap to the corresponding alternative node after any change in any bit of the difference bitmap (i.e., the alternative node needs to back up the difference bitmap and update it in real time). This requires two interactions for each request, resulting in significant network resource consumption. In contrast, this solution only requires transferring management rights of the corresponding synchronized log files after a management node failure, eliminating the need for multiple interactions, which is more convenient and saves network resources.

[0161] In the case of using updated synchronization logs to perform data synchronization operations during write request processes, this embodiment provides an initial data synchronization operation method that can be executed by any node included in the main storage system. Figure 10 This is a flowchart of a data synchronization operation method according to an embodiment of the present invention, such as... Figure 10 As shown, the process includes the following steps:

[0162] Step S1001: When performing data synchronization operation on the primary storage system and secondary storage system for the first time, traverse each storage particle managed by the current node.

[0163] The first data synchronization operation is also generally referred to as the initial synchronization operation.

[0164] In step S1002, each time a storage particle is traversed, the data stored in the traversed storage particle is synchronized to the backup storage particle corresponding to the traversed storage particle in the secondary storage system.

[0165] Step S1003: When the data synchronization operation of each storage particle is completed, the value of the pre-built synchronization progress variable is updated according to the preset data length.

[0166] Among them, the synchronous progress variable can be called a cursor.

[0167] Specifically, each node can be configured with a synchronization progress variable. This variable can have an initial value and a preset threshold, used to indicate the range of storage locations of the storage granules managed by the node within the storage devices included in the main storage system. For example, Node 1: 0-128K, Node 2: 128K-256K, Node 3: 256K-384K, Node 4: 384K-512K.

[0168] After completing the data synchronization operation for each storage granule, the current node can add the preset data length and the synchronization progress variable to obtain the updated value of the synchronization progress variable. For example... Figure 11 As shown, this illustrates the situation where the synchronization progress in node 1 is 50%. The black filled boxes represent the parts where the initial data synchronization operation has been completed, the white filled boxes represent the parts where the initial data synchronization operation has not been completed, and the arrows represent the cursors.

[0169] Step S1004: When the value of the synchronization progress variable is determined to be equal to the preset threshold, stop the data synchronization operation.

[0170] The preset threshold is the total amount of data stored in all storage granules managed by the current node.

[0171] The data synchronization method provided in this embodiment eliminates the need for a difference bitmap when performing data synchronization for the first time. The data synchronization progress can be understood simply by updating a synchronization progress variable, making it more convenient.

[0172] This embodiment also provides an apparatus for updating and synchronizing logs, which is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0173] This embodiment provides a device for updating synchronization logs, such as... Figure 12 As shown, it includes:

[0174] The acquisition module 1201 is used to parse the target request when the target request is acquired, and to obtain the data operation information corresponding to the target request;

[0175] The generation module 1202 is used to generate target logs corresponding to the target request based on the pre-built data synchronization mechanism and data operation information;

[0176] The acquisition module 1201 is also used to acquire the identification information of the current node;

[0177] The determination module 1203 is used to determine the synchronization log file corresponding to the identification information of the current node based on the identification information of the current node;

[0178] Add module 1204 to add the target log to the synchronization log file;

[0179] The sending module 1205 is used to send synchronization indication information to the secondary node corresponding to the current node in the secondary storage system. The synchronization indication information includes the data to be synchronized corresponding to the target log and the location information corresponding to the data to be synchronized, so that the secondary node can perform data synchronization operation.

[0180] In some alternative embodiments, the device further includes a deletion module 1206 for:

[0181] Receive target response information from the auxiliary node, wherein the target response information is the response information generated by the auxiliary node after completing the data synchronization operation according to the synchronization instruction information;

[0182] Delete the target log from the synchronization log file based on the target response information.

[0183] In some alternative implementations, the data operation information includes the target logical starting address and the target data length.

[0184] In some optional implementations, the generation module 1202 is specifically used for:

[0185] When the data synchronization mechanism is a real-time type, the target log is generated based on the target logical starting address and the target data length.

[0186] In some optional implementations, the generation module 1202 is specifically used for:

[0187] When the data synchronization mechanism is a periodic data synchronization mechanism, determine whether the current node is in a data synchronization state. The data synchronization state is used to indicate that the current node is performing the data synchronization operation of the current period.

[0188] When it is determined that the current node is not in a data synchronization state, the identification information of the target storage particle corresponding to the target request is determined according to the target logical starting address and the preset data length, wherein the preset data length is the data length of the storage particle;

[0189] Target logs are generated based on the identification information of the target storage granules.

[0190] In some optional implementations, the generation module 1202 is specifically used for:

[0191] When it is determined that the current node is in a data synchronization state, a target log is generated based on the target logical starting address and the target data length.

[0192] In some alternative embodiments, the device further includes a monitoring module 1207 for:

[0193] When the data synchronization operation of the current cycle is determined to be over, the identification information of the target storage granule corresponding to the target request is determined based on the target logical starting address and the preset data length.

[0194] The target logical starting address and target data length included in the target log are converted into the identification information of the target storage granules, which are then used to perform data synchronization operations for the next cycle corresponding to the current cycle.

[0195] In some optional implementations, the determining module 1203 is further configured to determine the identification information of the target storage particle corresponding to the target request based on the target logical starting address and the preset data length when the data synchronization operation corresponding to the target request fails.

[0196] Adding module 1204 also adds the identification information of the target storage granule to the target log to indicate the re-execution of the data synchronization operation corresponding to the target request.

[0197] In some alternative embodiments, the device further includes a synchronization module 1208 for:

[0198] Start timing;

[0199] When the preset timeout period is reached, each log entry in the synchronization log file is iterated through.

[0200] Each time a log entry is encountered, it is determined whether the log entry contains the identification information of the storage granule.

[0201] When it is determined that the traversed log contains the identification information of the storage granules, the traversed log is identified as a candidate log;

[0202] When at least one candidate log is identified, each candidate log is classified according to the identification information of the storage particles included in each candidate log to obtain at least one log group. Among them, all candidate logs belonging to the same log group include the same identification information of the storage particles.

[0203] Based on the identification information of the storage granule corresponding to the first log group, perform data synchronization operation on the storage granule corresponding to the first log group, wherein the first log group is any one of at least one log group.

[0204] In some alternative implementations, when the current node is the master node in the master storage system, the method further includes:

[0205] When a failure is detected in any node other than the master node in the main storage system, the identification information of the failed node is obtained.

[0206] Based on the identification information of the faulty node, and the mapping relationship between the identification information of the pre-built management node and the identification information of the candidate node, the first candidate node corresponding to the faulty node is determined. The first candidate node is any node among the other nodes in the main storage system other than the faulty node.

[0207] The management of the synchronization log file corresponding to the faulty node is transferred to the first backup node.

[0208] In some optional implementations, the fault handling module 1209 is further configured to:

[0209] Based on the identification information and mapping relationship of the faulty node, determine the target management node corresponding to the faulty node;

[0210] Based on the pre-built fault handling mechanism, a second alternative node is selected from the nodes in the main storage system other than the target management node and the faulty node.

[0211] The second alternative node is determined as the alternative node corresponding to the target management node.

[0212] In some alternative implementations, the synchronization module 1208 is also used for:

[0213] When performing data synchronization operations on the primary and secondary storage systems for the first time, each storage granularity managed by the current node is traversed.

[0214] Each time a storage particle is traversed, the data stored in the traversed storage particle will be synchronized to the corresponding backup storage particle in the secondary storage system.

[0215] When the data synchronization operation of each storage granule is completed, the value of the pre-built synchronization progress variable is updated according to the preset data length.

[0216] When the value of the synchronization progress variable is equal to the preset threshold, the data synchronization operation is stopped. The preset threshold is the total amount of data stored in all storage granules managed by the current node.

[0217] Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.

[0218] In this embodiment, the device for updating and synchronizing logs is presented in the form of a functional unit. Here, a unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.

[0219] This invention also provides a computer device having the above-described features. Figure 12 The device shown is for updating and synchronizing logs.

[0220] Please see Figure 13 , Figure 13 This is a schematic diagram of the structure of a computer device provided in an optional embodiment of the present invention, such as... Figure 13 As shown, the computer device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 13 Take a processor 10 as an example.

[0221] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware integrated circuit. The aforementioned hardware integrated circuit may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The aforementioned programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.

[0222] The memory 20 stores instructions executable by at least one processor 10 to cause the at least one processor 10 to perform the method shown in the above embodiments.

[0223] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0224] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.

[0225] The computer device also includes a communication interface 30 for communicating with other devices or communication networks.

[0226] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.

[0227] A portion of this invention can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to the invention through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.

[0228] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.

Claims

1. A method for updating synchronization logs, characterized in that, The method is applied to a data synchronization system, which includes a primary storage system and a secondary storage system. The primary and secondary storage systems each include a plurality of nodes of the same number. The method is executed by the current node, which is any one of the plurality of nodes included in the primary storage system. The method includes: When a target request is obtained, the target request is parsed to obtain data operation information corresponding to the target request, wherein the data operation information includes the target logical starting address and the target data length; When it is determined that the pre-built data synchronization mechanism is a real-time type data synchronization mechanism, a target log is generated according to the target logical starting address and the target data length; Alternatively, when it is determined that the data synchronization mechanism is a periodic data synchronization mechanism, it is determined whether the current node is in a data synchronization state, wherein the data synchronization state is used to indicate that the current node is performing the data synchronization operation of the current period; When the current node is not in the data synchronization state, the identification information of the target storage particle corresponding to the target request is determined according to the target logical starting address and the preset data length. The target log is generated according to the identification information of the target storage particle, wherein the preset data length is the data length of the storage particle. Alternatively, when it is determined that the current node is in the data synchronization state, the target log is generated according to the target logical starting address and the target data length, so that after the data synchronization operation of the current period is completed, the identification information of the target storage particle is determined according to the target logical starting address and the preset data length, and the target logical starting address and target data length included in the target log are converted into the identification information of the target storage particle; Get the identifier information of the current node; Based on the identification information of the current node, determine the synchronization log file corresponding to the identification information of the current node; Add the target log to the synchronization log file; A synchronization instruction message is sent to the secondary node in the secondary storage system corresponding to the current node. The synchronization instruction message includes the data to be synchronized corresponding to the target log and the location information corresponding to the data to be synchronized, so that the secondary node can perform a data synchronization operation.

2. The method according to claim 1, characterized in that, After sending synchronization indication information to the secondary node corresponding to the current node in the secondary storage system, the method further includes: Receive target response information fed back by the auxiliary node, wherein the target response information is response information generated by the auxiliary node after completing the data synchronization operation according to the synchronization instruction information; Based on the target response information, the target log is deleted from the synchronization log file.

3. The method according to claim 1, characterized in that, When it is determined that the data synchronization mechanism is a real-time data synchronization mechanism, the method further includes: When it is determined that the data synchronization operation corresponding to the target request has failed, the identification information of the target storage particle corresponding to the target request is determined according to the target logical starting address and the preset data length. The identification information of the target storage particle is added to the target log to indicate that the data synchronization operation corresponding to the target request is re-executed.

4. The method according to claim 3, characterized in that, After adding the identification information of the target storage particle to the target log, the method further includes: Start timing; When the preset timeout period is reached, each log entry in the synchronization log file is iterated through. Each time a log entry is encountered, it is determined whether the log entry contains the identification information of the storage granule. When it is determined that the traversed logs include the identification information of storage particles, the traversed logs are identified as candidate logs; When at least one candidate log is identified, each candidate log is classified according to the identification information of the storage particles included in each candidate log to obtain at least one log group, wherein all candidate logs belonging to the same log group include the same identification information of the storage particles. Based on the identification information of the storage granule corresponding to the first log group, a data synchronization operation is performed on the storage granule corresponding to the first log group, wherein the first log group is any one of at least one of the log groups.

5. The method according to any one of claims 1 to 4, characterized in that, When the current node is the master node in the primary storage system, the method further includes: When a failure is detected in any node in the main storage system other than the master node, the identification information of the failed node is obtained. Based on the identification information of the faulty node and the mapping relationship between the identification information of the pre-built management node and the identification information of the candidate node, a first candidate node corresponding to the faulty node is determined, wherein the first candidate node is any node among the other nodes in the main storage system other than the faulty node. The management rights of the synchronization log file corresponding to the faulty node are transferred to the first alternative node.

6. The method according to claim 5, characterized in that, The method further includes: Based on the identification information of the faulty node and the mapping relationship, determine the target management node corresponding to the faulty node; According to the pre-built fault handling mechanism, a second alternative node is selected from the other nodes in the main storage system besides the target management node and the faulty node; The second candidate node is determined as the candidate node corresponding to the target management node.

7. The method according to any one of claims 1 to 4, characterized in that, The method further includes: In the case of performing a data synchronization operation on the primary storage system and the secondary storage system for the first time, each storage granularity managed by the current node is traversed; Each time a storage particle is traversed, the data stored in the traversed storage particle is synchronized to the backup storage particle corresponding to the traversed storage particle in the secondary storage system. When a data synchronization operation of each storage particle is completed, the value of the pre-constructed synchronization progress variable is updated according to the preset data length. When the value of the synchronization progress variable is determined to be equal to a preset threshold, the data synchronization operation is stopped, wherein the preset threshold is the total amount of data stored in all storage granules managed by the current node.

8. A computer device, characterized in that, include: A memory and a processor are communicatively connected, the memory storing computer instructions, and the processor executing the computer instructions to perform the method for updating and synchronizing logs as described in any one of claims 1 to 7.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing a computer to perform the method of updating the synchronization log as described in any one of claims 1 to 7.

10. A computer program product, characterized in that, Includes computer instructions for causing a computer to perform the method of updating the synchronization log as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Data synchronization method and device and distributed storage system

    CN108616598A

  • Synchronous remote replication method and device of storage system

    CN118550761A