Distributed database configuration management method and device, equipment and storage medium

Through custom resource configuration management methods, the configuration resource objects are generated and integrated and modified, and mounted to the Pod, the distributed database configuration management problems are solved, and the flexible and real-time configuration management is achieved.

CN119248883APending Publication Date: 2025-01-03JINZHUAN INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411403701.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-09
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

When modifying configurations, existing distributed databases need to enter the pods of related components one by one for adjustment. They are inefficient and error-prone, and cannot meet the flexibility and real-time requirements of configuration management.

Method used

Provide a distributed database configuration management method, by receiving the target components and target parameters to be modified by the user's custom resource configuration, generating configuration resource objects, integrating and modifying them, mounting them into the pod, and using custom resource configuration as configuration A unified entrance to management simplifies user operations and ensures the correctness and relevance of parameters.

Benefits of technology

It improves the efficiency of parameter configuration, solves the problems of inefficiency and error-prone in the existing technology, and meets the flexibility and real-time requirements of configuration management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119248883A_ABST
    Figure CN119248883A_ABST
Patent Text Reader

Abstract

The invention discloses a distributed database configuration management method and device, equipment and a storage medium, user operation is simplified by using user-defined resource configuration as a unified entry of configuration management, so that a user determines a target parameter and a target component which need to be modified through the user-defined resource configuration, and after the target parameter is verified and passes, the target component of the target parameter can be modified. According to the method, the first configuration resource object is generated, the first configuration resource object is combined with the current configuration resource object of the environment corresponding to the target component for integration and modification, and finally the second configuration resource object required by the Pod corresponding to the target component is generated and is mounted to the Pod for parameter configuration and modification, so that the correctness and relevance of parameters are ensured; meanwhile, the parameter configuration efficiency is improved, and the technical problems that when configuration of an existing distributed database is modified, the existing distributed database needs to enter pods of related components one by one for adjustment, the efficiency is low, errors are prone to occurring, and the flexibility and real-time performance of configuration management cannot be met are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of database configuration management, and in particular to a distributed database configuration management method, apparatus, device and storage medium. Background Art

[0002] Cloud native technology is a modern technology approach based on cloud computing to optimize application development and deployment. It makes full use of the elasticity, flexibility and automation of cloud computing, allowing applications to better adapt to changing business needs and user scale. In the cloud native architecture, distributed databases play a vital role. By packaging the database system and its dependencies into lightweight container images, it improves the portability and scalability of the system.

[0003] In a cloud-native environment, applications are often split into a series of independent and collaborative microservices. These microservices can be deployed, scaled, and maintained independently, greatly improving the flexibility and maintainability of the system. Container orchestration tools, such as Kubernetes, further enhance this flexibility by deploying microservices in the form of pods. Pod is the smallest deployment unit in Kubernetes, which encapsulates one or more containers that share network and storage resources.

[0004] However, existing cloud-native database technologies have some challenges in configuration management. For example, when a database configuration needs to be modified, administrators may need to enter the pods of related components one by one to make adjustments. This approach is not only inefficient but also error-prone, especially in complex distributed cloud database systems. These systems usually need to handle huge amounts of data and complex business requirements, so they have higher requirements for the flexibility and real-time performance of configuration management.

[0005] Another feature of distributed cloud databases is their high degree of distribution and scalability. This means that the database can be distributed in multiple geographical locations to support users and services around the world. This distributed nature requires that the database configuration can respond quickly to changes to adapt to different business scenarios and load requirements.

[0006] In addition, the diversity and complexity of distributed databases also bring challenges to configuration management. Different database components may have different configuration items and parameters, and there may be complex dependencies between these configuration items. If traditional configuration management methods are used, configuration errors or inconsistencies may occur, which will affect the performance and stability of the database. Summary of the invention

[0007] The present application provides a distributed database configuration management method, apparatus, device and storage medium, which solves the technical problem that when modifying the configuration of the existing distributed database, it is necessary to enter the pods of related components one by one to make adjustments, which is inefficient and prone to errors and cannot meet the flexibility and real-time requirements of configuration management.

[0008] In view of this, the first aspect of the present application provides a distributed database configuration management method, the method comprising:

