GoldenDB database high and low water level configuration adjustment method and device

By acquiring historical parameters and real-time alarm information from the GoldenDB database, a high and low water level configuration model is established to automatically adjust the high and low water level parameters of the GoldenDB database. This solves the problems of complexity of high and low water level configuration strategies and risks of human operation in existing technologies, and achieves efficient and stable configuration adjustment.

CN117370306BActive Publication Date: 2026-03-24CHINA CONSTRUCTION BANK
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-11
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

The existing GoldenDB database suffers from complexity and human error risks in adjusting high and low water level configuration strategies, resulting in inefficiency and unstable quality.

Method used

By acquiring historical parameters and real-time alarm information from the database, a high and low water level configuration model is established to automatically adjust the high and low water level parameters of the GoldenDB database, reducing manual intervention.

Benefits of technology

It achieves efficient and stable high and low water level configuration adjustment, reduces the risk of human operation, and improves configuration quality and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117370306B_ABST
    Figure CN117370306B_ABST
Patent Text Reader

Abstract

The application provides a GoldenDB database high-low water level configuration adjustment method and device, relates to the technical field of data processing, and comprises the following steps: obtaining historical parameters of a GoldenDB database; analyzing the historical parameters to establish a high-low water level configuration model of the GoldenDB database; the high-low water level configuration model comprises fault information of a replica in the GoldenDB database under different deployment modes; obtaining real-time alarm information of a replica fault in the GoldenDB database; and adjusting high water level parameters and low water level parameters of the GoldenDB database according to the real-time alarm information and the high-low water level configuration model, so that the high-low water level configuration of the GoldenDB database can be automatically adjusted, the risk of manual operation is avoided, and the quality and efficiency of adjusting the high-low water level configuration are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data processing, and in particular to a method and device for adjusting high and low water level configurations of a GoldenDB database. BACKGROUND

[0002] This section is intended to provide background or context to the embodiments of the application. The description herein does not constitute admission that the information provided herein is prior art.

[0003] The GoldenDB database guarantees high reliability of data through grouping management and high and low water level configurations. The insight management and control platform provided by the GoldenDB product provides a web-based operation interface for modifying the high and low water level configurations. When a database cluster fails or recovers from failure, manual intervention is required for evaluation and judgment, and the high and low water level configurations are modified through the insight operation page to ensure that the database cluster operates normally to the greatest extent and provides read and write services externally. Since the configuration strategies of the high and low water levels are not the same in different grouping settings, the rules are complex, and in the scenario of failure or failure recovery, manual evaluation and judgment are required and the high and low water level configurations are modified through the operation interface. The high and low water level configuration strategies and adjustment operations are complex, and the judgment and implementation risks introduced by manual evaluation and human operation are large, the completion quality and implementation efficiency of the modification of the high and low water level operations are low. The existing method of evaluating the high and low water level configuration strategies based on manual experience and adjusting the high and low water level configurations through the insight management and control platform has the following problems:

[0004] 1. In different node replica quantity and different grouping settings, the configuration strategies of the high and low water levels are not the same, and the rules are complex.

[0005] 2. When a node fails or recovers from failure, manual experience is required for evaluation and judgment of whether the water level configuration adjustment is needed.

[0006] 3. The high and low water level configurations are modified through the insight operation interface, and there is a risk of human operation implementation. SUMMARY

[0007] To solve the problems existing in the prior art, the present application provides a method and device for adjusting the high and low water level configurations of a GoldenDB database. The present application can automatically adjust the high and low water level configurations of a GoldenDB database, avoid the risk of human operation, and improve the quality and efficiency of adjusting the high and low water level configurations.

[0008] The present application provides a method for adjusting the high and low water level configurations of a GoldenDB database, comprising:

[0009] The historical parameters of the GoldenDB database are acquired, and the historical parameters include a deployment mode, a high-water level parameter and a low-water level parameter of the GoldenDB database; the high-water level parameter represents a number of packet responses received by a node in the GoldenDB database when the GoldenDB database is normally working; and the low-water level represents a minimum number of packet responses received by the node in the GoldenDB database for maintaining normal working of the GoldenDB database;

[0010] The historical parameters are analyzed to establish a high-low water level configuration model of the GoldenDB database; the high-low water level configuration model includes fault information of a replica in the GoldenDB database under different deployment modes;

[0011] Real-time alarm information of the replica in the GoldenDB database is acquired.

[0012] The high-water level parameter and the low-water level parameter of the GoldenDB database are adjusted according to the real-time alarm information and the high-low water level configuration model.

[0013] The embodiment of the application further provides an adjustment device for high-low water level configuration of a GoldenDB database, which comprises:

