Database operation and maintenance management method, system, device and equipment and storage medium
By deploying multiple central control machines in the TiDB database cluster and using independent metadata storage services, the risk of operational interruption caused by centralized metadata management is resolved, and highly reliable operation and maintenance management is achieved.
Patent Information
- Application Number
- CN202511763862.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-27
- Publication Date
- 2026-02-27
AI Technical Summary
The centralized metadata management architecture caused by TiDB database controller failure reduces the reliability of database operation and maintenance management and increases the risk of operation and maintenance interruption.
Deploy at least two central control machines in the database cluster and store the metadata in a metadata storage service independent of the central control machines. The metadata storage service enables metadata sharing and updates, ensuring that maintenance operations can continue even when the central control machine fails.
It improves the reliability of database operation and maintenance management, reduces the risk of operation and maintenance interruption, and enhances the convenience of metadata sharing and management.
Smart Images

Figure CN121579447A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of database technology, and in particular to a database operation and maintenance management method, system, device, computer equipment, storage medium, and computer program product. Background Technology
[0002] Ti Database (TiDB) is a converged database that supports both Online Transactional Processing (OLTP) and Online Analytical Processing (OLAP). It features horizontal scaling, financial-grade high availability, real-time HTAP, a cloud-native distributed database, and compatibility with the MySQL 5.7 protocol and the MySQL ecosystem.
[0003] The package management tool in the TiDB database is the Operation and Maintenance Management Module (TiUP), which is deployed in the central control machine. The cluster operation and maintenance management (TiUP Cluster) component is responsible for the operation and maintenance management of the database cluster. Through the cluster operation and maintenance management component, daily operation and maintenance tasks of the database cluster can be performed, such as deploying, starting, shutting down, destroying, upgrading the TiDB cluster, and managing TiDB cluster parameters.
[0004] The central control machine in the current TiDB database carries critical management status information, and the metadata required for cluster operation and maintenance management is stored in the central control machine. This centralized metadata management architecture can easily reduce the reliability of database operation and maintenance management, leading to an increased risk of database operation and maintenance capability interruption. Summary of the Invention
[0005] Therefore, it is necessary to provide a database operation and maintenance management method, system, device, computer equipment, computer-readable storage medium, and computer program product that can improve the reliability of database operation and maintenance management and reduce the risk of database operation and maintenance interruption, in order to address the above-mentioned technical problems.
[0006] Firstly, this application provides a database operation and maintenance management method. The method includes:
[0007] In response to maintenance operation instructions triggered for the database cluster, determine the type of maintenance operation and the expected maintenance information;
[0008] Obtain target metadata that matches the operation and maintenance type and the expected operation and maintenance information from the metadata storage service. At least two central control machines deployed in the database cluster share the metadata of the database cluster through the metadata storage service.
[0009] Based on the target metadata and the expected operation and maintenance information, perform operation and maintenance operations on the database cluster;
[0010] After the operation and maintenance operation is completed, the target metadata in the metadata storage service is updated according to the operation and maintenance operation type.
[0011] In one embodiment, obtaining the target metadata matching the operation and maintenance type from the metadata storage service includes:
[0012] Extract the storage location information of the metadata in the metadata storage service from the local storage directory file; the directory file is used to record the data storage information of the metadata storage service.
[0013] Access the metadata storage service based on the storage location information to obtain target metadata that matches the operation and maintenance type and the operation and maintenance expectation information.
[0014] In one embodiment, the step of accessing the metadata sharing service based on the storage location information to obtain target metadata that matches the operation and maintenance type and the expected operation and maintenance information includes:
[0015] Access the metadata storage service based on the storage location information to obtain the metadata set of the database cluster;
[0016] The type of metadata to be extracted is determined based on the aforementioned operation and maintenance type;
[0017] Based on the metadata type and the metadata extraction range represented by the operation and maintenance expectation information, target metadata that matches the operation and maintenance operation type and the operation and maintenance expectation information is extracted from the metadata set.
[0018] In one embodiment, the operation type includes a central control unit deletion operation; the target metadata includes a central control unit configuration file;
[0019] The operation and maintenance of the database cluster based on the target metadata and the expected operation and maintenance information includes:
[0020] Based on the operational and maintenance expectation information, at least one target central control machine to be deleted is determined from each of the central control machines deployed for the database cluster;
[0021] Delete the target configuration information corresponding to the target central control unit from the central control unit topology file; the central control unit configuration file is used to store the sub-configuration information of each central control unit.
[0022] In one embodiment, the operation type includes a central control unit expansion operation; the target metadata includes a central control unit configuration file;
[0023] The operation and maintenance of the database cluster based on the target metadata and the expected operation and maintenance information includes:
[0024] Based on the operational and maintenance expectation information, determine the new configuration information corresponding to at least one newly added central control machine deployed for the database cluster;
[0025] Determine the target write location for the newly added configuration information in the central control unit configuration file;
[0026] The newly added configuration information is written to the target write location, and the newly added central control machine is deployed in the database cluster.
[0027] In one embodiment, updating the target metadata in the metadata storage service according to the operation and maintenance type after the operation and maintenance operation is completed includes:
[0028] After the operation and maintenance operation is completed, if the operation and maintenance operation type is a structural change type, then the updated metadata after the operation and maintenance operation is completed is obtained.
[0029] The target metadata in the metadata storage service is updated using the updated metadata.
[0030] Secondly, this application also provides a database operation and maintenance management system, the system including at least two central control machines deployed for the database cluster, operation and maintenance management components corresponding to each of the central control machines, and metadata storage services;
[0031] The metadata storage service is used to store the metadata of the database cluster; each of the central control units shares the metadata through the metadata storage service.
[0032] The operation and maintenance management component is used to implement the steps of the above method.
[0033] Thirdly, this application also provides a database operation and maintenance management device. The device includes:
[0034] The instruction response module is used to respond to operation and maintenance operation instructions triggered for the database cluster, and to determine the operation and maintenance operation type and expected operation and maintenance information.
[0035] The metadata acquisition module is used to acquire target metadata that matches the operation and maintenance type and the operation and maintenance expectation information from the metadata storage service. At least two central control machines deployed in the database cluster share the metadata of the database cluster through the metadata storage service.
[0036] The operation and maintenance module is used to perform operation and maintenance operations on the database cluster based on the target metadata and the operation and maintenance expectation information;
[0037] The metadata update module is used to update the target metadata in the metadata storage service according to the operation and maintenance operation type after the operation and maintenance operation is completed.
[0038] Fourthly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of the above-described method.
[0039] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the steps of the above-described method.
[0040] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the steps of the above-described method.
[0041] The aforementioned database operation and maintenance management method, apparatus, computer equipment, storage medium, and computer program products deploy at least two central control machines for the database cluster. Each central control machine can share the database cluster's metadata through a metadata storage service independent of each central control machine. Upon receiving an operation and maintenance operation instruction triggered for the database cluster, the operation and maintenance management component can respond to the instruction, determine the operation and maintenance operation type and expected information, then access the metadata storage service to obtain target metadata matching the operation and maintenance operation type and expected information. Based on the target metadata and expected information, the operation and maintenance operation is performed on the database cluster. After the operation and maintenance operation is completed, the target metadata in the metadata storage service is updated according to the operation and maintenance operation type. By deploying at least two central control machines for the database and storing the database cluster's metadata in a metadata storage service independent of each central control machine, this method allows other central control machines to continue performing operation and maintenance operations on the database cluster using the metadata stored in the metadata storage service even if one central control machine fails. This effectively improves the reliability of database operation and maintenance management and reduces the risk of database operation and maintenance interruption. Attached Figure Description
[0042] Figure 1 This is a block diagram of the database operation and maintenance management system in one embodiment;
[0043] Figure 2 This is a flowchart illustrating a database operation and maintenance management method in one embodiment;
[0044] Figure 3 This is a schematic diagram of a process in one embodiment to access the metadata sharing service based on storage location information and obtain target metadata that matches the operation and maintenance type and expected operation and maintenance information.
[0045] Figure 4 This is a schematic diagram illustrating the process of performing operation and maintenance operations on a database cluster based on target metadata and expected operation and maintenance information in one embodiment.
[0046] Figure 5 Here is a block diagram of the database operation and maintenance management system in another embodiment;
[0047] Figure 6 This is a flowchart illustrating a database operation and maintenance management method in another embodiment;
[0048] Figure 7 This is a structural block diagram of a database operation and maintenance management device in one embodiment;
[0049] Figure 8 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0050] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0051] In one embodiment, such as Figure 1 As shown, this application embodiment provides a database operation and maintenance management system 100, which includes at least two central control machines 101 deployed for a database cluster, operation and maintenance management components 102 corresponding to each central control machine 101, and metadata storage service 103.
[0052] A database cluster is a database architecture that combines multiple database servers or nodes to provide higher performance, higher availability, and greater scalability through collaborative work. By using distributed processing and resource sharing, database clusters solve the performance bottlenecks and single points of failure issues faced by single-machine databases when data volume and concurrent access increase.
[0053] The central control unit 101 is a control device for the operation and maintenance management of the database cluster, enabling centralized management, resource allocation, data scheduling, fault detection, and recovery. The operation and maintenance management component 102 is dedicated operation and maintenance software installed and running on the central control unit 101. It can be considered the actual execution component that implements the operation and maintenance management functions of the central control unit 101. In other words, the central control unit 101 is the client that directly interacts with the user, while the operation and maintenance management component 102 is the execution entity that actually performs specific operations based on the instructions sent by the central control unit 101. Therefore, each central control unit 101 has a corresponding complete operation and maintenance management component 102 deployed on it.
[0054] The metadata storage service 103 is an independent storage service separate from the central control machine, used for centralized and persistent storage of the database cluster's metadata. The database cluster's metadata is data information describing the database cluster's architecture, configuration information, and status, specifically including but not limited to the existing database cluster's topology information, configuration information, login keys, etc. Understandably, by setting up a metadata storage service 103 independent of the central control machine to store the database cluster's metadata, the data transmission efficiency and resource consumption caused by metadata sharing among the various central control machines can be effectively reduced, improving the convenience of metadata sharing and management.
[0055] In one embodiment, the metadata storage service 103 can be built on highly available cloud storage or a distributed database. For example, the metadata storage service 103 can be implemented based on the S3 cloud storage service.
[0056] Understandably, taking a TiDB database cluster as an example, a TiDB database typically only has one central control machine, and the central control machine is a stateful node. The metadata of the operation and maintenance management components is stored in the metadata management directory of the central control machine. If the central control machine fails, the metadata of the cluster operation and maintenance management may be lost, making it impossible to perform operation and maintenance on the existing TiDB database cluster.
[0057] Based on this, the database operation and maintenance management system 100 in this embodiment deploys at least two central control machines 101 for the database cluster. Each central control machine 101 is equipped with its own operation and maintenance management component 102. At the same time, a metadata storage server 103 independent of each central control machine 101 is set up. Each central control machine 101 can share the metadata of the database cluster through the metadata storage service 103.
[0058] Specifically, any central control unit 101 in the database cluster can interact with the user, generate operation and maintenance (O&M) commands triggered for the database cluster, and send these commands to the corresponding O&M management component 102. The O&M management component 102, in response to the O&M commands triggered for the database cluster, determines the O&M operation type and expected O&M information, retrieves target metadata matching the O&M operation type and expected O&M information from the metadata storage service 103, performs O&M operations on the database cluster based on the target metadata and expected O&M information, and updates the target metadata in the metadata storage service 103 according to the O&M operation type after the O&M operation is completed.
[0059] The aforementioned database operation and maintenance management system deploys at least two central control machines for the database cluster. Each central control machine can share the database cluster's metadata through a metadata storage service independent of each central control machine. In the event of a failure of one central control machine, the other central control machines can continue to perform operation and maintenance operations on the database cluster using the metadata stored in the metadata storage service, effectively improving the reliability of database operation and maintenance management and reducing the risk of database operation and maintenance interruptions.
[0060] Based on the same technical concept, in one embodiment, such as Figure 2 As shown, a database operation and maintenance management method is provided, which is applied to... Figure 1 Taking the operation and maintenance management component 102 as an example, the following steps are included:
[0061] S202, in response to an operation and maintenance instruction triggered for the database cluster, determines the type of operation and maintenance and the expected operation and maintenance information.
[0062] Among them, operation and maintenance instructions are command signals used to instruct the database cluster to perform operation and maintenance operations, and can be issued by the central control machine corresponding to the operation and maintenance management component. Understandably, operation and maintenance instructions carry the type of operation and maintenance and the expected operation and maintenance information.
[0063] In one embodiment, a user can interact with the central control unit to trigger operation and maintenance instructions for the database cluster. The central control unit can then send these instructions to the corresponding operation and maintenance management components, instructing them to perform operation and maintenance operations on the database cluster.
[0064] The operation type is a category of data used to classify the executable operations on the database cluster, defining what each operation specifically needs to do. Understandably, database cluster operation types can include, but are not limited to, deployment operations, central control machine deletion operations, central control machine addition operations, restart operations, destruction operations, and upgrade operations. The operation instructions used by the operation management component, as well as the metadata required to execute the operation, differ depending on the type of operation.
[0065] Operational expectation information (O&M information) reflects the intent of O&M operations and describes the target state the database cluster should achieve after the O&M operation is executed. Similarly, the O&M expectation information differs depending on the type of O&M operation. For example, in an upgrade operation, the O&M expectation information may include the target cluster and target version. Another example is in a central control unit addition operation, where the O&M expectation information may include the configuration information of the new central control unit.
[0066] Specifically, the operation and maintenance management component can respond to operation and maintenance operation instructions triggered for the database cluster, and determine the operation and maintenance operation type and expected operation and maintenance information corresponding to the operation and maintenance operation to be performed.
[0067] S204, retrieve target metadata from the metadata storage service that matches the operation and maintenance type and expected operation and maintenance information.
[0068] Among them, at least two central control machines deployed for the database cluster share the database cluster's metadata through a metadata storage service.
[0069] The target metadata is the metadata required to perform this operation and maintenance, which is extracted by the operation and maintenance management component from the overall metadata stored in the metadata storage service.
[0070] Specifically, after determining the operation and maintenance type and expected information corresponding to the operation and maintenance operation to be performed, the operation and maintenance management component can access the metadata storage service based on the operation and maintenance type and expected information, and obtain the target metadata that matches the operation and maintenance type and expected information from the metadata storage service.
[0071] S206 performs operational and maintenance operations on the database cluster based on target metadata and operational and maintenance expectation information.
[0072] Operations and maintenance refer to the actions performed to manage and maintain the database cluster.
[0073] Specifically, after obtaining the target metadata, the operation and maintenance management component can perform operation and maintenance operations on the database cluster based on the target metadata and the expected operation and maintenance information.
[0074] In one embodiment, the operation and maintenance management component can first pre-set execution commands for the operation and maintenance operation type according to the operation and maintenance operation type, and then run the execution commands based on the target metadata and operation and maintenance expectation information to automatically perform operation and maintenance operations for the database cluster.
[0075] S208: After the operation and maintenance operation is completed, the target metadata in the metadata storage service is updated according to the operation and maintenance operation type.
[0076] Specifically, after the operation and maintenance operation is completed, the operation and maintenance management component can update the target metadata in the metadata storage service according to the operation and maintenance operation type, so that the metadata stored in the metadata storage service is synchronized with the actual operation and maintenance status of the database cluster, providing an accurate data foundation for the next operation and maintenance operation.
[0077] In the aforementioned database operation and maintenance management method, at least two central control machines are deployed for the database cluster. Each central control machine can share the database cluster's metadata through a metadata storage service independent of each central control machine. Upon receiving an operation and maintenance operation instruction triggered for the database cluster, the operation and maintenance management component can respond to the instruction, determine the operation and maintenance type and expected information, and then access the metadata storage service to obtain the target metadata matching the operation and maintenance type and expected information. Based on the target metadata and expected information, the operation and maintenance operation is performed on the database cluster. After the operation and maintenance operation is completed, the target metadata in the metadata storage service is updated according to the operation and maintenance type. By deploying at least two central control machines for the database and storing the database cluster's metadata in a metadata storage service independent of each central control machine, this method allows other central control machines to continue performing operation and maintenance operations on the database cluster using the metadata stored in the metadata storage service even if one central control machine fails. This effectively improves the reliability of database operation and maintenance management and reduces the risk of database operation and maintenance interruption.
[0078] In one embodiment, retrieving target metadata matching the operation and maintenance type from the metadata storage service includes: extracting the storage location information of the metadata in the metadata storage service from a locally stored directory file; accessing the metadata storage service based on the storage location information; and retrieving the target metadata matching the operation and maintenance type and expected operation and maintenance information.
[0079] Local storage refers to the local storage area of the central control machine to which the operation and maintenance management components belong, such as the local disk of the central control machine. The directory files stored in local storage are files used to record data storage information for metadata storage services. Unlike traditional central control machines, the directory files do not store specific cluster metadata, but only store key information on how to find the metadata.
[0080] Among them, storage location information is information data used to locate the specific storage location of metadata in the metadata storage service of the database cluster, such as the storage path of metadata in the metadata storage service.
[0081] In one embodiment, a cluster.toml file, i.e. a directory file, can be saved in the $HOME / .tiup / storage / cluster directory of the central control unit. The first target file can store the access address, access key, service key of the metadata storage service, and the storage path of the metadata on the metadata storage service.
[0082] In one embodiment, the metadata storage service uses a hash table for data storage, and the storage path of the metadata on the metadata storage service can be generated based on the hash bucket where the metadata is located.
[0083] Specifically, after determining the type of operation and maintenance and the expected operation and maintenance information, the operation and maintenance management component can search for directory files in the local storage of the central control unit, extract the storage location of metadata in the metadata storage service, access the metadata storage service according to the storage location information, and obtain the target metadata that matches the type of operation and maintenance and the expected operation and maintenance information.
[0084] In the above embodiments, by storing the maintenance directory file in the local storage of the central control unit, the storage location information of the metadata storage service can be quickly determined based on the first target file when metadata needs to be obtained, and the target metadata can be obtained from the metadata storage service based on the storage location information, which effectively improves the speed and accuracy of target metadata acquisition.
[0085] In one embodiment, such as Figure 3 As shown, the metadata sharing service is accessed based on the storage location information to obtain target metadata that matches the operation and maintenance type and expected operation and maintenance information, including:
[0086] S302 accesses the metadata storage service based on the storage location information to obtain the metadata set of the database cluster.
[0087] The metadata set of the database cluster is a complete dataset used to describe all operation and maintenance management information of the database cluster, which may include the topology information, configuration information, version information, connection credentials, etc.
[0088] Specifically, the operation and maintenance management component can access the metadata storage service based on the storage location information and obtain the metadata set of the database cluster from the metadata storage service.
[0089] S304, Determine the type of metadata to be extracted based on the type of operation and maintenance.
[0090] Metadata type is a classification parameter used to categorize metadata based on its content and function. As you can understand, different operation and maintenance types require different metadata. Therefore, it is necessary to first determine the metadata type to be extracted based on the operation and maintenance type, and then extract the data based on the metadata type.
[0091] In one embodiment, metadata types may include topology information, version information, configuration information, status information, connection information, etc. For example, for an upgrade operation, the metadata types to be extracted are topology information and version information. The topology information tells us which nodes need to be upgraded, and the version information tells us the current version. As another example, for a configuration change operation, the metadata types to be extracted may include configuration information, which allows us to obtain the complete configuration of the current database cluster.
[0092] Specifically, the operation and maintenance management component can determine the type of metadata to be extracted for the corresponding operation and maintenance operation based on the operation and maintenance operation type.
[0093] In one embodiment, the central control unit stores the correspondence between various operation and maintenance operation types and metadata types in its local storage. The operation and maintenance management component can find the corresponding relationship based on the operation and maintenance operation type to determine the metadata type to be extracted.
[0094] S306 extracts target metadata that matches the operation and maintenance type and the expected operation and maintenance information from the metadata set by using the metadata type and the metadata extraction range representing the expected operation and maintenance information.
[0095] The metadata extraction scope represented by the expected operation and maintenance information is an indication of the specific scope of the target metadata, which can be considered as a precise data filtering condition defined according to the user's intent. For example, when the metadata type is configuration information, the metadata extraction scope based on the expected operation and maintenance information could be "log.level parameter of TiKV component only".
[0096] Specifically, the operation and maintenance management component can determine the scope of metadata extraction that matches the user's intent based on the operation and maintenance expectation information. Then, based on the metadata type and the metadata extraction scope, it can extract the target metadata that matches the operation and maintenance operation type and the operation and maintenance expectation information from the metadata set.
[0097] In the above embodiments, the type of metadata to be extracted is determined by the type of operation and maintenance, and the range of metadata extraction that matches the user's intent is determined based on the expected operation and maintenance information. This can gradually reduce the difficulty of filtering metadata extraction operations, accurately locate the target metadata, and improve the speed and accuracy of obtaining the target metadata.
[0098] In one embodiment, the operation and maintenance type includes a central control machine deletion operation, and the target metadata includes the central control machine configuration file. S206, based on the target metadata and operation and maintenance expectation information, an operation and maintenance operation is performed on the database cluster, including: based on the operation and maintenance expectation information, determining at least one target central control machine to be deleted from each central control machine deployed for the database cluster; deleting the target configuration information corresponding to the target central control machine from the central control machine configuration file; the central control machine configuration file is used to store the sub-configuration information of each central control machine.
[0099] The central control unit deletion operation can be understood as an elastic scaling-down operation of the central control unit for the database. The central control unit topology file is an information storage file that centrally stores configuration information. It can be used to record the sub-configuration information of each central control unit in the entire operation and maintenance system, that is, the machine information of the central control unit. By performing a deletion operation on the central control unit configuration file, elastic scaling-down of the central control unit for the database can be achieved.
[0100] In one embodiment, the metadata directory structure of the database cluster stored on the metadata storage service may include an option file, a cluster file, and a central control machine configuration file. The option file may include the command audit logs of the database cluster. The cluster file may include the cluster metadata of each cluster in the database, such as configuration, topology, and keys. The central control machine configuration file may store sub-configuration information for each central control machine, such as machine information for each central control machine.
[0101] In one embodiment, the configuration information of the central control unit may include the central control unit identifier, the central control unit communication port, the central control unit communication user, the central control unit login communication password, and the address or path of the operation and maintenance management device image.
[0102] Specifically, the operation and maintenance management component can identify at least one target central control machine to be deleted from among the central control machines deployed for the database cluster, based on the expected operation and maintenance information. Then, based on the target central control machine, it determines the target configuration information corresponding to the target central control machine from the central control machine configuration file, and then deletes the target configuration information from the central control machine configuration file, thus completing the central control machine deletion operation.
[0103] Understandably, in addition to deleting the central control machine from the database cluster through the operation and maintenance management component, it is also necessary to remove the target central control machine from the database.
[0104] In one embodiment, after the operation and maintenance management component completes the central control unit deletion operation, it can obtain an updated central control unit configuration file and use the updated central control unit configuration file to update the central control unit configuration file in the metadata storage service.
[0105] In the above embodiments, the central control machine configuration file is stored in the metadata storage service. By deleting the central control machine configuration file, the central control machine in the database can be scaled down. This allows the entire database operation and maintenance system to configure the corresponding central control machine for operation and maintenance management according to actual needs, thereby improving the resource utilization rate of operation and maintenance management.
[0106] In one embodiment, the operation type includes a central control unit expansion operation, and the target metadata includes the central control unit configuration file. For example... Figure 4 As shown in S206, operations and maintenance are performed on the database cluster based on the target metadata and expected operation and maintenance information, including:
[0107] S402, based on the operation and maintenance expectation information, determine the new configuration information corresponding to at least one new central control machine deployed for the database cluster.
[0108] The newly added central control unit refers to the physical or virtual control node that is planned to be added to the database operation and maintenance management system. The newly added configuration information is the initial configuration data required for the newly added central control unit to integrate into the database operation and maintenance management system, such as relevant component packages and configuration information.
[0109] In one embodiment, the new configuration information may include a new central control unit identifier, a new central control unit communication port, a new central control unit communication user, a new central control unit login communication password, and the address or path of the operation and maintenance management device image.
[0110] Specifically, when the operation type is a central control machine expansion operation, the operation and maintenance expectation information includes the new configuration information required for integrating the new central control machine into the database operation and maintenance management system. The operation and maintenance management component can extract information from the operation and maintenance expectation information to obtain the new configuration information corresponding to at least one new central control machine deployed for the database cluster.
[0111] S404 specifies the target location for writing new configuration information in the central control unit configuration file.
[0112] The target write location is a blank space reserved in the central control unit (CCU) configuration file for a newly added CCU; it is a specific data segment. The target write location indicates the exact storage location of the new configuration information for the new CCU in the CCU configuration file.
[0113] Specifically, the operation and maintenance management component can determine the blank positions in the central control unit configuration file based on the current storage structure of the central control unit configuration file, and determine the blank positions as the target writing locations for new configuration information.
[0114] S406 writes the new configuration information to the target write location and deploys the new central control machine in the database cluster.
[0115] Specifically, after the operation and maintenance management component writes the new configuration information to the target write location, it can complete the deployment of the new central control machine in the database cluster through software processing.
[0116] In one embodiment, in addition to writing the new configuration information to the target write location, it is also necessary to implement the physical upper limit of the newly added central control machine in the physical scenario. That is, to install the operation and maintenance management component on the newly added central control machine physical node, apply the configuration information recorded in the metadata storage service to the central control machine, start the relevant services, and check whether the machine can connect to the metadata storage service and the database cluster normally.
[0117] In one embodiment, after the operation and maintenance management component completes the central control unit expansion operation, it can obtain an updated central control unit configuration file and use the updated central control unit configuration file to update the central control unit configuration file in the metadata storage service.
[0118] In the above embodiments, the central control machine configuration file is stored in the metadata storage service. By adding new central control machine configuration files, the capacity of the central control machine in the database can be expanded. This allows the entire database operation and maintenance system to configure the corresponding central control machine for operation and maintenance management according to actual needs, thereby improving the resource utilization rate of operation and maintenance management.
[0119] In one embodiment, S208, after the operation and maintenance operation is completed, the target metadata in the metadata storage service is updated according to the operation and maintenance operation type, including: after the operation and maintenance operation is completed, if the operation and maintenance operation type is a structural change type, then the updated metadata after the operation and maintenance operation is completed is obtained. The updated metadata is then used to update the target metadata in the metadata storage service.
[0120] The "structural change type" is a classification parameter used to determine whether an operational operation will alter the database cluster architecture or composition. If the operational operation type is classified as a structural change, it means that the operation will affect the cluster architecture or composition, requiring metadata updates. If the operational operation type is not classified as a structural change, it means that the operation will not affect the cluster architecture or composition, requiring no metadata updates.
[0121] In one embodiment, if the operation and maintenance type is a central control unit deletion operation or a central control unit expansion operation, then the operation and maintenance type is determined to be a structural change type. If the operation and maintenance type is a restart operation or a status check operation, then the operation and maintenance type is determined not to be a structural change type.
[0122] Specifically, the operation and maintenance management component can determine whether the operation and maintenance operation type belongs to the structural change type based on the type identifier of the operation and maintenance operation type. If the operation and maintenance operation type belongs to the structural change type, the operation and maintenance management component can obtain the updated metadata after the operation and maintenance operation is completed, and use the updated metadata to update the target metadata in the metadata storage service.
[0123] In one embodiment, if the operation and maintenance operation type is not a structural change type, the operation and maintenance management component will not update the target metadata in the metadata storage service.
[0124] In the above embodiments, by determining whether the operation and maintenance operation type belongs to the structural change type, it is determined whether the target metadata in the metadata storage service needs to be updated. This can effectively reduce the risk of concurrency conflicts and storage service load caused by unnecessary metadata writing, and effectively improve the resource utilization of the database operation and maintenance management system.
[0125] In one embodiment, to enable the scaling up and down operation and maintenance management of the central control unit, it is necessary to extend the operation and maintenance management cluster sub-commands used by the operation and maintenance management components. For example, it may include the following sub-commands:
[0126] `tiup clusterdisplay-host`: Displays the configuration information of all central control units, including the central control unit identifier, central control unit communication user, and the address of the operation and maintenance management device image. The configuration information is obtained from the central control unit configuration file on the metadata storage service.
[0127] `tiup cluster scale-in-host -N {host1,host2,...}`: scales down the central control unit. Here, `host` is the identifier of the central control unit to be scaled down. Multiple nodes can be scaled down simultaneously.
[0128] `tiup cluster scale-out-host {tiup-meta.yaml}`: Expands the central control machine. The parameter here is the configuration file path of the central control machine to be expanded. The file format is the same as the central control machine configuration file on the metadata storage service. Multiple nodes can be expanded at the same time.
[0129] In one embodiment, a database operation and maintenance management method is provided, which is applied to, for example, database operation and maintenance management methods. Figure 5 The database operation and maintenance management system shown is used as an example for illustration. This system includes a central control machine cluster and a cloud storage service. The central control machine cluster contains multiple central control machines, each capable of managing database instances. Simultaneously, it shares database metadata through the cloud storage service, meaning it stores or retrieves metadata from the cloud storage service.
[0130] like Figure 6 As shown, the method specifically includes the following steps:
[0131] S601, in response to an operation and maintenance command triggered for a database cluster, determines the type of operation and maintenance and the expected operation and maintenance information.
[0132] S602, when the operation and maintenance operation type is central control machine deletion operation, determine at least one target central control machine to be deleted from each central control machine deployed for the database cluster according to the operation and maintenance expectation information.
[0133] S603 extracts the storage location information of metadata in the metadata storage service from the local storage directory file.
[0134] S604 accesses the metadata storage service based on the storage location information to obtain the central control unit configuration file.
[0135] S605, delete the target configuration information corresponding to the target central control unit from the central control unit topology file.
[0136] S606, when the operation type is central control machine expansion operation, determines the new configuration information corresponding to at least one new central control machine deployed for the database cluster based on the operation expectation information.
[0137] S607 extracts the storage location information of metadata in the metadata storage service from the local storage directory file.
[0138] S608 accesses the metadata storage service based on the storage location information to obtain the central control unit configuration file.
[0139] S609 specifies the target location for writing new configuration information in the central control unit configuration file.
[0140] S610 writes the new configuration information to the target write location and deploys the new central control machine in the database cluster.
[0141] S611 retrieves the updated central control unit configuration file after the maintenance operation is completed.
[0142] S612 updates the central control unit configuration file in the metadata storage service using the updated central control unit configuration file.
[0143] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0144] Based on the same inventive concept, this application also provides a database operation and maintenance management device for implementing the database operation and maintenance management method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more database operation and maintenance management device embodiments provided below can be found in the limitations of the database operation and maintenance management method described above, and will not be repeated here.
[0145] In one embodiment, such as Figure 7 As shown, a database operation and maintenance management device 700 is provided, including: an instruction response module 701, a metadata acquisition module 702, an operation and maintenance module 703, and a metadata update module 704, wherein:
[0146] The instruction response module 701 is used to respond to operation and maintenance operation instructions triggered for the database cluster, and to determine the operation and maintenance operation type and expected operation and maintenance information.
[0147] The metadata acquisition module 702 is used to acquire target metadata that matches the operation and maintenance type and expected operation and maintenance information from the metadata storage service. At least two central control machines deployed for the database cluster share the metadata of the database cluster through the metadata storage service.
[0148] The operation and maintenance module 703 is used to perform operation and maintenance operations on the database cluster based on the target metadata and operation and maintenance expectation information.
[0149] The metadata update module 704 is used to update the target metadata in the metadata storage service according to the operation and maintenance operation type after the operation and maintenance operation is completed.
[0150] The aforementioned database operation and maintenance management device deploys at least two central control machines for the database cluster. Each central control machine can share the database cluster's metadata through a metadata storage service independent of each central control machine. Upon receiving an operation and maintenance operation instruction triggered for the database cluster, the operation and maintenance management component can respond to the instruction, determine the operation and maintenance type and expected information, then access the metadata storage service to obtain target metadata matching the operation and maintenance type and expected information. Based on the target metadata and expected information, the component performs the operation and maintenance operation on the database cluster. After the operation and maintenance operation is completed, the component updates the target metadata in the metadata storage service according to the operation and maintenance type. By deploying at least two central control machines for the database and storing the database cluster's metadata in a metadata storage service independent of each central control machine, this method allows other central control machines to continue performing operation and maintenance operations on the database cluster using the metadata stored in the metadata storage service even if one central control machine fails. This effectively improves the reliability of database operation and maintenance management and reduces the risk of database operation and maintenance interruption.
[0151] In one embodiment, the metadata acquisition module 702 is used to: extract the storage location information of metadata in the metadata storage service from a locally stored directory file; the directory file is used to record the data storage information of the metadata storage service; access the metadata storage service according to the storage location information, and obtain target metadata that matches the operation and maintenance type and expected operation and maintenance information.
[0152] In one embodiment, the metadata acquisition module 702 is configured to: access the metadata storage service based on storage location information to obtain the metadata set of the database cluster; determine the metadata type to be extracted based on the operation and maintenance type; and extract target metadata that matches the operation and maintenance type and the operation and maintenance expectation information from the metadata set through the metadata type and the metadata extraction range represented by the operation and maintenance expectation information.
[0153] In one embodiment, the operation and maintenance type includes a central control unit deletion operation; the target metadata includes the central control unit configuration file. The operation and maintenance module 703 is used to: determine at least one target central control unit to be deleted from among the central control units deployed for the database cluster, based on operation and maintenance expectation information; delete the target configuration information corresponding to the target central control unit from the central control unit topology file; the central control unit configuration file is used to store the sub-configuration information of each central control unit.
[0154] In one embodiment, the operation and maintenance type includes a central control unit expansion operation; the target metadata includes a central control unit configuration file. The operation and maintenance module 703 is used to: determine, based on the operation and maintenance expectation information, the new configuration information corresponding to at least one newly added central control unit deployed for the database cluster; determine the target write location of the new configuration information in the central control unit configuration file; write the new configuration information to the target write location; and deploy the new central control unit in the database cluster.
[0155] In one embodiment, the metadata update module 704 is used to: after the operation and maintenance operation is completed, if the operation and maintenance operation type is a structural change type, obtain the updated metadata after the operation and maintenance operation is completed; and use the updated metadata to update the target metadata in the metadata storage service.
[0156] Each module in the aforementioned database operation and maintenance management device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0157] In one embodiment, a computer device is provided, which may be a server integrating operation and maintenance management components, and its internal structure diagram may be as follows: Figure 8 As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores data related to database operation and maintenance management methods. The network interface communicates with external terminals via a network connection. When the computer program is executed by the processor, it implements a database operation and maintenance management method.
[0158] Those skilled in the art will understand that Figure 8 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0159] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0160] In response to maintenance operation instructions triggered for the database cluster, determine the type of maintenance operation and the expected maintenance information;
[0161] Obtain target metadata that matches the operation and maintenance type and expected operation and maintenance information from the metadata storage service. At least two central control machines deployed for the database cluster share the database cluster's metadata through the metadata storage service.
[0162] Perform operational and maintenance operations on the database cluster based on target metadata and operational and maintenance expectations.
[0163] After the operation and maintenance operation is completed, the target metadata in the metadata storage service is updated according to the operation and maintenance operation type.
[0164] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0165] Extract the storage location information of metadata in the metadata storage service from the local storage directory file; the directory file is used to record the data storage information of the metadata storage service.
[0166] Access the metadata storage service based on the storage location information to obtain target metadata that matches the operation and maintenance type and expected operation and maintenance information.
[0167] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0168] Access the metadata storage service based on the storage location information to obtain the metadata collection of the database cluster;
[0169] The type of metadata to be extracted is determined based on the type of operation and maintenance;
[0170] By using metadata types and the metadata extraction scope representing operational expectations, target metadata that matches the operational operation type and operational expectations can be extracted from the metadata set.
[0171] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0172] Based on the operational expectations, at least one target central control machine to be deleted is determined from the central control machines deployed for the database cluster.
[0173] Delete the target configuration information corresponding to the target central control unit from the central control unit topology file; the central control unit configuration file is used to store the sub-configuration information of each central control unit.
[0174] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0175] Based on the expected operation and maintenance information, determine the new configuration information corresponding to at least one new central control machine deployed for the database cluster;
[0176] Determine the target location for writing new configuration information in the central control unit configuration file;
[0177] Write the new configuration information to the target write location and deploy the new central control machine in the database cluster.
[0178] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0179] After the operation and maintenance operation is completed, if the operation and maintenance operation type is a structural change type, then obtain the updated metadata after the operation and maintenance operation is completed.
[0180] Use the update metadata function to update the target metadata in the metadata storage service.
[0181] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0182] In response to maintenance operation instructions triggered for the database cluster, determine the type of maintenance operation and the expected maintenance information;
[0183] Obtain target metadata that matches the operation and maintenance type and expected operation and maintenance information from the metadata storage service. At least two central control machines deployed for the database cluster share the database cluster's metadata through the metadata storage service.
[0184] Perform operational and maintenance operations on the database cluster based on target metadata and operational and maintenance expectations.
[0185] After the operation and maintenance operation is completed, the target metadata in the metadata storage service is updated according to the operation and maintenance operation type.
[0186] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0187] Extract the storage location information of metadata in the metadata storage service from the local storage directory file; the directory file is used to record the data storage information of the metadata storage service.
[0188] Access the metadata storage service based on the storage location information to obtain target metadata that matches the operation and maintenance type and expected operation and maintenance information.
[0189] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0190] Access the metadata storage service based on the storage location information to obtain the metadata collection of the database cluster;
[0191] The type of metadata to be extracted is determined based on the type of operation and maintenance;
[0192] By using metadata types and the metadata extraction scope representing operational expectations, target metadata that matches the operational operation type and operational expectations can be extracted from the metadata set.
[0193] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0194] Based on the operational expectations, at least one target central control machine to be deleted is determined from the central control machines deployed for the database cluster.
[0195] Delete the target configuration information corresponding to the target central control unit from the central control unit topology file; the central control unit configuration file is used to store the sub-configuration information of each central control unit.
[0196] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0197] Based on the expected operation and maintenance information, determine the new configuration information corresponding to at least one new central control machine deployed for the database cluster;
[0198] Determine the target location for writing new configuration information in the central control unit configuration file;
[0199] Write the new configuration information to the target write location and deploy the new central control machine in the database cluster.
[0200] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0201] After the operation and maintenance operation is completed, if the operation and maintenance operation type is a structural change type, then obtain the updated metadata after the operation and maintenance operation is completed.
[0202] Use the update metadata function to update the target metadata in the metadata storage service.
[0203] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps:
[0204] In response to maintenance operation instructions triggered for the database cluster, determine the type of maintenance operation and the expected maintenance information;
[0205] Obtain target metadata that matches the operation and maintenance type and expected operation and maintenance information from the metadata storage service. At least two central control machines deployed for the database cluster share the database cluster's metadata through the metadata storage service.
[0206] Perform operational and maintenance operations on the database cluster based on target metadata and operational and maintenance expectations.
[0207] After the operation and maintenance operation is completed, the target metadata in the metadata storage service is updated according to the operation and maintenance operation type.
[0208] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0209] Extract the storage location information of metadata in the metadata storage service from the local storage directory file; the directory file is used to record the data storage information of the metadata storage service.
[0210] Access the metadata storage service based on the storage location information to obtain target metadata that matches the operation and maintenance type and expected operation and maintenance information.
[0211] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0212] Access the metadata storage service based on the storage location information to obtain the metadata collection of the database cluster;
[0213] The type of metadata to be extracted is determined based on the type of operation and maintenance;
[0214] By using metadata types and the metadata extraction scope representing operational expectations, target metadata that matches the operational operation type and operational expectations can be extracted from the metadata set.
[0215] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0216] Based on the operational expectations, at least one target central control machine to be deleted is determined from the central control machines deployed for the database cluster.
[0217] Delete the target configuration information corresponding to the target central control unit from the central control unit topology file; the central control unit configuration file is used to store the sub-configuration information of each central control unit.
[0218] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0219] Based on the expected operation and maintenance information, determine the new configuration information corresponding to at least one new central control machine deployed for the database cluster;
[0220] Determine the target location for writing new configuration information in the central control unit configuration file;
[0221] Write the new configuration information to the target write location and deploy the new central control machine in the database cluster.
[0222] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0223] After the operation and maintenance operation is completed, if the operation and maintenance operation type is a structural change type, then obtain the updated metadata after the operation and maintenance operation is completed.
[0224] Use the update metadata function to update the target metadata in the metadata storage service.
[0225] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the acquisition, storage, processing, and transmission of the data all comply with relevant laws and regulations.
[0226] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0227] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0228] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A database operation and maintenance management method, characterized in that, The method includes: In response to maintenance operation instructions triggered for the database cluster, determine the type of maintenance operation and the expected maintenance information; Obtain target metadata that matches the operation and maintenance type and the expected operation and maintenance information from the metadata storage service. At least two central control machines deployed in the database cluster share the metadata of the database cluster through the metadata storage service. Based on the target metadata and the expected operation and maintenance information, perform operation and maintenance operations on the database cluster; After the operation and maintenance operation is completed, the target metadata in the metadata storage service is updated according to the operation and maintenance operation type.
2. The method according to claim 1, characterized in that, The step of obtaining target metadata matching the operation type from the metadata storage service includes: Extract the storage location information of the metadata in the metadata storage service from the local storage directory file; the directory file is used to record the data storage information of the metadata storage service. Access the metadata storage service based on the storage location information to obtain target metadata that matches the operation and maintenance type and the operation and maintenance expectation information.
3. The method according to claim 2, characterized in that, The step of accessing the metadata sharing service based on the storage location information to obtain target metadata that matches the operation and maintenance type and the expected operation and maintenance information includes: Access the metadata storage service based on the storage location information to obtain the metadata set of the database cluster; The type of metadata to be extracted is determined based on the aforementioned operation and maintenance type; Based on the metadata type and the metadata extraction range represented by the operation and maintenance expectation information, target metadata that matches the operation and maintenance operation type and the operation and maintenance expectation information is extracted from the metadata set.
4. The method according to any one of claims 1 to 3, characterized in that, The operation and maintenance type includes central control unit deletion operation; the target metadata includes central control unit configuration file; The operation and maintenance of the database cluster based on the target metadata and the expected operation and maintenance information includes: Based on the operational and maintenance expectation information, at least one target central control machine to be deleted is determined from each of the central control machines deployed for the database cluster; Delete the target configuration information corresponding to the target central control unit from the central control unit topology file; the central control unit configuration file is used to store the sub-configuration information of each central control unit.
5. The method according to any one of claims 1 to 3, characterized in that, The operation and maintenance type includes central control unit expansion operation; the target metadata includes central control unit configuration file; The operation and maintenance of the database cluster based on the target metadata and the expected operation and maintenance information includes: Based on the operational and maintenance expectation information, determine the new configuration information corresponding to at least one newly added central control machine deployed for the database cluster; Determine the target write location for the newly added configuration information in the central control unit configuration file; The newly added configuration information is written to the target write location, and the newly added central control machine is deployed in the database cluster.
6. The method according to any one of claims 1 to 3, characterized in that, The step of updating the target metadata in the metadata storage service according to the operation and maintenance type after the operation and maintenance operation is completed includes: After the operation and maintenance operation is completed, if the operation and maintenance operation type is a structural change type, then the updated metadata after the operation and maintenance operation is completed is obtained. The target metadata in the metadata storage service is updated using the updated metadata.
7. A database operation and maintenance management system, characterized in that, The system includes at least two central control machines deployed for the database cluster, operation and maintenance management components corresponding to each of the central control machines, and metadata storage services; The metadata storage service is used to store the metadata of the database cluster; each of the central control units shares the metadata through the metadata storage service. The operation and maintenance management component is used to implement the method described in any one of claims 1 to 6.
8. A database operation and maintenance management device, characterized in that, The device includes: The instruction response module is used to respond to operation and maintenance operation instructions triggered for the database cluster, and to determine the operation and maintenance operation type and expected operation and maintenance information. The metadata acquisition module is used to acquire target metadata that matches the operation and maintenance type and the operation and maintenance expectation information from the metadata storage service. At least two central control machines deployed in the database cluster share the metadata of the database cluster through the metadata storage service. The operation and maintenance module is used to perform operation and maintenance operations on the database cluster based on the target metadata and the operation and maintenance expectation information; The metadata update module is used to update the target metadata in the metadata storage service according to the operation and maintenance operation type after the operation and maintenance operation is completed.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.