[0009] Receive the target component and target parameters to be modified configured by the user through custom resources;

[0010] When the target parameter satisfies a preset verification rule, generating a first configuration resource object according to the target component and the target parameter;

[0011] Obtain the current configuration resource object of the environment corresponding to the target component;

[0012] Integrate and modify the current configuration resource object based on the first configuration resource object to generate a second configuration resource object;

[0013] The second configuration resource object is mounted to the Pod corresponding to the target component, and the Pod is configured according to the configuration parameters in the second configuration resource object.

[0014] Optionally, after receiving the target component to be modified and the target parameter configured by the user through the custom resource, the method further includes:

[0015] When the target parameters do not meet the preset verification rules, an error message and modification suggestions are generated;

[0016] The error message and modification suggestions are sent to the corresponding client of the user.

[0017] Optionally, the integrating and modifying the current configuration resource object based on the first configuration resource object to generate the second configuration resource object specifically includes:

[0018] According to the attribute of the target parameter, determining whether the target parameter is dynamically effective or statically effective;

[0019] If the target parameter is dynamically effective, integrating and modifying the current configuration resource object based on the first configuration resource object to generate a second configuration resource object;

[0020] If the target parameter is statically effective, it is determined whether to execute the restart instruction and whether to perform integration and modification of the current configuration resource object based on the first configuration resource object after restart to generate a second configuration resource object according to a preset restart strategy.

[0021] Optionally, the integrating and modifying the current configuration resource object based on the first configuration resource object to generate the second configuration resource object specifically includes:

[0022] If the target parameter included in the first configuration resource object exists in the current configuration resource object, updating the value in the current configuration resource object according to the target parameter to generate a second configuration resource object;

[0023] If the target parameter included in the first configuration resource object does not exist in the current configuration resource object, the target parameter is added to the current configuration resource object to generate a second configuration resource object.

[0024] Optionally, the configuring, by the Pod, according to the configuration parameters in the second configuration resource object further includes:

[0025] When the Pod is newly created or rebuilt, the configuration parameters in the second configuration resource object are read and the Pod is started with the configuration parameters.

[0026] Optionally, mounting the second configuration resource object to a Pod corresponding to the target component, and configuring the Pod according to configuration parameters in the second configuration resource object further includes:

[0027] Receive the parameter configuration effectiveness receipt returned by the Pod;

[0028] If the parameter configuration effectiveness receipt is a configuration failure, the configuration resource object of the Pod is rolled back to the current configuration resource object.

[0029] Optionally, mounting the second configuration resource object to a Pod corresponding to the target component, and configuring the Pod according to configuration parameters in the second configuration resource object further includes:

[0030] Generate a configuration change log, wherein the configuration change log includes the change time, the changed configuration parameter value and the user information.

[0031] A second aspect of the present application provides a distributed database configuration management device, the device comprising:

[0032] A receiving unit, used for receiving a target component to be modified and target parameters configured by a user through a custom resource;

[0033] A first generating unit, configured to generate a first configuration resource object according to the target component and the target parameter when the target parameter satisfies a preset verification rule;

[0034] An acquisition unit, used to acquire a current configuration resource object of an environment corresponding to the target component;

[0035] A second generating unit, configured to integrate and modify the current configuration resource object based on the first configuration resource object to generate a second configuration resource object;

[0036] The mounting unit is used to mount the second configuration resource object to the Pod corresponding to the target component, and the Pod is configured according to the configuration parameters in the second configuration resource object.

[0037] A third aspect of the present application provides a distributed database configuration management device, the device comprising a processor and a memory:

[0038] The memory is used to store program code and transmit the program code to the processor;

[0039] The processor is used to execute the steps of the distributed database configuration management method as described in the first aspect according to the instructions in the program code.

[0040] A fourth aspect of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store program code, and the program code is used to execute the method described in the first aspect above.

[0041] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:

[0042] In the present application, a distributed database configuration management method, apparatus, device and storage medium are provided, which use custom resource configuration as a unified entry for configuration management to simplify user operations, so that the user can determine the target parameters and target components that need to be modified through custom resource configuration, generate a first configuration resource object after the target parameters are verified and passed, integrate and modify the first configuration resource object with the current configuration resource object of the environment corresponding to the target component, and finally generate a second configuration resource object required by the Pod corresponding to the target component, mount it in the Pod to modify the configuration of the parameters, which not only ensures the correctness and relevance of the parameters, but also improves the efficiency of parameter configuration, and solves the technical problem that when modifying the configuration of the existing distributed database, it is necessary to enter the pods of the relevant components one by one for adjustment, which is inefficient and prone to errors, and cannot meet the flexibility and real-time performance of configuration management. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 This is a schematic diagram of an application environment of the distributed database configuration management method in an embodiment of the present application;

[0044] Figure 2A method flow chart of a distributed database configuration management method in an embodiment of the present application;

[0045] Figure 3 This is a schematic diagram of the structure of a distributed database configuration management device in an embodiment of the present application;

[0046] Figure 4 This is a schematic diagram of the structure of a distributed database configuration management device in an embodiment of the present application. DETAILED DESCRIPTION

[0047] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0048] The distributed database configuration management method provided in this application can be applied in Figure 1 In an application environment, the client communicates with the server through a network. The server can receive the target component to be modified and the target parameters configured by the user through the custom resource through the client; when the target parameters meet the preset verification rules, a first configuration resource object is generated according to the target component and the target parameters; the current configuration resource object of the environment corresponding to the target component is obtained; the current configuration resource object is integrated and modified based on the first configuration resource object to generate a second configuration resource object; the second configuration resource object is mounted to the Pod corresponding to the target component, and the Pod is configured according to the configuration parameters in the second configuration resource object. This application uses custom resource configuration as a unified entry for configuration management, simplifies user operations, and enables users to determine the target parameters and target components that need to be modified through custom resource configuration. After the target parameters are verified and passed, a first configuration resource object is generated, and the first configuration resource object is integrated and modified with the current configuration resource object of the target component corresponding environment, and finally the second configuration resource object required by the target component corresponding Pod is generated, and mounted to the Pod for parameter configuration modification, which not only ensures the correctness and relevance of the parameters, but also improves the efficiency of parameter configuration, and solves the problem that the existing distributed database needs to enter the pod of the relevant components one by one for adjustment when modifying the configuration, which is inefficient and prone to errors, and cannot meet the technical problems of flexibility and real-time performance of configuration management. Among them, the client can be but not limited to various personal computers, laptops, smart phones, tablet computers and portable wearable devices. The server can be implemented with an independent server or a server cluster composed of multiple servers. The following is a detailed description of this application through specific embodiments.

[0049] Kubernetes (k8s for short) is an open source container orchestration platform for automating the deployment, scaling, and management of containerized applications. Kubernetes provides a framework for running distributed systems that can seamlessly scale and manage container applications across host clusters. Kubernetes manages containers through abstractions such as Pod, Service, Deployment, ConfigMap, Secrets, etc. Pod is the basic deployment unit in Kubernetes. Service defines how to access Pod, Deployment is used to manage the deployment and scaling of Pod, and ConfigMap and Secrets are used to store configuration information and sensitive information. In Kubernetes, Custom Resource (CR for short, custom resource configuration) is an extension of the Kubernetes API that allows users to define their own resource types and corresponding operations. This enables Kubernetes to support custom operations and behaviors in addition to built-in resource types.

[0050] For easier understanding, see Figure 2 , Figure 2 Flowchart of the method for distributed database configuration management in the embodiment of the present application. Figure 2 As shown, specifically:

[0051] S201, receiving a target component to be modified and target parameters configured by a user through a custom resource;

[0052] It should be noted that this step involves users defining a Kubernetes custom resource configuration (Custom Resource, CR) to specify the database component (target component) and specific configuration parameters (target parameters) they want to modify.

[0053] For example: Users want to modify the database connection timeout. They create a CR, specifying the database component as "Database Service A" and the target parameter as "Connection Timeout = 30 seconds".

[0054] S202: When the target parameter satisfies the preset verification rule, a first configuration resource object is generated according to the target component and the target parameter;

[0055] It should be noted that the system will verify whether the target parameters specified by the user meet the predetermined rules (such as data type, value range, etc.). If the verification passes, the system will generate a new configuration resource object (first configuration resource object) based on these parameters, which is usually a ConfigMap.