[0014] A historical parameter acquisition module is configured to acquire historical parameters of the GoldenDB database; the historical parameters include a deployment mode, a high-water level parameter and a low-water level parameter of the GoldenDB database; the high-water level parameter represents a number of packet responses received by a node in the GoldenDB database when the GoldenDB database is normally working; and the low-water level represents a minimum number of packet responses received by the node in the GoldenDB database for maintaining normal working of the GoldenDB database;

[0015] A model establishment module is configured to analyze the historical parameters and establish a high-low water level configuration model of the GoldenDB database; the high-low water level configuration model includes fault information of a replica in the GoldenDB database under different deployment modes;

[0016] An alarm information acquisition module is configured to acquire real-time alarm information of the replica in the GoldenDB database.

[0017] An adjustment module is configured to adjust the high-water level parameter and the low-water level parameter of the GoldenDB database according to the real-time alarm information and the high-low water level configuration model.

[0018] The embodiment of the present application also provides a computer device, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, and the processor implements the method for adjusting the high and low water level configurations of the GoldenDB database when executing the computer program.

[0019] The embodiment of the present application also provides a computer readable storage medium, which stores a computer program, and the computer program implements the method for adjusting the high and low water level configurations of the GoldenDB database when executed by a processor.

[0020] The embodiment of the present application also provides a computer program product, which comprises a computer program, and the computer program implements the method for adjusting the high and low water level configurations of the GoldenDB database when executed by a processor.

[0021] The method and device for adjusting the high and low water level configurations of the GoldenDB database provided by the present application obtain historical parameters of the GoldenDB database, wherein the historical parameters comprise a deployment mode of the GoldenDB database, a high water level parameter and a low water level parameter; the high water level parameter represents the number of packet responses received by a node in the GoldenDB database when the GoldenDB database is normally working; the low water level represents the minimum number of packet responses received by a node in the GoldenDB database for maintaining normal working of the GoldenDB database; the historical parameters are analyzed to establish a high and low water level configuration model of the GoldenDB database, wherein the high and low water level configuration model comprises fault information of a replica in the GoldenDB database under different deployment modes; real-time alarm information of the replica in the GoldenDB database is obtained; and the high water level parameter and the low water level parameter of the GoldenDB database are adjusted according to the real-time alarm information and the high and low water level configuration model, compared with the technical solution of artificial evaluation and artificial operation in the prior art, the high and low water level configurations of the GoldenDB database can be automatically adjusted, the risk of artificial operation is avoided, and the quality and efficiency of adjusting the high and low water level configurations are improved. BRIEF DESCRIPTION OF DRAWINGS

[0022] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0023] Figure 1 is a flowchart of the method for adjusting the high and low water level configurations of the GoldenDB database according to an embodiment of the present application;

[0024] Figure 2 is a GoldenDB database and application end interaction schematic diagram of an embodiment of the present application;

[0025] Figure 3 is a flow chart of a specific example of the adjustment method of the high and low water level configuration of the GoldenDB database of an embodiment of the present application;

[0026] Figure 4 is a schematic diagram of the adjustment device of the high and low water level configuration of the GoldenDB database of an embodiment of the present application;

[0027] Figure 5 is a computer device structure schematic diagram of an embodiment of the present application. DETAILED DESCRIPTION

[0028] The principles and spirits of the present application will be described below with reference to a number of exemplary embodiments. It should be understood that these embodiments are given only to enable those skilled in the art to better understand and implement the present application, and do not limit the scope of the present application in any way. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.

[0029] Those skilled in the art know that the embodiments of the present application can be implemented as a system, device, apparatus, method or computer program product. Therefore, the present disclosure can be embodied in the form of a complete hardware, a complete software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.

[0030] In order to ensure the normal operation of the database cluster and provide read and write services to the outside as much as possible, when a node fails or recovers, manual intervention is required to evaluate the demand and adjust the high and low water level configuration. Currently, there is no unified high and low water level configuration strategy in the industry, and the evaluation method relies on manual experience, and the way to adjust the high and low water level is based on the insight management and control platform of the GoldenDB product for manual operation.

[0031] Based on the above problems, a method for automatically adjusting the high and low water level configuration of the GoldenDB database is invented. Based on historical parameters for analysis, for example, according to expert experience, a general model of high and low water level configuration strategy is established to reduce the complexity of high and low water level configuration. Through the GoldenDB product background management interface, the operation of modifying the high and low water level configuration is automatically implemented to improve the completion quality and implementation efficiency of the operation of modifying the high and low water level. On this basis, the alarm automatic disposition rule is associated to realize intelligent adjustment of the high and low water level configuration in the failure occurrence and failure recovery scenarios, and to realize standard, efficient and agile completion of the related work of the high and low water level configuration of the GoldenDB database.

