Metadata backup and recovery method, device, electronic device, and storage medium
By storing metadata tables in distributed database computing nodes and updating metadata from DDL logs, the problem of low recovery and reconstruction efficiency of computing nodes is solved, an efficient and accurate recovery process is achieved, and data consistency is ensured.
Patent Information
- Application Number
- CN202210461427.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-28
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2042-04-28
AI Technical Summary
The recovery and reconstruction process of distributed database computing nodes is inefficient and complex, and existing technologies are difficult to implement efficiently.
By storing metadata tables in computing nodes, using coordinate data to record the replication location in DDL logs, pulling DDL logs from metadata nodes and executing DDL commands to update local metadata, and combining full and incremental backups, computing nodes can be restored and rebuilt.
It enables convenient and accurate recovery of computing nodes, ensures consistency of metadata and data versions of storage nodes, and improves recovery efficiency and ease of operation.
Smart Images

Figure CN114756408B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of distributed database management systems, and in particular to a metadata backup and recovery method, device, electronic device and storage medium. Background Art
[0002] A distributed database management system (DDBMS) typically consists of three components: compute nodes, storage nodes, and metadata nodes. Metadata nodes are responsible for storing cluster metadata, including the cluster topology and metadata about user data managed by the cluster, such as user table definition statements. Compute nodes are primarily responsible for the following tasks: accepting client connection requests, verifying requests, and establishing connection status; processing query requests sent by client connections and returning results to the client; interacting with storage nodes to complete data reading and writing; and implementing the Distributed Transaction Coordinator (DTC) to ensure the reliable submission of distributed transactions.
[0003] When one or more computing nodes encounter abnormal conditions and need to recover the data of the computing nodes, the amount of data to be processed is large, the recovery efficiency is low, or the operation is complex. Summary of the Invention
[0004] The main purpose of the present invention is to provide a metadata backup and recovery method, device, electronic device and storage medium, which can solve the problem of recovery and reconstruction of distributed database computing nodes.
[0005] To achieve the above objectives, the present application provides a metadata backup and recovery method in a first aspect, the method comprising:
[0006] Starting the computing node, wherein the computing node stores a metadata table for recording a replication position of the computing node in a DDL log through coordinate data;
[0007] Pull the DDL log from the metadata node according to the coordinate data, execute the DDL command in the DDL log to update the local metadata of the computing node, and update the coordinate data of the metadata table.
[0008] Optionally, the coordinate data includes a first coordinate, where the first coordinate is used to identify a version number of the local metadata of the computing node and a starting position for performing a recovery operation from the DDL log;
[0009] Pulling the DDL log from the metadata node according to the coordinate data includes:
[0010] Pull the DDL log starting from the first coordinate from the metadata node.
[0011] Optionally, executing the DDL command in the DDL log to update the local metadata of the computing node includes:
[0012] According to the command type of each of the DDL commands in the DDL log, the local metadata of the computing node is updated.
[0013] Optionally, updating the coordinate data of the metadata table includes:
[0014] In the computing node local transaction that executes the DDL command, the coordinate data of the metadata table is updated based on the replication position of the computing node in the DDL log, so that the coordinate data in the metadata table always corresponds to the metadata stored in the computing node.
[0015] Optionally, the method further includes:
[0016] After executing the DDL log corresponding to the target time point, stop data updating and complete the recovery and reconstruction work.
[0017] Optionally, before starting the computing node, the method further includes:
[0018] Obtain the full backup closest to the target time point;
[0019] Restore the compute node using the full backup.
[0020] Optionally, before obtaining the full backup closest to the target time point, the method further includes:
[0021] According to the preset backup logic, a full logical backup or a physical backup, as well as an incremental backup, is performed on the computing nodes, storage clusters, and metadata clusters in the distributed database management system.
[0022] To achieve the above-mentioned purpose, the second aspect of the present application provides a metadata backup and recovery device, comprising:
[0023] A startup module, configured to start a computing node, wherein the computing node stores a metadata table for recording a replication position of the computing node in a DDL log using coordinate data;
[0024] An update module is used to pull the DDL log from the metadata node according to the coordinate data, execute the DDL command in the DDL log to update the local metadata of the computing node, and update the coordinate data of the metadata table.
[0025] Optionally, the coordinate data includes a first coordinate, where the first coordinate is used to identify a version number of the local metadata of the computing node and a starting position for performing a recovery operation from the DDL log;
[0026] The update module is specifically used for:
[0027] Pull the DDL log starting from the first coordinate from the metadata node.
[0028] Optionally, the update module is further configured to:
[0029] According to the command type of each of the DDL commands in the DDL log, the local metadata of the computing node is updated.
[0030] Optionally, the update module is further configured to:
[0031] In the computing node local transaction that executes the DDL command, the coordinate data of the metadata table is updated based on the replication position of the computing node in the DDL log, so that the coordinate data in the metadata table always corresponds to the metadata stored in the computing node.
[0032] Optionally, the update module is further configured to:
[0033] After executing the DDL log corresponding to the target time point, stop data updating and complete the recovery and reconstruction work.
[0034] Optionally, the metadata backup and recovery device further includes a recovery module, configured to:
[0035] Before starting the computing node, obtain the full backup closest to the target time point;
[0036] Restore the compute node using the full backup.
[0037] A third aspect of the present application provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the first aspect and any possible implementation thereof.
[0038] To achieve the above-mentioned objectives, the fourth aspect of the present application provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the processor executes the various steps in the method described in the first aspect.
[0039] The present application provides a metadata backup and recovery method, which is applied to a computing node in a distributed database management system. By starting the computing node, the computing node stores a metadata table for recording the replication position of the computing node in the DDL log through coordinate data; pulling the DDL log from the metadata node according to the coordinate data, executing the DDL command in the DDL log to update the local metadata of the computing node, and updating the coordinate data of the metadata table. By utilizing the local transaction processing capability of the computing node, the recovery and reconstruction of the computing node of the distributed database can be realized conveniently and accurately. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0041] in:
[0042] Figure 1 A flowchart of a metadata backup and recovery method provided in an embodiment of the present application;
[0043] Figure 2 A flowchart of another metadata backup and recovery method provided in an embodiment of the present application;
[0044] Figure 3 A schematic diagram of the structure of a metadata backup and recovery device provided in an embodiment of the present application;
[0045] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0046] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0047] The terms "first," "second," and the like in the specification and claims of this application and the accompanying drawings are used to distinguish between different objects, not to describe a particular order. Furthermore, the terms "including," "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or elements is not limited to the listed steps or elements but may optionally include steps or elements not listed, or may optionally include other steps or elements inherent to the process, method, product, or apparatus.
[0048] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0049] The embodiments of the present application are described below in conjunction with the drawings in the embodiments of the present application.
[0050] See also Figure 1 , is a flow chart of a metadata backup and recovery method in an embodiment of the present application, which can be applied to computing nodes in a distributed database management system. Figure 1 As shown, the method includes:
[0051] 101. Start a computing node. The computing node stores a metadata table for recording the replication position of the computing node in the DDL log using coordinate data.
[0052] 102. Pull the DDL log from the metadata node according to the coordinate data, execute the DDL command in the DDL log to update the local metadata of the computing node, and update the coordinate data of the metadata table.
[0053] The execution subject in the embodiment of the present application may be a metadata backup and recovery device, or may be an electronic device. In a specific implementation, the electronic device may be a computing node terminal.
[0054] First, let's briefly introduce DDBMS. DDBMS usually consists of compute nodes, storage nodes, and metadata nodes. As mentioned in the background, compute nodes are mainly responsible for the following tasks:
[0055] Accept client connection request, verify request, and establish connection status;
[0056] Process the query request sent by the client connection and return the result to the client;
[0057] Interact with storage nodes to complete data reading and writing;
[0058] Implement the Distributed Transaction Coordinator (DTC) to complete the reliable submission of distributed transactions.
[0059] The metadata node is responsible for storing cluster metadata, including the cluster topology and metadata of user data managed by the cluster, such as user table definition statements.
[0060] Storage nodes are responsible for storing data and, under the coordination of the compute node DTC, executing and submitting distributed transaction branches. They form a cluster based on a data change replication mechanism to achieve high availability.
[0061] User requests executed by a DDBMS are mainly divided into two categories: one is called DDL, which is the statement in which the user defines the storage method of data (such as tables, containers, etc.); the other is called DML, which is the statement for reading and writing data in established storage units (such as tables, containers, etc.).
[0062] In the embodiment of the present application, user metadata is stored in the computing nodes, so it needs to be backed up. This user metadata is generated when the computing nodes execute DDL statements. At the same time, when executing DDL commands, the computing nodes will store DDL operation logs in the metadata nodes and complete transaction commits. When restoring and rebuilding a distributed database cluster, it is also necessary to use the backed-up computing node data to restore several computing nodes.
[0063] Specifically, when a DDBMS cluster needs to be restored, its metadata cluster and each storage cluster must be restored in sequence, and finally each computing node must be restored. In the embodiment of the present application, data on the computing nodes can be restored based on the preset backup, and then these computing nodes can be started.
[0064] Optionally, before starting the computing node, the method further includes:
[0065] Perform full logical or physical backups, as well as incremental backups, of the computing nodes, storage clusters, and metadata clusters in the distributed database management system according to the preset backup logic.
[0066] Obtain the full backup closest to the target time point;
[0067] Restore the compute node using the full backup.
[0068] In the embodiments of the present application, full logical backup or physical backup and incremental backup (i.e., incremental continuous logical backup) of the computing nodes, storage clusters and metadata clusters of the DDBMS cluster can be made periodically, and the backup files are stored in a suitable storage service or storage device for backup.
[0069] Specifically, when a computing node is recovered, the full backup closest to the target time point T1 (the backup time point of which is denoted as T0) can be found, and a number of computing nodes are recovered using the backup.
[0070] In an optional implementation, the coordinate data includes a first coordinate, the first coordinate is used to identify a version number of local metadata of the computing node, and a starting position of a recovery operation performed from the DDL log;
[0071] The DDL log is pulled from the metadata node according to the coordinate data, including:
[0072] The DDL log starting from the first coordinate is pulled from the metadata node.
[0073] In an optional implementation, the DDL command in the DDL log is executed to update the local metadata of the computing node, including:
[0074] According to the command type of each DDL command in the DDL log, the local metadata of the computing node is updated.
[0075] Specifically, in order to recover a computing node to a target time point T1, a full backup at time T0 (T0<=T1, and there is no other full backup of the computing node in the interval (T0, T1]) is used to rebuild a computing node, and then the DDL log stored in the metadata cluster in the interval (T0, T1) is executed in sequence, so that the computing node is recovered to time T1.
[0076] In order to obtain the DDL log at time T1, the metadata cluster also needs to be periodically backed up in full and continuously streamed in incremental backup, so that the DDL log at time T1 and other metadata can be obtained using the full metadata node backup data at time T0 and the incremental backup in the interval [T0, T1].
[0077] In the embodiments of the present application, the computing node can pull the DDL log from the metadata node, and execute each DDL command obtained in sequence to update the metadata of the computing node. The computing node can record its replication position in the DDL log through coordinate data, such as the command position replicated each time.
[0078] Specifically, in the DDL log (data table) of the metadata cluster, there is a column that is a monotonically increasing integer, such as 1, 2, 3..., which can be referred to as logID. Each DDL log has a unique identifier logID. When a computing node executes a DDL command, it appends (i.e., writes to the end of the DDL log) a DDL log to the DDL log table, and this row of data has a logID to uniquely identify the DDL command.
[0079] In the embodiment of the application, the position or coordinates stored in ddl_coord in the computing node can be understood as the above-mentioned logID, which means which log in the DDL log table the computing node has executed. When the computing node replays the DDL log, it executes a DDL log in each transaction and updates the coordinates in ddl_coord with the logID to reliably record the position of the replay, and each time the replay is continued from the position of logID+1.
[0080] Therefore, the DDL log can be pulled from the metadata node according to the above-mentioned coordinate data (i.e., logID), the DDL command in the DDL log is executed to update the local metadata of the computing node, and the coordinate data of the metadata table is updated at the same time.
[0081] After the computing node is started, the first coordinate ddl0 recorded in the metadata table ddl_coord of the computing node is the version number (which can be understood as a time point) of the local metadata of the computing node, and is also the position from which the computing node should continue to replay the log from the DDL log. Further, the computing node can pull the DDL log starting from ddl0 from the metadata node, execute each DDL command obtained in turn, and the method of executing the command is to update the metadata of the computing node according to each type of command. There is no need to send the DDL command to the storage cluster, and there is no need to send the DDL log to the metadata cluster again.
[0082] In an optional implementation, the above-mentioned updating the above-mentioned coordinate data of the above-mentioned metadata table comprises:
[0083] In the above-mentioned local transaction of the computing node executing the above-mentioned DDL command, based on the replication position of the computing node in the above-mentioned DDL log, the above-mentioned coordinate data of the above-mentioned metadata table is updated, so that the coordinate data in the above-mentioned metadata table always corresponds to the metadata stored in the above-mentioned computing node.
[0084] Specifically, in the local transaction on the compute node that executes the DDL command, the coordinate data in the metadata table ddl_coord is updated. This way, after each DDL transaction commits, the coordinates in the metadata table ddl_coord always fully correspond to the metadata actually stored on the compute node. If the recovery operation is interrupted for any reason, it can be resumed from the interrupted position.
[0085] In an optional embodiment, after step 102, the method further includes:
[0086] After executing the DDL log corresponding to the above target time point, stop data updating and complete the recovery and reconstruction work.
[0087] Specifically, when the DDL log corresponding to the target time point T1 is executed, the coordinates recorded in the metadata table ddl_coord also reach ddl1. Each DDL log is timestamped, recording the exact time at which the DDL operation was executed. This time point is equivalent to the cluster data version number recognized by all compute nodes. Therefore, the T1 time point can be used in the DDL log to find the stopping point of the recovery process. Restoring to this stopping point completes the recovery and reconstruction process. At this point, the compute node's metadata is aligned with the storage node's user data to the same version.
[0088] The metadata backup and recovery method in the embodiment of the present application is applied to a computing node in a distributed database management system. By starting the computing node, the computing node stores a metadata table for recording the copy position of the computing node in the DDL log through coordinate data; the DDL log is pulled from the metadata node according to the coordinate data, the DDL command in the DDL log is executed to update the local metadata of the computing node, and the coordinate data of the metadata table is updated. By utilizing the local transaction processing capabilities of the computing node, the recovery and reconstruction of the computing node of the distributed database can be realized conveniently and accurately.
[0089] See also Figure 2 , is a flow chart of another metadata backup and recovery method provided by an embodiment of the present application. Figure 2 As shown, taking the restoration of the cluster to the target time point T1 as an example, its metadata cluster and each storage cluster are restored in sequence, and finally each computing node is restored.
[0090] A full backup up to time T0 (T0 <= T1) and an incremental data change backup [T0, T1] are required to restore the metadata cluster to time T1.
[0091] Use the full backup of the compute node to generate the compute node at time T0 (the coordinate ddl0 recorded in the compute node's ddl_coord at this time is the version number (time point) of the compute node's local metadata, and is also the location where the log is replayed from the DDL log).
[0092] If the coordinate time point ddl0 recorded in ddl_coord is less than time point T1, obtain the DDL log starting from ddl0 from the DDL log, execute each obtained DDL command in sequence, and start a local transaction to update the coordinate data of ddl_coord so that the coordinates in ddl_coord always completely correspond to the metadata actually stored in the computing node. Execution stops until the DDL log corresponding to time point T1 is reached (at this time, the coordinate time point ddl1 recorded in ddl_coord is time point T1).
[0093] Currently, in addition to the Kunlun database, other distributed database systems in the industry do not implement local transaction processing in the computing nodes, nor do they support the storage of metadata in the computing nodes. There are no metadata nodes or DDL operation logs are not stored in the metadata nodes for replaying DDL. The method in the embodiment of the present application is to use the DDL operation log to restore a computing node to the latest state. A metadata table ddl_coord is maintained in the computing node to record the location where the computing node is copied in the DDL log, that is, which statement in the DDL log is executed. This position is also the starting point for the recovery process to start executing the DDL operation log.
[0094] In the embodiment of the present application, the local transaction processing capability of the computing node is used to achieve the fault tolerance of the data recovery (restore) process. No matter if the recovery process is interrupted for any reason, it can be restored from the interrupted position. In addition, the metadata table ddl_coord is used to record the operation log of the computing node metadata corresponding to the DDL, ensuring the one-to-one correspondence between the computing node metadata and the DDL operation log, so that the recovery can be started from the accurate starting point during the recovery process, ensuring the overall data consistency of the cluster. In addition, the DDL operation log is used for incremental recovery, and there is no need to use the local transaction log of the computing node for incremental recovery. Only by using the DDL operation log can the cluster data version corresponding to the time point to be restored be accurately determined, so that the recovery process can be accurately stopped at the accurate position and data version.
[0095] Based on the description of the above metadata backup and recovery method embodiment, the present application embodiment also discloses a metadata backup and recovery device, see Figure 3 The metadata backup and recovery device 300 includes:
[0096] A startup module 310 is used to start a computing node, wherein the computing node stores a metadata table for recording the replication position of the computing node in the DDL log through coordinate data;
[0097] The update module 320 is configured to pull the DDL log from the metadata node according to the coordinate data, execute the DDL commands in the DDL log to update the local metadata of the computing node, and update the coordinate data of the metadata table.
[0098] Optionally, the coordinate data includes a first coordinate, where the first coordinate is used to identify a version number of the local metadata of the computing node and a starting position for performing a recovery operation from the DDL log;
[0099] The update module 320 is specifically used to:
[0100] Pull the DDL log starting from the first coordinate from the metadata node.
[0101] Optionally, the updating module 320 is further configured to:
[0102] According to the command type of each of the DDL commands in the DDL log, the local metadata of the computing node is updated.
[0103] Optionally, the updating module 320 is further configured to:
[0104] In the local transaction of the computing node executing the DDL command, the coordinate data of the metadata table is updated based on the replication position of the computing node in the DDL log, so that the coordinate data in the metadata table always corresponds to the metadata stored in the computing node.
[0105] Optionally, the updating module 320 is further configured to:
[0106] After executing the DDL log corresponding to the target time point, stop data updating and complete the recovery and reconstruction work.
[0107] Optionally, before starting the computing node, the system may perform a full logical backup or a physical backup, as well as an incremental backup, of the computing node, storage cluster, and metadata cluster in the distributed database management system according to a preset backup logic;
[0108] The metadata backup and recovery device 300 further includes a recovery module 330 for:
[0109] Obtain the full backup closest to the target time point;
[0110] Restore the compute node using the full backup.
[0111] Understandably, Figure 3 The relevant contents of each module in the method have been described in detail in the aforementioned method embodiment. For details, please refer to the contents of the method embodiment and will not be repeated here.
[0112] The metadata backup and recovery device 300 in the embodiment of the present application can start the computing node, and the computing node stores a metadata table for recording the copy position of the computing node in the DDL log through coordinate data; pull the DDL log from the metadata node according to the coordinate data, execute the DDL command in the DDL log to update the local metadata of the computing node, and update the coordinate data of the metadata table. By utilizing the local transaction processing capability of the computing node, the recovery and reconstruction of the computing node of the distributed database can be realized conveniently and accurately.
[0113] In one embodiment of the present application, an electronic device is also provided. Figure 4 , Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 4 As shown, the electronic device 400 includes a processor 401 and a memory 402. The memory 402 stores a computer program. When the computer program is executed by the processor 401, the following operations are performed: Figures 1-2 Any step in the above method embodiment is shown.
[0114] In one embodiment, a computer-readable storage medium is further provided. The computer-readable storage medium stores a computer program. When the computer program is executed by the processor 401, the processor 401 executes any step in the above method embodiment.
[0115] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The program can be stored in a non-volatile computer readable storage medium, and when the program is executed, the processes of the above-mentioned embodiment methods can be included. Any reference to memory, storage, database, or other medium used in the embodiments provided in the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0116] Any combination of the technical features of the above embodiments can be made. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described, however, as long as the combination of the technical features does not exist, it should be considered as the scope of the present application.
[0117] The above embodiments only express several implementation manners of the present application, and the description is more specific and detailed, but it should not be understood as a limitation on the scope of the patent of the present application. It should be pointed out that for ordinary skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are all within the protection scope of the present application. Therefore, the protection scope of the patent of the present application should be subject to the appended claims.
Claims
1. A metadata backup and recovery method, characterized in that: Applied to a computing node in a distributed database management system, the method comprises: Starting the computing node, wherein the computing node stores a metadata table for recording a replication position of the computing node in a DDL log through coordinate data; Pulling the DDL log from the metadata node according to the coordinate data, executing the DDL command in the DDL log to update the local metadata of the computing node, and updating the coordinate data of the metadata table; in the computing node local transaction that executes the DDL command, updating the coordinate data of the metadata table based on the replication position of the computing node in the DDL log, so that the coordinate data in the metadata table always corresponds to the metadata stored in the computing node; the coordinate data includes a first coordinate, and the first coordinate is used to identify a version number of the local metadata of the computing node and a starting position for performing a recovery operation from the DDL log; Pulling the DDL log from the metadata node according to the coordinate data includes: Pull the DDL log starting from the first coordinate from the metadata node.
2. The metadata backup and recovery method according to claim 1, characterized in that: The executing the DDL command in the DDL log to update the local metadata of the computing node includes: According to the command type of each of the DDL commands in the DDL log, the local metadata of the computing node is updated.
3. The metadata backup and recovery method according to claim 1, characterized in that: The method further comprises: After executing the DDL log corresponding to the target time point, stop data updating and complete the recovery and reconstruction work.
4. The metadata backup and recovery method according to claim 1, wherein: Before starting the computing node, the method further includes: Obtain the full backup closest to the target time point; Restore the compute node using the full backup.
5. The metadata backup and recovery method according to claim 4, characterized in that: Before obtaining the full backup closest to the target time point, the method further includes: According to the preset backup logic, a full logical backup or a physical backup, as well as an incremental backup, is performed on the computing nodes, storage clusters, and metadata clusters in the distributed database management system.
6. A metadata backup and recovery device, characterized in that: include: A startup module, configured to start a computing node, wherein the computing node stores a metadata table for recording a replication position of the computing node in a DDL log using coordinate data; an update module, configured to pull the DDL log from the metadata node according to the coordinate data, execute the DDL commands in the DDL log to update the local metadata of the computing node, and update the coordinate data of the metadata table; the coordinate data including a first coordinate, the first coordinate being used to identify a version number of the local metadata of the computing node and a starting position for performing a recovery operation from the DDL log; The update module is specifically configured to pull the DDL log starting from the first coordinate from the metadata node; The update module is also used to update the coordinate data of the metadata table based on the replication position of the computing node in the DDL log in the local transaction of the computing node that executes the DDL command, so that the coordinate data in the metadata table always corresponds to the metadata stored in the computing node.
7. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the method according to any one of claims 1 to 5.
8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the processor is caused to perform the steps of the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Method and system for analyzing database incremental logs
CN105205053A
Data recovery method and device
CN113918658A