[0056] Example: The system checks whether "Connection timeout = 30 seconds" is a valid configuration. After the verification passes, the system creates a new ConfigMap that contains the connection timeout setting for database service A.

[0057] S203, obtaining the current configuration resource object of the environment corresponding to the target component;

[0058] It should be noted that the system needs to obtain the configuration resource object (possibly an existing ConfigMap) that the target component in the current environment is using in order to perform subsequent updates.

[0059] Example: The system queries the ConfigMap associated with the current database service A to obtain its current configuration parameters.

[0060] S204, integrating and modifying the current configuration resource object based on the first configuration resource object to generate a second configuration resource object;

[0061] It should be noted that the system compares and integrates the first configuration resource object (the new configuration defined by the user) with the current configuration resource object (the existing configuration) to generate a new configuration resource object (the second configuration resource object), which will be used to update the configuration of the Pod.

[0062] For example: If the connection timeout in the current ConfigMap is set to "60 seconds" and in the new CR it is set to "30 seconds", the system will update this value and generate a new ConfigMap as the second configuration resource object.

[0063] S205. Mount the second configuration resource object to the Pod corresponding to the target component, and configure the Pod according to the configuration parameters in the second configuration resource object.

[0064] It should be noted that, finally, the system mounts the updated ConfigMap (the second configuration resource object) to the Pod corresponding to the target component. In this way, the Pod can update its own configuration according to the parameters in the new configuration resource object and restart the service to apply these changes.

[0065] For example, the system mounts a new ConfigMap containing "connection timeout = 30 seconds" to the Pod of database service A. The Pod detects the update of the ConfigMap and restarts the service to apply the new timeout setting.

[0066] Furthermore, after receiving the target component to be modified and the target parameter configured by the user through the custom resource, the following is further included:

[0067] When the target parameters do not meet the preset verification rules, error messages and modification suggestions are generated;

[0068] Send error information and modification suggestions to the user's corresponding client.

[0069] It should be noted that, assuming that a user wants to modify the database connection timeout, they submit a configuration request through CR to set the connection timeout to "25 seconds", for example:

[0070] apiVersion:"example.com / v1"

[0071] kind:DatabaseConfig

[0072] metadata:

[0073] name:db-config

[0074] spec:

[0075] timeoutSeconds:25

[0076] The system checks whether the value of timeoutSeconds is within the allowed range (for example, the preset rule requires that the timeout must be between 30 seconds and 120 seconds).

[0077] Since 25 seconds does not meet the preset validation rules, the system generates the following error message and modification suggestions:

[0078]

[0079] Finally, the system sends error information and modification suggestions to the user's client, such as through a web interface or API response.

[0080] Furthermore, integrating and modifying the current configuration resource object based on the first configuration resource object to generate the second configuration resource object specifically includes:

[0081] According to the properties of the target parameters, determine whether the target parameters are dynamically effective or statically effective;

[0082] If the target parameter is dynamically effective, the current configuration resource object is integrated and modified based on the first configuration resource object to generate a second configuration resource object;

[0083] If the target parameter is statically effective, it is determined whether to execute the restart instruction and whether to perform integration and modification of the current configuration resource object based on the first configuration resource object after restart to generate a second configuration resource object according to the preset restart strategy.

[0084] It should be noted that in the distributed database configuration management method, determining whether the target parameter is dynamically effective or statically effective according to its attributes and adopting different processing strategies accordingly are important steps to ensure that the configuration changes are correctly applied.

[0085] First, the system needs to determine whether the target parameters are dynamic or static. Dynamic parameters are those that can be applied immediately without restarting the service, while static parameters require a service restart to take effect.

[0086] If the target parameter is dynamically effective, the system will directly integrate and modify the current configuration resource object (existing configuration) based on the first configuration resource object (new configuration defined by the user) to generate a second configuration resource object.

[0087] If the target parameters are statically effective, the system will decide whether to restart the service based on the preset restart strategy, which may include immediate restart, delayed restart, or restart during off-peak hours.

[0088] Depending on the restart policy, the system may execute the restart instruction immediately or plan to restart at some point in the future.