[0032] To simplify the high and low watermark configuration strategy and adjustment operations, and reduce the judgment and implementation risks introduced by manual evaluation and operation, it is necessary to develop a method for automatically adjusting the high and low watermark configuration of the GoldenDB database, thereby reducing the complexity of the high and low watermark configuration and improving the completion quality and implementation efficiency of the high and low watermark modification operation. According to an embodiment of the present invention, a method and apparatus for adjusting the high and low watermark configuration of a GoldenDB database are proposed, relating to the field of data processing technology.

[0033] The principles and spirit of the present invention will be explained in detail below with reference to several representative embodiments.

[0034] Figure 1 This is a flowchart illustrating a method for adjusting the high and low watermark configuration of a GoldenDB database according to an embodiment of the present invention. Figure 1 As shown, the method includes:

[0035] Step 101: Obtain historical parameters of the GoldenDB database; the historical parameters include the deployment mode, high watermark parameter, and low watermark parameter of the GoldenDB database; the high watermark parameter represents the number of packet responses received by the nodes in the GoldenDB database when the GoldenDB database is working normally; the low watermark parameter represents the minimum number of packet responses received by the nodes in the GoldenDB database to maintain normal operation of the GoldenDB database.

[0036] Step 102: Analyze historical parameters and establish a high and low water level configuration model for the GoldenDB database; the high and low water level configuration model includes fault information of replica failures in the GoldenDB database under different deployment modes;

[0037] Step 103: Obtain real-time alarm information for replica failures in the GoldenDB database;

[0038] Step 104: Adjust the high water level parameters and low water level parameters of the GoldenDB database based on real-time alarm information and the high and low water level configuration model.

[0039] To provide a clearer explanation of the methods for adjusting the high and low water level configurations of the GoldenDB database, each step will be explained in detail below.

[0040] GoldenDB database ensures high data reliability through group management and high / low watermark configuration. Group management refers to nodes grouping primary and backup replicas into teams based on regions. The primary node responds to the application based on the number of group responses received. As long as there is a complete copy of data within a group, zero data loss is guaranteed. The watermark is the number of group responses received by the node; the more responses received, the higher the watermark, and the fewer responses received, the lower the watermark. The high watermark represents the system environment under which the business can operate normally, while the low watermark represents the minimum system environment that the business can tolerate to maintain operation.

[0041] In step 101, the deployment mode of the GoldenDB database can be the number of replicas deployed in the GoldenDB database; the high-water mark parameter in the historical parameters can represent the number of packet responses received by the nodes in the GoldenDB database when the GoldenDB database is working normally; the low-water mark parameter can represent the minimum number of packet responses received by the nodes in the GoldenDB database to maintain normal operation of the GoldenDB database. When the number of packet responses is less than the high-water mark parameter, an alarm message will be generated; when the number of packet responses is less than the low-water mark parameter, the GoldenDB database will trigger a read-only state.

[0042] Figure 2 This is a schematic diagram illustrating the interaction between the GoldenDB database and the application in an embodiment of the present invention, as shown below. Figure 2 As shown, APP represents the application, DB represents the nodes (i.e., replicas) of the GoldenDB database cluster: DB-M represents the primary node, DB-S represents the backup node, with a total of 6 replicas. The dashed boxes represent group settings, and the water level counting conditions are as follows:

[0043] 1. The DB node counts the synchronization and replication responses between the primary and backup nodes in units of TEAM. The water level is incremented by 1 for each response received from a TEAM.

[0044] 2. Within the same TEAM, if one node responds, the TEAM returns a water level response. It can also be configured whether to calculate the current master DB node.

[0045] 3. Replication responses must meet the low watermark requirement: When the low watermark configuration is not met, DB node data cannot be committed, the database cannot run normally, and enters a read-only state.

[0046] Taking the three groups (TEAM) in the figure as an example, different high and low water level configuration strategies can be set for different user needs, as shown in Table 1:

[0047] Table 1

[0048]

[0049] In one embodiment, the historical parameters may also include one or any combination of the following: number of replicas, number of groups, and replica distribution.

[0050] In step 102, the historical parameters are analyzed. This can be done by abstracting the GoldenDB database based on expert experience and establishing a high and low water level configuration model for the GoldenDB database. The high and low water level configuration model includes fault information of replica failures in the GoldenDB database under different deployment modes.

[0051] In this embodiment, the fault information includes: one or any combination of the following: replica fault scenario, number of available replicas under replica fault scenario, number of responsive groups under replica fault scenario, whether the master node is counting under replica fault scenario, whether read-only is triggered under replica fault scenario, and high / low water level configuration under replica fault scenario.

[0052] In this embodiment, the high and low water level configuration model may further include: initial high and low water level configuration, and whether the initial master node is counted.

[0053] The high and low water level configuration model can cover two-replica, three-replica, four-replica, and five-replica deployment modes, where 0, 1, 2, 3, 4, and 5 replicas fail. The specific model is shown in Table 2 below:

[0054] Table 2

[0055]

[0056]

[0057]

[0058] Taking a three-replica deployment mode, with two replicas failing as an example, the following explanation is provided:

[0059] 1. In the three-replica deployment mode, the number of replicas, i.e. the number of nodes, is 3, which is divided into 3 TEAMs. Each TEAM contains 1 replica. That is, the TEAM replica distribution is described as 111.

[0060] 2. Based on expert experience, the high and low water levels are configured in a 2:2 ratio in this deployment mode, and the master node is set to count, that is, the response of the master node is calculated within the water level count range.

[0061] 3. When two of the replicas fail, the number of available replicas is 1, and the number of responding teams is 1, which is less than the current low watermark configuration of 2. The database then enters a read-only state.

[0062] 4. In order to ensure that the database can provide services to the outside world to the greatest extent, the low watermark configuration needs to be adjusted to 1. After the action is taken, the database cluster will run in a low watermark state and resume providing read and write services to the outside world.

[0063] In step 103, real-time alarm information of replica failure in the GoldenDB database is obtained. GoldenDB database alarm linkage handling can be designed to realize intelligent adjustment of high and low water level configuration in the scenarios of node failure and failure recovery.

[0064] In one embodiment, adjusting the high-water level and low-water level parameters of the GoldenDB database based on real-time alarm information and a high-low water level configuration model includes: obtaining key information about the GoldenDB database based on real-time alarm information; the key information includes: the address of the host where the GoldenDB database is located and the cluster number; determining the management interface of the GoldenDB database based on the key information; and calling the management interface of the GoldenDB database to adjust the high-water level and low-water level parameters of the GoldenDB database based on real-time alarm information and a high-low water level configuration model.

[0065] Based on alarm information generated during database node (replica) failures and recovery scenarios, key database information is obtained. The system then triggers automated adjustments to high and low water level configurations through alarms, ultimately enabling intelligent adjustment of high and low water level configurations in GoldenDB databases during node failures and recovery scenarios.

[0066] 1. An example of real-time alarm information for GoldenDB database node failure is as follows:

[0067] [Device Name: Host Name] ~ [GoldenDB] Network Element Name: CLUSTERMANAGER A standby DB has lost its heartbeat or is in an abnormal state. Alarm Supplement: [ClusterManager] Cluster [ID], group [ID], DB [Host IP Address: Service Port] are in an abnormal state.

[0068] 2. Obtain key information, including host address and cluster number, through real-time alarm information.

[0069] 3. It can rely on the existing alarm event integration platform to call the automated operation of adjusting high and low water level configuration, so as to realize intelligent adjustment of high and low water level configuration in node failure and fault recovery scenarios.

[0070] In one embodiment, adjusting the high and low water level parameters of the GoldenDB database by calling the GoldenDB database management interface based on real-time alarm information and the high and low water level configuration model may include: writing a high and low water level parameter adjustment script based on the real-time alarm information and the high and low water level configuration model; and adjusting the high and low water level parameters of the GoldenDB database by calling the GoldenDB database management interface based on the high and low water level parameter adjustment script.

[0071] Figure 3 This is a flowchart illustrating a specific example of a method for adjusting the high and low water level configuration of a GoldenDB database according to an embodiment of the present invention. Figure 3 As shown, the automated implementation of modifying high and low water level configuration operations based on the high and low water level configuration model can rely on the existing automated operation and maintenance platform SaaS. According to the GoldenDB database high and low water level configuration model, scripts can be written to call the GoldenDB backend management interface modifyGroupConfig to automate the modification of high and low water level configuration operations.

[0072] The specific functionality is as follows: Based on the total number of replicas and the number of currently available replicas, and according to the high and low watermark configuration model, the high and low watermark configuration is automatically adjusted. Taking a three-replica deployment mode as an example, the main script logic is as follows:

[0073] First, the `REPLICA` function is used to access the GoldenDB management node metadata database to obtain the number of replicas. Then, the `REPLICA_AVAIL` function is used to access the GoldenDB management node metadata database to obtain the currently available number of replicas. Next, the current high and low watermark configuration information is retrieved from the GoldenDB management node metadata database, including: HWM = high watermark; LWM = low watermark; H_IN = whether the high watermark master node is being counted; L_IN = whether the low watermark master node is being counted. If the `REPLICA` function returns an empty value, the replica count retrieval fails, and the process exits abnormally. If the `REPLICA` function returns a value that is neither 2, 3, 4, nor 5, the output "REPLICA is an unknown value" is displayed, and the process exits abnormally.

[0074] If the result of the REPLICA function is equal to 2, then the result of the REPLICA_AVAIL function is evaluated under this logic:

[0075] If the execution result of the REPLICA_AVAIL function is equal to 2, the following logic applies: If H_IN is not equal to 1, HWM is not equal to 1, L_IN is not equal to 1, or LWM is not equal to 1, the GoldenDB management interface is called to set the water level configuration to: "High Water Level Master Count": 1, "High Water Level": 1, "Low Water Level Master Count": 1, "Low Water Level": 1; otherwise, the current water level configuration does not need to be adjusted. Simultaneously, the following message is output: All replicas of the current data shard are operating normally.

[0076] If the execution result of the REPLICA_AVAIL function is equal to 1, the following logic applies: If H_IN is not equal to 1, HWM is not equal to 1, L_IN is not equal to 1, or LWM is not equal to 1, the GoldenDB management interface is called to set the water level configuration to: "High Water Level Master Count": 1, "High Water Level": 1, "Low Water Level Master Count": 1, "Low Water Level": 1; otherwise, the current water level configuration does not need to be adjusted. Simultaneously, an alarm message is output: The current data shard is operating at a low water level.

[0077] If the execution result of the REPLICA_AVAIL function is 0, the following logic applies: If H_IN is not equal to 1, HWM is not equal to 1, L_IN is not equal to 1, or LWM is not equal to 1, the GoldenDB management interface is called to set the water level configuration to: "High Water Level Master Count": 1, "High Water Level": 1, "Low Water Level Master Count": 1, "Low Water Level": 1; otherwise, the current water level configuration does not need to be adjusted. Simultaneously, the error message is output: All replicas of the current data shard are unavailable.

[0078] If the result of the REPLICA function is equal to 3, then the result of the REPLICA_AVAIL function is evaluated under this logic:

[0079] If the execution result of the REPLICA_AVAIL function is equal to 3, the following logic applies: If H_IN is not equal to 1, HWM is not equal to 2, L_IN is not equal to 1, or LWM is not equal to 2, the GoldenDB management interface is called to set the water level configuration to: "High Water Level Master Count": 1, "High Water Level": 2, "Low Water Level Master Count": 1, "Low Water Level": 2; otherwise, the current water level configuration does not need to be adjusted. Simultaneously, the following message is output: All replicas of the current data shard are operating normally.

[0080] If the execution result of the REPLICA_AVAIL function is equal to 2, then the following logic applies: if H_IN is not equal to 1, HWM is not equal to 2, L_IN is not equal to 1, or LWM is not equal to 1, then the GoldenDB management interface is called to set the water level configuration to: "High Water Level Master Count": 1, "High Water Level": 2, "Low Water Level Master Count": 1, "Low Water Level": 1; otherwise, the current water level configuration does not need to be adjusted.

[0081] If the execution result of the REPLICA_AVAIL function is equal to 1, the following logic applies: If H_IN is not equal to 1, HWM is not equal to 2, L_IN is not equal to 1, or LWM is not equal to 1, the GoldenDB management interface is called to set the water level configuration to: "High Water Level Master Count": 1, "High Water Level": 2, "Low Water Level Master Count": 1, "Low Water Level": 1; otherwise, the current water level configuration does not need to be adjusted. Simultaneously, an alarm message is output: The current data shard is operating at a low water level.

[0082] If the result of the REPLICA_AVAIL function is 0, the following logic applies: If H_IN is not equal to 1, HWM is not equal to 2, L_IN is not equal to 1, or LWM is not equal to 1, the GoldenDB management interface is called to set the water level configuration to: "High Water Level Master Count": 1, "High Water Level": 2, "Low Water Level Master Count": 1, "Low Water Level": 1; otherwise, the current water level configuration does not need to be adjusted. Simultaneously, the error message is output: All replicas of the current data shard are unavailable.

[0083] If the result of the REPLICA function is equal to 4, then the result of the REPLICA_AVAIL function is evaluated under this logic:

[0084] If the execution result of the REPLICA_AVAIL function is equal to 4, the following logic applies: If H_IN is not equal to 1, HWM is not equal to 2, L_IN is not equal to 1, or LWM is not equal to 1, the GoldenDB management interface is called to set the water level configuration to: "High Water Level Master Count": 1, "High Water Level": 2, "Low Water Level Master Count": 1, "Low Water Level": 1; otherwise, the current water level configuration does not need to be adjusted. Simultaneously, the following message is output: All replicas of the current data shard are operating normally.

[0085] If the execution result of the REPLICA_AVAIL function is equal to 3, then the following logic applies: if H_IN is not equal to 1, HWM is not equal to 2, L_IN is not equal to 1, or LWM is not equal to 1, then the GoldenDB management interface is called to set the water level configuration to: "High Water Level Master Count": 1, "High Water Level": 2, "Low Water Level Master Count": 1, "Low Water Level": 1; otherwise, the current water level configuration does not need to be adjusted.