[0089] After restarting, the system will integrate and modify the current configuration resource object based on the first configuration resource object to generate a second configuration resource object.

[0090] Example:

[0091] Suppose the user wants to change the log level of the database, which is a dynamically effective parameter, and change the maximum number of connections to the database, which is a statically effective parameter.

[0092] During the dynamic parameter processing:

[0093] First, the user submits a CR:

[0094] apiVersion:"example.com / v1"

[0095] kind:DatabaseConfig

[0096] metadata:

[0097] name:db-config

[0098] spec:

[0099] logLevel:"debug"

[0100] The system verifies the logLevel parameter and generates a new ConfigMap.

[0101] The system applies the new logLevel parameter to the current ConfigMap to generate a second configuration resource object without restarting the service.

[0102] During the static parameter validation process:

[0103] First, the user submits a CR:

[0104] apiVersion:"example.com / v1"

[0105] kind:DatabaseConfig

[0106] metadata:

[0107] name:db-config

[0108] spec:

[0109] maxConnections:100

[0110] The system verifies the maxConnections parameter and generates a new ConfigMap.

[0111] The system checks the preset restart policy and assumes that the policy is "restart immediately".

[0112] The system restarts the database service.

[0113] After the restart is complete, the system applies the new maxConnections parameter to the current ConfigMap to generate the second configuration resource object.

[0114] Furthermore, integrating and modifying the current configuration resource object based on the first configuration resource object to generate the second configuration resource object specifically includes:

[0115] If the target parameter included in the first configuration resource object exists in the current configuration resource object, then the value in the current configuration resource object is updated according to the target parameter to generate a second configuration resource object;

[0116] If the target parameter included in the first configuration resource object does not exist in the current configuration resource object, the target parameter is added to the current configuration resource object to generate a second configuration resource object.

[0117] It should be noted that the system will compare the parameters in the first configuration resource object (the new configuration submitted by the user through CR) with the parameters in the current configuration resource object (the existing ConfigMap).

[0118] If the target parameter contained in the first configuration resource object already exists in the current configuration resource object, the system will update the value of the corresponding parameter in the existing ConfigMap.

[0119] If the target parameter contained in the first configuration resource object does not exist in the current configuration resource object, the system will add the new parameter to the existing ConfigMap.

[0120] Whether updating or adding new parameters, a new ConfigMap will eventually be generated, which is the second configuration resource object and contains all the latest configurations.

[0121] Furthermore, configuring the Pod according to the configuration parameters in the second configuration resource object also includes:

[0122] When a Pod is newly created or rebuilt, the configuration parameters in the second configuration resource object are read and the Pod is started with the configuration parameters.

[0123] Furthermore, mounting the second configuration resource object to the Pod corresponding to the target component, and configuring the Pod according to the configuration parameters in the second configuration resource object further includes:

[0124] Receive the parameter configuration validation receipt returned by the Pod;

[0125] If the parameter configuration takes effect receipt is configuration failure, the configuration resource object of the rolled back Pod is the current configuration resource object.

[0126] It should be noted that the updated ConfigMap (second configuration resource object) is mounted to the Pod corresponding to the target component. In this way, the Pod can access the new configuration parameters.

[0127] When a Pod starts or restarts, it reads the configuration parameters in the mounted ConfigMap and adjusts its behavior based on these parameters.

[0128] The Pod will send a parameter configuration effectiveness receipt to the control system, indicating whether the configuration is successfully applied.

[0129] The control system will check the validation receipt returned by the Pod. If the receipt indicates that the configuration failed, the control system will perform a rollback operation.

[0130] If the configuration fails, the control system rolls back the Pod's configuration resource object to the previous version (the current configuration resource object) to ensure the stability of the system.

[0131] Furthermore, mounting the second configuration resource object to the Pod corresponding to the target component, and configuring the Pod according to the configuration parameters in the second configuration resource object further includes:

[0132] Generate a configuration change log, which includes the change time, changed configuration parameter value, and user information.

[0133] See also Figure 3 , Figure 3 Schematic diagram of the structure of the distributed database configuration management device in the embodiment of the present application. Figure 3 As shown, specifically:

[0134] The receiving unit 301 is used to receive the target component to be modified and the target parameters configured by the user through the custom resource;

[0135] A first generating unit 302, configured to generate a first configuration resource object according to the target component and the target parameter when the target parameter satisfies a preset verification rule;

[0136] The acquisition unit 303 is used to acquire the current configuration resource object of the environment corresponding to the target component;

[0137] The second generating unit 304 is used to integrate and modify the current configuration resource object based on the first configuration resource object to generate a second configuration resource object;

[0138] The mounting unit 305 is used to mount the second configuration resource object to the Pod corresponding to the target component, and the Pod is configured according to the configuration parameters in the second configuration resource object.

[0139] Another embodiment of the present invention provides a distributed database configuration management device, such as Figure 4 As shown, the device 10 includes:

[0140] One or more processors 110 and memory 120, Figure 4 A processor 110 is used as an example for description. The processor 110 and the memory 120 may be connected via a bus or other means. Figure 4 The example of connecting through bus is taken in the following.

[0141] The processor 110 is used to complete various control logics of the device 10, and it can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), a single-chip microcomputer, an ARM (Acorn RISCMachine) or other programmable logic device, a discrete gate or transistor logic, a discrete hardware component, or any combination of these components. In addition, the processor 110 can also be any traditional processor, microprocessor or state machine. The processor 110 can also be implemented as a combination of computing devices, for example, a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors combined with a DSP and / or any other such configuration.

[0142] The memory 120 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as program instructions corresponding to the method for constructing a multilingual phoneme representation model in the embodiment of the present invention. The processor 110 executes various functional applications and data processing of the device 10 by running the non-volatile software programs, instructions and units stored in the memory 120, that is, implements the method for constructing a multilingual phoneme representation model in the above method embodiment.

[0143] The memory 120 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and applications required for at least one function; the data storage area may store data created according to the use of the device 10, etc. In addition, the memory 120 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 120 may optionally include a memory remotely arranged relative to the processor 110, and these remote memories may be connected to the device 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0144] One or more units are stored in the memory 120, and when executed by one or more processors 110, the following steps are implemented:

[0145] Receive the target component and target parameters to be modified configured by the user through custom resources;

[0146] When the target parameter satisfies the preset verification rule, a first configuration resource object is generated according to the target component and the target parameter;

[0147] Get the current configuration resource object of the target component's corresponding environment;

[0148] Integrate and modify the current configuration resource object based on the first configuration resource object to generate a second configuration resource object;

[0149] The second configuration resource object is mounted to the Pod corresponding to the target component, and the Pod is configured according to the configuration parameters in the second configuration resource object.

[0150] An embodiment of the present invention provides a non-volatile computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are executed by one or more processors, any implementation of a distributed database configuration management method described in the above embodiments is implemented.

[0151] As an example, non-volatile storage media can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) as external cache memory. By way of illustration and not limitation, RAM can be obtained in many forms such as synchronous RAM (SRAM), dynamic RAM, (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), Synchlink DRAM (SLDRAM), and direct Rambus RAM (DRRAM). The disclosed memory components or memories of the operating environment described herein are intended to include one or more of these and / or any other suitable types of memory.

[0152] In the embodiments of the present application, a distributed database configuration management method, apparatus, device and storage medium are provided, which use custom resource configuration as a unified entry for configuration management to simplify user operations, so that the user can determine the target parameters and target components that need to be modified through custom resource configuration. After the target parameters are verified and passed, a first configuration resource object is generated, and the first configuration resource object is integrated and modified with the current configuration resource object of the environment corresponding to the target component, and finally a second configuration resource object required by the Pod corresponding to the target component is generated, and mounted in the Pod for parameter configuration modification, which not only ensures the correctness and relevance of the parameters, but also improves the efficiency of parameter configuration, and solves the technical problem that when modifying the configuration of the existing distributed database, it is necessary to enter the pods of the relevant components one by one for adjustment, which is inefficient and prone to errors, and cannot meet the flexibility and real-time performance of configuration management.

[0153] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0154] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein, for example. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0155] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0156] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0157] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0158] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0159] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (full name in English: Read-Only Memory, English abbreviation: ROM), random access memory (full name in English: Random Access Memory, English abbreviation: RAM), disk or optical disk and other media that can store program codes.