[0086] If the execution result of the REPLICA_AVAIL function is equal to 2, the following logic applies: If H_IN is not equal to 1, HWM is not equal to 2, L_IN is not equal to 1, or LWM is not equal to 1, the GoldenDB management interface is called to set the water level configuration to: "High Water Level Master Count": 1, "High Water Level": 2, "Low Water Level Master Count": 1, "Low Water Level": 1; otherwise, the current water level configuration does not need to be adjusted. Simultaneously, an alarm message is output: The current data shard may be operating at a low water level.

[0087] If the execution result of the REPLICA_AVAIL function is equal to 1, the following logic applies: If H_IN is not equal to 1, HWM is not equal to 2, L_IN is not equal to 1, or LWM is not equal to 1, the GoldenDB management interface is called to set the water level configuration to: "High Water Level Master Count": 1, "High Water Level": 2, "Low Water Level Master Count": 1, "Low Water Level": 1; otherwise, the current water level configuration does not need to be adjusted. Simultaneously, an alarm message is output: The current data shard is operating at a low water level.

[0088] If the result of the REPLICA_AVAIL function is 0, the following logic applies: If H_IN is not equal to 1, HWM is not equal to 2, L_IN is not equal to 1, or LWM is not equal to 1, the GoldenDB management interface is called to set the water level configuration to: "High Water Level Master Count": 1, "High Water Level": 2, "Low Water Level Master Count": 1, "Low Water Level": 1; otherwise, the current water level configuration does not need to be adjusted. Simultaneously, the error message is output: All replicas of the current data shard are unavailable.

[0089] If the result of the REPLICA function is equal to 5, then the result of the REPLICA_AVAIL function is evaluated under this logic:

[0090] If the execution result of the REPLICA_AVAIL function is equal to 5, the following logic applies: If H_IN is not equal to 0, HWM is not equal to 2, L_IN is not equal to 0, or LWM is not equal to 2, the GoldenDB management interface is called to set the water level configuration to: "High Water Level Master Count": 0, "High Water Level": 2, "Low Water Level Master Count": 0, "Low Water Level": 2; otherwise, the current water level configuration does not need to be adjusted. Simultaneously, the following message is output: All replicas of the current data shard are operating normally.

[0091] If the execution result of the REPLICA_AVAIL function is equal to 4, then the following logic applies: if H_IN is not equal to 1, HWM is not equal to 2, L_IN is not equal to 1, or LWM is not equal to 2, then the GoldenDB management interface is called to set the water level configuration to: "High Water Level Master Count": 1, "High Water Level": 2, "Low Water Level Master Count": 1, "Low Water Level": 2; otherwise, the current water level configuration does not need to be adjusted.

[0092] If the execution result of the REPLICA_AVAIL function is equal to 3, then the following logic applies: if H_IN is not equal to 1, HWM is not equal to 2, L_IN is not equal to 1, or LWM is not equal to 1, then the GoldenDB management interface is called to set the water level configuration to: "High Water Level Master Count": 1, "High Water Level": 2, "Low Water Level Master Count": 1, "Low Water Level": 1; otherwise, the current water level configuration does not need to be adjusted.

[0093] If the execution result of the REPLICA_AVAIL function is equal to 2, the following logic applies: If H_IN is not equal to 1, HWM is not equal to 2, L_IN is not equal to 1, or LWM is not equal to 1, the GoldenDB management interface is called to set the water level configuration to: "High Water Level Master Count": 1, "High Water Level": 2, "Low Water Level Master Count": 1, "Low Water Level": 1; otherwise, the current water level configuration does not need to be adjusted. Simultaneously, an alarm message is output: The current data shard may be operating at a low water level.

[0094] If the execution result of the REPLICA_AVAIL function is equal to 1, the following logic applies: If H_IN is not equal to 1, HWM is not equal to 2, L_IN is not equal to 1, or LWM is not equal to 1, the GoldenDB management interface is called to set the water level configuration to: "High Water Level Master Count": 1, "High Water Level": 2, "Low Water Level Master Count": 1, "Low Water Level": 1; otherwise, the current water level configuration does not need to be adjusted. Simultaneously, an alarm message is output: The current data shard is operating at a low water level.

[0095] If the result of the REPLICA_AVAIL function is 0, the following logic applies: If H_IN is not equal to 1, HWM is not equal to 2, L_IN is not equal to 1, or LWM is not equal to 1, the GoldenDB management interface is called to set the water level configuration to: "High Water Level Master Count": 1, "High Water Level": 2, "Low Water Level Master Count": 1, "Low Water Level": 1; otherwise, the current water level configuration does not need to be adjusted. Simultaneously, the error message is output: All replicas of the current data shard are unavailable.

[0096] The beneficial effects of the GoldenDB database high and low water level configuration adjustment method provided in this embodiment of the invention are as follows:

[0097] 1. Establish a high and low water level configuration model for GoldenDB database, covering scenarios with 0, 1, 2, 3, 4, and 5 replicas in various deployment modes, respectively, to reduce the complexity of high and low water level configuration.

[0098] 2. By calling the GoldenDB management interface and based on the high and low water level configuration model, the operation of modifying the high and low water level configuration is automatically implemented, which improves the completion quality and implementation efficiency of the operation and reduces the risks of manual judgment and human operation.

[0099] 3. Based on the alarm information generated in the scenario of database node (replica) failure and failure recovery, design database alarm linkage handling to trigger intelligent adjustment of high and low water level configuration, so as to complete the relevant work of high and low water level configuration of GoldenDB database in a standardized, efficient and agile manner.

[0100] It should be noted that although the operation of the method of the present invention has been described in a specific order in the above embodiments and figures, this does not require or imply that the operations must be performed in that specific order, or that all the operations shown must be performed to achieve the desired result. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.

[0101] After introducing the method of exemplary embodiments of the present invention, the following references are made. Figure 4 An exemplary embodiment of the present invention will be described, which is a device for adjusting the high and low water level configuration of the GoldenDB database.

[0102] The implementation of the GoldenDB database high / low water level configuration adjustment device can refer to the implementation of the above method, and the repeated parts will not be described again. The term "module" or "unit" used below can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0103] Based on the same inventive concept, this invention also proposes a device for adjusting the high and low water level configuration of a GoldenDB database. Figure 4 This is a schematic diagram of an adjustment device for the high and low water level configuration of a GoldenDB database according to an embodiment of the present invention, as shown below. Figure 4 As shown, the device includes:

[0104] The historical parameter acquisition module 401 is used to acquire historical parameters of the GoldenDB database. The historical parameters include the deployment mode, high watermark parameter, and low watermark parameter of the GoldenDB database. The high watermark parameter represents the number of packet responses received by the nodes in the GoldenDB database when the GoldenDB database is working normally. The low watermark parameter represents the minimum number of packet responses received by the nodes in the GoldenDB database to maintain normal operation of the GoldenDB database.

[0105] The model building module 402 is used to analyze historical parameters and build a high and low water level configuration model for the GoldenDB database; the high and low water level configuration model includes fault information of replica failures in the GoldenDB database under different deployment modes;

[0106] The alarm information acquisition module 403 is used to acquire real-time alarm information about replica failures in the GoldenDB database.

[0107] The adjustment module 404 is used to adjust the high water level parameters and low water level parameters of the GoldenDB database based on real-time alarm information and the high and low water level configuration model.

[0108] In one embodiment, the historical parameters may also include one or any combination of the following: number of replicas, number of groups, and replica distribution.

[0109] In one embodiment, the fault information includes one or any combination of the following: replica fault scenario, number of available replicas in replica fault scenario, number of responsive groups in replica fault scenario, whether the master node counts in replica fault scenario, whether read-only is triggered in replica fault scenario, and high / low water level configuration in replica fault scenario.

[0110] In one embodiment, the high and low water level configuration model further includes: initial high and low water level configuration, and whether the initial master node is counted.

[0111] In one embodiment, the adjustment module 404 is specifically used for:

[0112] Obtain key information about the GoldenDB database based on real-time alarm information; key information includes: the address of the host where the GoldenDB database is located and the cluster number;

[0113] Determine the management interface of the GoldenDB database based on key information;

[0114] Based on real-time alarm information and the high and low water level configuration model, the management interface of the GoldenDB database is called to adjust the high and low water level parameters of the GoldenDB database.

[0115] In one embodiment, the adjustment module 404 is specifically used for:

[0116] Scripts for adjusting high and low water level parameters were written based on real-time alarm information and high and low water level configuration models.

[0117] The script adjusts the high and low water level parameters of the GoldenDB database by calling the database management interface.

[0118] It should be noted that although several modules of the GoldenDB database high and low water level configuration adjustment device are mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, according to embodiments of the present invention, the features and functions of two or more modules described above can be embodied in one module. Conversely, the features and functions of one module described above can be further divided and embodied by multiple modules.

[0119] Based on the aforementioned inventive concept, such as Figure 5 As shown, the present invention also proposes a computer device 500, including a memory 510, a processor 520, and a computer program 530 stored in the memory 510 and executable on the processor 520. When the processor 520 executes the computer program 530, it implements the aforementioned method for adjusting the high and low water level configuration of the GoldenDB database.

[0120] Based on the aforementioned inventive concept, this invention proposes a computer-readable storage medium storing a computer program that, when executed by a processor, implements the aforementioned method for adjusting the high and low watermark configurations of the GoldenDB database.

[0121] Based on the aforementioned inventive concept, this invention proposes a computer program product, which includes a computer program that, when executed by a processor, implements a method for adjusting the high and low watermark configuration of the GoldenDB database.