[0160] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

[0161] It should be noted that if software tools or components other than those of our company appear in the embodiments of the present application, they are only used for illustrative purposes and do not represent actual use.

Claims

1. A distributed database configuration management method, characterized in that: include: Receive the target component and target parameters to be modified configured by the user through custom resources; When the target parameter satisfies a preset verification rule, generating a first configuration resource object according to the target component and the target parameter; Obtain the current configuration resource object of the environment corresponding to the target component; Integrate and modify the current configuration resource object based on the first configuration resource object to generate a second configuration resource object; The second configuration resource object is mounted to the Pod corresponding to the target component, and the Pod is configured according to the configuration parameters in the second configuration resource object.

2. The distributed database configuration management method according to claim 1, characterized in that: After receiving the target component to be modified and the target parameter configured by the user through the custom resource, the method further includes: When the target parameters do not meet the preset verification rules, an error message and modification suggestions are generated; The error message and modification suggestions are sent to the corresponding client of the user.

3. The distributed database configuration management method according to claim 1, characterized in that: The integrating and modifying the current configuration resource object based on the first configuration resource object to generate the second configuration resource object specifically includes: According to the attribute of the target parameter, determining whether the target parameter is dynamically effective or statically effective; If the target parameter is dynamically effective, integrating and modifying the current configuration resource object based on the first configuration resource object to generate a second configuration resource object; If the target parameter is statically effective, it is determined whether to execute the restart instruction and whether to perform integration and modification of the current configuration resource object based on the first configuration resource object after restart to generate a second configuration resource object according to a preset restart strategy.

4. The distributed database configuration management method according to claim 1, characterized in that: The integrating and modifying the current configuration resource object based on the first configuration resource object to generate the second configuration resource object specifically includes: If the target parameter included in the first configuration resource object exists in the current configuration resource object, updating the value in the current configuration resource object according to the target parameter to generate a second configuration resource object; If the target parameter included in the first configuration resource object does not exist in the current configuration resource object, the target parameter is added to the current configuration resource object to generate a second configuration resource object.

5. The distributed database configuration management method according to claim 1, characterized in that: The configuring, by the Pod, according to the configuration parameters in the second configuration resource object further includes: When the Pod is newly created or rebuilt, the configuration parameters in the second configuration resource object are read and the Pod is started with the configuration parameters.

6. The distributed database configuration management method according to claim 1, characterized in that: After mounting the second configuration resource object to the Pod corresponding to the target component and configuring the Pod according to the configuration parameters in the second configuration resource object, the following further includes: Receive the parameter configuration effectiveness receipt returned by the Pod; If the parameter configuration effectiveness receipt is a configuration failure, the configuration resource object of the Pod is rolled back to the current configuration resource object.

7. The distributed database configuration management method according to claim 1, characterized in that: After mounting the second configuration resource object to the Pod corresponding to the target component and configuring the Pod according to the configuration parameters in the second configuration resource object, the following further includes: Generate a configuration change log, wherein the configuration change log includes the change time, the changed configuration parameter value and the user information.

8. A distributed database configuration management device, characterized in that: include: A receiving unit, used for receiving a target component to be modified and target parameters configured by a user through a custom resource; A first generating unit, configured to generate a first configuration resource object according to the target component and the target parameter when the target parameter satisfies a preset verification rule; An acquisition unit, used to acquire a current configuration resource object of an environment corresponding to the target component; A second generating unit, configured to integrate and modify the current configuration resource object based on the first configuration resource object to generate a second configuration resource object; The mounting unit is used to mount the second configuration resource object to the Pod corresponding to the target component, and the Pod is configured according to the configuration parameters in the second configuration resource object.

9. A distributed database configuration management device, characterized in that: The device comprises a processor and a memory: The memory is used to store program code and transmit the program code to the processor; The processor is used to execute the distributed database configuration management method according to any one of claims 1 to 7 according to the instructions in the program code.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store program code, and the program code is used to execute the distributed database configuration management method according to any one of claims 1 to 7.

Citation Information

Cited By

  • Method, device and equipment for optimizing configuration parameters of Hadoop platform

    CN121092231A