[0122] The present invention proposes a method and apparatus for adjusting the high and low watermark configuration of a GoldenDB database. This method acquires historical parameters of the GoldenDB database, including its deployment mode, high watermark parameters, and low watermark parameters. The high watermark parameter represents the number of packet responses received by nodes in the GoldenDB database when it is operating normally. The low watermark parameter represents the minimum number of packet responses received by nodes in the GoldenDB database to maintain normal operation. The historical parameters are analyzed to establish a high and low watermark configuration model for the GoldenDB database. This model includes fault information regarding replica failures in the GoldenDB database under different deployment modes. Real-time alarm information regarding replica failures in the GoldenDB database is acquired. Based on the real-time alarm information and the high and low watermark configuration model, the high and low watermark parameters of the GoldenDB database are adjusted. Compared with existing technologies that rely on manual evaluation and operation, this method enables automatic adjustment of the high and low watermark configuration of the GoldenDB database, avoiding the risks of manual operation and improving the quality and efficiency of adjusting the high and low watermark configuration.

[0123] The acquisition, storage, use, and processing of data in this application comply with relevant laws and regulations.

[0124] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0125] This invention is described with reference to flowchart illustrations and / or block diagrams of methods and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0126] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0127] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0128] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for adjusting the high and low watermark configuration of a GoldenDB database, characterized in that, include: Obtain historical parameters of the GoldenDB database; the historical parameters include the deployment mode, high watermark parameter, and low watermark parameter of the GoldenDB database; the high watermark parameter represents the number of packet responses received by the nodes in the GoldenDB database when the GoldenDB database is working normally; the low watermark parameter represents the minimum number of packet responses received by the nodes in the GoldenDB database to maintain normal operation of the GoldenDB database. Historical parameters are analyzed to establish a high and low water level configuration model for the GoldenDB database; the high and low water level configuration model includes fault information of replica failures in the GoldenDB database under different deployment modes; Obtain real-time alerts about replica failures in the GoldenDB database; Based on real-time alarm information and the high and low water level configuration model, adjust the high and low water level parameters of the GoldenDB database.

2. The method according to claim 1, characterized in that, The historical parameters also include one or any combination of the following: number of replicas, number of groups, and replica distribution.

3. The method according to claim 1, characterized in that, The fault information includes: replica fault scenarios, the number of available replicas under replica fault scenarios, the number of responsive groups under replica fault scenarios, whether the master node is counting under replica fault scenarios, whether read-only mode is triggered under replica fault scenarios, and one or any combination of high and low water level configurations under replica fault scenarios.

4. The method according to claim 1, characterized in that, The high and low water level configuration model also includes: initial high and low water level configuration, and whether the initial master node is counted.

5. The method according to claim 1, characterized in that, Based on real-time alarm information and the high and low water level configuration model, adjust the high and low water level parameters of the GoldenDB database, including: Obtain key information about the GoldenDB database based on real-time alarm information; key information includes: the address of the host where the GoldenDB database is located and the cluster number; Determine the management interface of the GoldenDB database based on key information; Based on real-time alarm information and the high and low water level configuration model, the management interface of the GoldenDB database is called to adjust the high and low water level parameters of the GoldenDB database.

6. The method according to claim 5, characterized in that, Based on real-time alarm information and the high and low water level configuration model, the GoldenDB database management interface is invoked to adjust the high and low water level parameters of the GoldenDB database, including: Scripts for adjusting high and low water level parameters were written based on real-time alarm information and high and low water level configuration models. The script adjusts the high and low water level parameters of the GoldenDB database by calling the database management interface.

7. A device for adjusting the high and low water level configuration of a GoldenDB database, characterized in that, include: The historical parameter acquisition module is used to acquire historical parameters of the GoldenDB database. The historical parameters include the deployment mode, high watermark parameter, and low watermark parameter of the GoldenDB database. The high watermark parameter represents the number of packet responses received by the nodes in the GoldenDB database when the GoldenDB database is working normally. The low watermark parameter represents the minimum number of packet responses received by the nodes in the GoldenDB database to maintain normal operation of the GoldenDB database. The model building module is used to analyze historical parameters and build a high and low water level configuration model for the GoldenDB database. The high and low water level configuration model includes fault information of replica failures in the GoldenDB database under different deployment modes. The alarm information acquisition module is used to acquire real-time alarm information about replica failures in the GoldenDB database; The adjustment module is used to adjust the high water level parameters and low water level parameters of the GoldenDB database based on real-time alarm information and the high and low water level configuration model.

8. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method of any one of claims 1 to 6.

10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the method of any one of claims 1 to 6.

Citation Information

Patent Citations

  • Automatic monitoring and dynamic adjustment method based on WebLogic middleware core parameter

    CN110543402A

  • Database configuration parameter adjustment method and device and storage medium

    CN113872788A