Database upgrading method, electronic equipment, storage medium and program product
By obtaining and judging the configuration parameters of the target database, reloading the configuration parameters and upgrading the database cluster, the problem of unable to provide services to users during the database upgrade process in the existing technology is solved, and efficient and stable service provision is achieved.
Patent Information
- Application Number
- CN202510263091.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-06
- Publication Date
- 2025-06-03
AI Technical Summary
When the existing technology upgrades a stand-alone database to a multi-node database cluster, it is impossible to provide services to users during the upgrade process, resulting in a decline in service efficiency and quality and affecting user experience.
By obtaining the configuration parameters of the target database, determine whether it is the same as the preset configuration parameters, and determine whether the effective mode is the effective mode after reloading at different times. If the conditions are met, the configuration parameters are reloaded, the database is upgraded to a single node cluster, and to a multi-node cluster under low load.
It has realized that the service will continue to be provided to users during the database upgrade process, improve service efficiency and quality, and improve user experience.
Smart Images

Figure CN120086206A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a database upgrading method, electronic equipment, storage medium and program product. Background Art
[0002] With the continuous development of the Internet and computer technology, various business systems have emerged one after another. For some business systems, only a stand-alone database is deployed when they go online. After a long period of operation, the stand-alone database accumulates a large amount of business data. Later, as the importance of the business system continues to emerge, based on data redundancy and availability issues, the stand-alone database is transformed into a multi-node database cluster.
[0003] Currently, upgrading a stand-alone database to a multi-node database cluster generally involves deploying an additional database cluster including a master node and at least one slave node. In response to the upgrade requirements, the services associated with the stand-alone database are disconnected, and the data in the stand-alone database is migrated to the database cluster.
[0004] However, this upgrade method makes it impossible to provide services to users during the data migration process, reduces service efficiency and quality, and affects user experience. Summary of the invention
[0005] The embodiments of the present application provide a database upgrade method, an electronic device, a storage medium, and a program product, so as to continue to provide services to users during the upgrade process, improve service efficiency and quality, and improve user experience.
[0006] In a first aspect, an embodiment of the present application provides a database upgrade method, the method comprising: in response to an upgrade operation on a target database, obtaining configuration parameters of the target database; the target database is a database that is providing services;
[0007] Determine whether the parameter value of the configuration parameter is the same as the parameter value of the corresponding preset configuration parameter, and if not, determine whether the effective mode of the configuration parameter during the upgrade is the effective mode after reloading;
[0008] If yes, reloading the configuration parameter based on the parameter value of the corresponding preset configuration parameter, and upgrading the target database to a single-node database cluster based on the reloading result;
[0009] A current load state is determined, and when the current load state is a low load state, the single-node database cluster is upgraded to a multi-node database cluster.
[0010] In a possible implementation, determining whether the effective mode of the configuration parameter is the effective-after-overload mode during the upgrade includes: querying the effective timing field corresponding to the configuration parameter in the set of display and management configuration parameters; and determining whether the effective mode of the configuration parameter is the effective-after-overload mode according to the effective timing field.
[0011] In a possible implementation, reloading the configuration parameter based on the parameter value of the corresponding preset configuration parameter and upgrading the target database to a single-node database cluster based on the reload result includes: updating the parameter value of the configuration parameter with the parameter value of the corresponding preset configuration parameter to obtain an updated configuration parameter; calling a reload interface, and re-reading and configuring the updated configuration parameter based on the call result; and sequentially performing operations of creating a pre-loaded cluster manager, registering a master node, and starting a high-availability component, so that the target database is upgraded to a single-node database cluster.
[0012] In a possible implementation, after determining whether the parameter value of the configuration parameter is the same as the parameter value of the corresponding preset configuration parameter, it further includes: if so, upgrading the target database to a single-node database cluster, and upgrading the single-node database cluster to a multi-node database cluster in a low-load state; after determining whether the effective mode of the configuration parameter is the effective-after-overload mode during the upgrade, it further includes: if not, exiting the upgrade.
[0013] In a possible implementation, before obtaining the configuration parameter of the target database in response to an upgrade operation for the target database, it further includes: in response to an initialization operation for the target database, generating a corresponding configuration file based on the configuration template file corresponding to the target database; the configuration file includes pre-loaded configuration information of the cluster manager; and performing a pre-loading operation of the cluster manager according to the pre-loaded configuration information of the cluster manager.
[0014] In a possible implementation, determining the current load state includes: when the current time is within the preset time range, determining that the current load state is a low-load state; when the current time is outside the preset time range, determining that the current load state is a high-load state; or when the number of client connections or resource utilization rate is less than the corresponding preset value, determining that the current load state is a low-load state; when the number of client connections or resource utilization rate is greater than the corresponding preset value, determining that the current load state is a high-load state.
[0015] In a possible implementation, upgrading the single-node database cluster to a multi-node database cluster includes: based on the single-node database cluster, copying the data in the target database serving as the primary node to multiple preset databases, and performing a startup operation on the multiple preset databases after the copying; establishing a streaming replication relationship between the target database and the multiple preset databases to upgrade the single-node database cluster to a multi-node database cluster.
[0016] In a second aspect, an embodiment of the present application provides a database upgrade device, including: an acquisition module, configured to acquire configuration parameters of a target database in response to an upgrade operation for the target database; the target database is a database that is currently providing services;
[0017] a judgment module, configured to judge whether the parameter value of the configuration parameter is the same as the parameter value of the corresponding preset configuration parameter. If not, judge whether the effective mode of the configuration parameter during upgrade is the effective-after-overloading mode;
[0018] an overloading module, configured to, if so, overload the configuration parameter based on the parameter value of the corresponding preset configuration parameter;
[0019] an upgrade module, configured to upgrade the target database to a single-node database cluster based on the overloading result;
[0020] a determination module, configured to determine the current load status;
[0021] The upgrade module is further configured to upgrade the single-node database cluster to a multi-node database cluster when the current load status is a low-load status.
[0022] In a possible implementation, when judging whether the effective mode of the configuration parameter during upgrade is the effective-after-overloading mode, the judgment module is specifically configured to:
[0023] query an effective timing field corresponding to the configuration parameter in a set for displaying and managing configuration parameters; and judge whether the effective mode of the configuration parameter is the effective-after-overloading mode according to the effective timing field.
[0024] In a possible implementation, when overloading the configuration parameter based on the parameter value of the corresponding preset configuration parameter, the overloading module is specifically configured to:
[0025] update the parameter value of the configuration parameter with the parameter value of the corresponding preset configuration parameter to obtain an updated configuration parameter; call an overloading interface, and re-read and configure the updated configuration parameter based on the call result;
[0026] Accordingly, when upgrading the target database to a single-node database cluster based on the overload result, the upgrade module is specifically configured to:
[0027] Sequentially perform operations of creating a pre-loaded cluster manager, registering a master node, and starting a high-availability component, so as to upgrade the target database to a single-node database cluster.
[0028] In a possible implementation manner, the database upgrade device further includes: an exit module;
[0029] Wherein, after the upgrade module determines whether the parameter value of the configuration parameter is the same as the parameter value of the corresponding preset configuration parameter in the judgment module, if so, it upgrades the target database to a single-node database cluster, and upgrades the single-node database cluster to a multi-node database cluster in a low-load state; the exit module is used to exit the upgrade if the effective mode of the configuration parameter during the upgrade judgment in the judgment module is not the overload-after-effective mode.
[0030] In a possible implementation manner, the database upgrade device further includes: a generation module, an execution module;
[0031] Wherein, the generation module is used to generate a corresponding configuration file based on the configuration template file corresponding to the target database in response to an initialization operation for the target database before the acquisition module acquires the configuration parameters of the target database in response to an upgrade operation for the target database; the configuration file includes pre-loaded configuration information of the cluster manager; the execution module is used to perform a pre-loading operation of the cluster manager according to the pre-loaded configuration information of the cluster manager.
[0032] In a possible implementation manner, when determining the current load state, the determination module is specifically configured to:
[0033] When the current time is within the preset time range, determine that the current load state is a low-load state; when the current time is outside the preset time range, determine that the current load state is a high-load state; or, when the connection number or resource utilization rate of the client is less than the corresponding preset value, determine that the current load state is a low-load state; when the connection number or resource utilization rate of the client is greater than the corresponding preset value, determine that the current load state is a high-load state.
[0034] In a possible implementation manner, when upgrading the single-node database cluster to a multi-node database cluster, the upgrade module is specifically configured to:
[0035] Based on the database cluster of the single node, copy the data in the target database serving as the master node to multiple preset databases, and perform a startup operation on the multiple preset databases after the copying; establish a streaming replication relationship between the target database and the multiple preset databases to upgrade the single-node database cluster to a multi-node database cluster.
[0036] In a third aspect, an embodiment of the present application provides an electronic device, including: a memory, a processor;
[0037] The memory stores computer-executable instructions;
[0038] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the above first aspect and / or various possible implementation manners of the first aspect.
[0039] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored, and when the computer-executable instructions are executed by a processor, they are used to implement the above first aspect and / or various possible implementation manners of the first aspect.
[0040] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, and when the computer program is executed by a processor, it implements the above first aspect and / or various possible implementation manners of the first aspect.
[0041] For the database upgrade method, electronic device, storage medium and program product provided by the embodiments of the present application, since the preset configuration parameters and their corresponding parameter values during the upgrade are pre-stored, in response to the upgrade operation for the target database, by obtaining the configuration parameters of the target database that is currently providing services, it can be determined whether the parameter value of the configuration parameter is the same as the parameter value of the corresponding preset configuration parameter, and when they are different, it can be further determined whether the effective mode of the configuration parameter during the upgrade is the effective-after-overloading mode. Thus, when it is determined to be the effective-after-overloading mode, based on the parameter value of the corresponding preset configuration parameter, the configuration parameter is overloaded, and based on the overloading result, the target database is upgraded to a single-node database cluster. And by determining the current load status, when it is determined that the current load status is a low-load status, the single-node database cluster can be upgraded to a multi-node database cluster. Thereby, the effect of continuously providing services to users during the upgrade process, improving service efficiency and quality, and improving the user experience is achieved. Description of the Drawings
[0042] The drawings here are incorporated into the specification and form a part of the specification, showing the embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application.
[0043] Figure 1 Schematic diagram of the scenario of the database upgrade method provided by this application;
[0044] Figure 2 Flow diagram of the database upgrade method provided by this application Figure 1 ;
[0045] Figure 3 Flow diagram of the database upgrade method provided by this application Figure 2 ;
[0046] Figure 4 Schematic diagram of the structure of the database upgrade device provided by this application;
[0047] Figure 5 Schematic diagram of the structure of the electronic device provided by this application.
[0048] Through the above-mentioned drawings, specific embodiments of this application have been shown, and there will be more detailed descriptions hereinafter. These drawings and textual descriptions are not intended to limit the scope of the concept of this application in any way, but to illustrate the concept of this application to those skilled in the art by referring to specific embodiments. Detailed Description of Specific Embodiments
[0049] Here, the exemplary embodiments will be described in detail, and the examples are shown in the drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. On the contrary, they are merely examples of devices and methods consistent with some aspects of this application as detailed in the appended claims.
[0050] First, the terms involved in this application are explained:
[0051] Single-machine database: It refers to a database system running on a single physical server or computer. All data storage, query processing, and transaction management are carried out on this machine.
[0052] Single-node database cluster: It refers to a database cluster system running on one node. Although it is called a "cluster", in fact, only one node is running.
[0053] Multi-node database cluster: It refers to a database system composed of multiple nodes, and these nodes work together to provide higher performance, availability, and scalability.
[0054] At present, upgrading a stand-alone database to a multi-node database cluster generally involves deploying an additional database cluster containing a master node and at least one slave node based on the running stand-alone database. When the running stand-alone database needs to be upgraded to a multi-node database cluster, the service associated with the stand-alone database is disconnected, making the stand-alone database offline. The data in the stand-alone database is then migrated to the database cluster and continued to run based on the database cluster. However, this upgrade method makes it impossible to provide services to users during the data migration process, reducing service efficiency and quality, and affecting user experience.
[0055] When facing the technical problems in the prior art, in order to continue to provide services to users during the upgrade process, improve service efficiency and quality, and improve user experience, instead of disconnecting the services associated with the stand-alone database when an upgrade is required, the configuration parameters of the multi-node database cluster and the corresponding parameter values are pre-specified. When it is necessary to perform an upgrade operation on a running stand-alone database, it is determined in accordance with the above provisions whether the configuration parameters of the above stand-alone database are the same as the corresponding parameter values of the configuration parameters of the multi-node database cluster. If not, it is further determined whether the effective mode of the configuration parameters of the above stand-alone database is a mode that can be effective by reloading. If so, based on the running stand-alone database, the configuration parameters of the multi-node database cluster are used with the corresponding parameter values, and the configuration parameters of the stand-alone database are reloaded. Based on the reloading result, it is upgraded to a single-node database cluster. Further, the current load status is monitored in real time, and in a low-load state, the single-node database cluster is upgraded to a multi-node database cluster, thereby achieving the effect of continuing to provide services to users during the upgrade process, improving service efficiency and quality, and improving user experience.
[0056] Figure 1 A schematic diagram of a scenario of a database upgrade method provided in this application, such as Figure 1As shown in the figure, the database upgrade system provided by the embodiment of the present application includes: a user terminal 1, a database device 2 corresponding to the target database, and a storage component 3. Among them, the user terminal 1 is the terminal where the database administrator with the need to upgrade the target database is located, and the target database is the database that is currently providing services. The database device 2 corresponding to the target database is the device that executes the database upgrade method. The storage component 3 is a component built into the database device 2 corresponding to the target database. Among them, the database device 2 corresponding to the target database is communicatively connected to the user terminal 1 and the storage component 3 respectively. First, based on the need to upgrade the target database, the database administrator triggers an upgrade operation on the target database through the user terminal 1. Then, the database device 2 corresponding to the target database responds to the upgrade operation for the target database, obtains the configuration parameters of the target database through the storage component 3, and determines whether the parameter value of the configuration parameter is the same as the parameter value of the corresponding preset configuration parameter. If not, it further determines whether the effective mode of the configuration parameter during the upgrade is the effective-after-overloading mode. If so, it overloads the configuration parameter based on the parameter value of the corresponding preset configuration parameter, and upgrades the target database to a single-node database cluster based on the overloading result. Further, the current load status is determined, and when the current load status is a low-load status, the single-node database cluster is upgraded to a multi-node database cluster.
[0057] The technical solution of the present application and how the technical solution of the present application solves the above technical problems will be described in detail below with specific embodiments. These specific embodiments below can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below with reference to the accompanying drawings.
[0058] Figure 2 Schematic flow of the database upgrade method provided by the present application Figure 1 , as Figure 2 shown, the execution subject of this method is a database upgrade device, which can be located in an electronic device, specifically in the database device of the target database. This method includes:
[0059] S201. In response to an upgrade operation for the target database, obtain the configuration parameters of the target database; the target database is the database that is currently providing services.
[0060] Among them, the target database is any database with an upgrade requirement, and the specific identity of the target database is not limited in this embodiment.
[0061] Among them, the upgrade operation is an operation to determine the execution of the upgrade. For example, it can be an operation where the database administrator clicks the confirm upgrade button on the management interface corresponding to the target database, or it can be other upgrade operations. The specific form of the upgrade operation is not limited in this embodiment.
[0062] In this embodiment, based on the target database providing services to users, the database administrator triggers an upgrade operation through the management interface corresponding to the target database, and then obtains the configuration parameters of the target database in response to the upgrade operation for the target database. Among them, the configuration parameters are a set of settings or options for controlling and adjusting the behavior of the database system, which can affect the performance, security, resource usage, functional characteristics and other aspects of the database. They are usually stored in a configuration set built into the database and loaded when the database is started. By adjusting the configuration parameters, the operation of the database can be optimized to meet specific application requirements and workloads.
[0063] It is understandable that the premise for the target database to provide services normally is that the database successfully loads the configuration parameters required for normal service provision, such as connection parameters, storage parameters, network setting parameters, etc. This embodiment does not limit the specific configuration parameters.
[0064] Based on this, when obtaining the configuration parameters of the target database, a configuration set storing the configuration parameters is obtained in the target database, and all the configuration parameters of the target database are obtained therein.
[0065] S202: Determine whether the parameter value of the configuration parameter is the same as the parameter value of the corresponding preset configuration parameter. If not, determine whether the effective mode of the configuration parameter during the upgrade is the effective mode after reloading.
[0066] The parameter value is a specific value reflected by the configuration parameter, such as a specific storage value reflected by the storage parameter. The preset configuration parameter is a configuration parameter pre-set according to the upgrade requirements.
[0067] It is understandable that each configuration parameter has a corresponding preset configuration parameter.
[0068] The effective mode is a mode in which the configuration parameters are effective in the actual work of the target database, which may include a restart-effective mode and a reload-effective mode. The restart-effective mode is a mode in which the configuration parameters can only be effective after the target database is restarted. The reload-effective mode is a mode in which the configuration parameters can be effective without restarting the database and only by reloading.
[0069] It is understandable that during the upgrade process of the database, the properties of the configuration parameters involved before and after the upgrade do not change, but the parameter value corresponding to a certain configuration parameter may change.
[0070] For example, if the target database is a stand-alone database, its storage parameter may be 1 GB. If the target database needs to be upgraded to a multi-node database cluster, its storage parameter should be 2 GB.
[0071] It should be understood that the above examples are only for illustration and should not impose any limitation on this application.
[0072] In this embodiment, a preset configuration parameter file can be established in advance by a database administrator, and preset configuration parameters corresponding to the configuration parameters of the target database are set therein, and parameter values corresponding to the preset configuration parameters are set according to the upgrade requirements. Then, after obtaining the configuration parameters of the target database, it is determined whether the parameter value of the configuration parameter is the same as the parameter value of the corresponding preset configuration parameter. If so, it means that the parameter value of the current configuration parameter meets the upgrade requirements, and in this case, the upgrade can be directly performed. If not, it means that the parameter value of the current configuration parameter does not meet the upgrade requirements, and the parameter value of the configuration parameter needs to be adjusted.
[0073] Further, when determining whether the effective mode of the configuration parameters of the target database is the effective-after-overloading mode during the upgrade, if so, it means that after the parameter value of the configuration parameter is adjusted, the new configuration parameter can take effect by executing the overload. If not, it means that the effective mode of these configuration parameters is the effective-after-restart mode. After the parameter value of the configuration parameter is adjusted, the new configuration parameter needs to restart the target database to take effect, but restarting the target database will disconnect the associated services.
[0074] Among them, when determining whether the parameter value of the configuration parameter is the same as the parameter value of the corresponding preset configuration parameter, specifically, it can be: determining whether the numerical value represented by the parameter value corresponding to the configuration parameter is the same as the numerical value represented by the parameter value of the corresponding preset configuration parameter.
[0075] Optionally, when determining whether the effective mode of the configuration parameters of the target database is the effective-after-overloading mode during the upgrade, two sets can also be set in advance, that is, an overload set for storing the configuration parameters that take effect after overload, and a restart set for storing the configuration parameters that take effect after restart. Subsequently, during the judgment, the configuration parameters determined to take effect after overload are stored in the above overload set, and the configuration parameters determined to take effect after restart are stored in the above restart set, so as to determine whether it is the effective-after-overloading mode based on the set where the configuration parameter is located.
[0076] S203. If so, overload the configuration parameter based on the parameter value of the corresponding preset configuration parameter, and upgrade the target database to a single-node database cluster based on the overload result.
[0077] In this embodiment, the parameter value of the configuration parameter is different from the parameter value of the corresponding preset configuration parameter, and the effective mode of the configuration parameter during the upgrade is the effective-after-overloading mode. The parameter value of the corresponding preset configuration parameter is used to replace the parameter value of the configuration parameter and then overload. Further, the target database is upgraded to a single-node database cluster based on the overloaded configuration parameter.
[0078] S204. Determine the current load status, and when the current load status is a low-load status, upgrade the single-node database cluster to a multi-node database cluster.
[0079] Among them, the current load status is the status of the current target database being used.
[0080] Among them, the low-load status is the status where the number of uses of the target database is small.
[0081] In this embodiment, a component for monitoring the load can be pre-set in the target database. Then, in response to the preliminary upgrade to obtain a single-node database cluster, based on the load conditions recorded by the above component, it is determined whether the current load status is a low-load status. If so, it means that there are fewer users using the target database at present. At this time, performing the final upgrade can maximize the guarantee of data consistency before and after the upgrade. Then, when the current load status is a low-load status, the single-node database cluster is upgraded to a multi-node database cluster.
[0082] Optionally, if not, it means that there are more users using the target database at present. At this time, performing the final upgrade may greatly affect the data consistency before and after the upgrade. Then, continue to provide services based on the current single-node data cluster until it is determined that the low-load status is reached, and then upgrade the single-node database cluster to a multi-node database cluster.
[0083] It should be noted that after upgrading the single-node database cluster to a multi-node database cluster based on the low-load status, a monitoring tool can also be used to observe the performance and health status of the multi-node database cluster to ensure that there is no data loss or inconsistency.
[0084] It can be understood that the above method for ensuring data is not lost is only an example, and this embodiment does not limit the specific data verification method.
[0085] In the database upgrade method provided in this embodiment, since the preset configuration parameters and their corresponding parameter values during the upgrade are pre-stored, in response to the upgrade operation for the target database, by obtaining the configuration parameters of the target database that is currently providing services, it is possible to determine whether the parameter value of the configuration parameter is the same as the parameter value of the corresponding preset configuration parameter. And when they are different, it is further possible to determine whether the effective mode of the configuration parameter during the upgrade is the effective-after-overloading mode. Thus, when it is determined to be the effective-after-overloading mode, based on the parameter value of the corresponding preset configuration parameter, the configuration parameter is overloaded, and based on the overloading result, the target database is upgraded to a single-node database cluster. And by determining the current load status, when it is determined that the current load status is a low-load status, the single-node database cluster can be upgraded to a multi-node database cluster. Thereby, the effect of continuously providing services to users during the upgrade process, improving service efficiency and quality, and enhancing the user experience is achieved.
[0086] As an optional embodiment, based on the above embodiment, this embodiment further refines the determination of whether the target database meets the preset upgrade conditions according to the configuration parameters. When this embodiment determines whether the target database meets the preset upgrade conditions according to the configuration parameters, it specifically includes the following steps:
[0087] Step a1: Query the effective timing field corresponding to the configuration parameter in the set of configuration parameters for display and management.
[0088] Among them, the set of configuration parameters for display and management is the set of configuration parameters stored in the target database corresponding to the configuration parameters.
[0089] Among them, the effective timing field is the field representing the effective timing of the configuration parameter, and each configuration parameter has a corresponding effective timing field. This effective timing field can specifically be the full name field of the effective timing, such as the field where "effective after overloading" or "effective after restart" is located, or it can be the identifier of the effective timing. This embodiment does not make any limitations in this regard.
[0090] In this embodiment, in response to the determination of whether the target database meets the preset upgrade conditions according to the configuration parameters, the corresponding set of configuration parameters for display and management is queried, and the effective timing field corresponding to each configuration parameter is read.
[0091] Step a2: According to the effective timing field, determine whether the effective mode of the configuration parameter is the effective-after-overloading mode.
[0092] In this embodiment, after reading the effective timing field corresponding to each configuration parameter, according to the corresponding effective timing field, when it is determined that the corresponding effective timing field is "effective after reload" or other fields indicating effective after reload, the effective mode of the configuration parameter is determined to be the effective after reload mode. When it is determined that the corresponding effective timing field is "effective after restart" or other fields indicating effective after restart, the effective mode of the configuration parameter is determined to be the effective after restart mode.
[0093] For the database upgrade method provided in this embodiment, since the set for displaying and managing configuration parameters built into the target database records the effective timing field corresponding to the configuration parameter, by querying the effective timing field corresponding to the configuration parameter in the set for displaying and managing configuration parameters, it is possible to determine whether the effective mode of the configuration parameter is the effective after reload mode according to the effective timing field, thereby accurately determining whether the parameter values of the two configuration parameters are the same and improving the accuracy of the determination.
[0094] As an optional embodiment, based on the above embodiment, this embodiment further refines the reloading of the configuration parameter based on the parameter value of the corresponding preset configuration parameter and upgrading the target database to a single-node database cluster based on the reloading result. Then, when this embodiment reloads the configuration parameter based on the parameter value of the corresponding preset configuration parameter and upgrades the target database to a single-node database cluster based on the reloading result, it specifically includes the following steps:
[0095] Step b1: Update the parameter value of the configuration parameter with the parameter value of the corresponding preset configuration parameter to obtain an updated configuration parameter.
[0096] Among them, the updated configuration parameter is the configuration parameter of the updated target database.
[0097] In this embodiment, based on the determination result that the parameter value of the configuration parameter is different from the parameter value of the corresponding preset configuration parameter and the effective mode of the configuration parameter of the target database is the effective after reload mode during upgrade, the parameter value of its configuration parameter is adjusted.
[0098] Specifically, obtain the parameter value of the corresponding preset configuration parameter, and use this parameter value to update the parameter value of the configuration parameter, so that the parameter value of the configuration parameter is the parameter value of its corresponding preset configuration parameter, thereby obtaining an updated configuration parameter.
[0099] Step b2: Call the reload interface, and re-read and configure the updated configuration parameter based on the call result.
[0100] Among them, the reload interface is the interface for calling the reload method. For example, it can be the built-in reload interface of the target database. This embodiment does not limit the specific reload interface.
[0101] Specifically, based on determining that the target database meets the upgrade conditions, an in-built reload interface is called, and the corresponding reload method is used to reread the updated configuration parameters and reconfigure the read updated configuration parameters with their corresponding parameter values.
[0102] Step b3: Sequentially perform operations of creating a pre-loaded cluster manager, registering the master node, and starting the high-availability component, so as to upgrade the target database to a single-node database cluster.
[0103] Among them, the cluster manager is a component responsible for coordinating and managing each node in the database cluster. For example, it can be a repmgr component. This example is only for illustration and should not constitute any limitation to this application. The master node is the node in the database cluster responsible for processing write operations and synchronizing data to other slave nodes. The high-availability component is a mechanism to ensure that the database cluster can still operate normally in case of node failures.
[0104] In this embodiment, in response to the completion of the reload operation, the pre-loaded cluster manager is obtained and a creation operation is performed on it to successfully create the cluster manager. Further, the running target database is registered as the master node. Further, a start operation is performed on the preset high-availability component, thereby upgrading the target database to a single-node database cluster with the target database as the master node.
[0105] For the database upgrade method provided in this embodiment, since the cluster manager is pre-loaded, the parameter values of the updated configuration parameters can be obtained by updating the parameter values of the configuration parameters with the parameter values of the corresponding preset configuration parameters, and by calling the reload interface, the updated configuration parameters can be reread and reconfigured based on the call result. Thus, by sequentially performing operations of creating the pre-loaded cluster manager, registering the master node, and starting the high-availability component, the target database can be upgraded to a single-node database cluster, thereby quickly and smoothly upgrading the target database to a single-node database cluster and improving the efficiency of the initial upgrade.
[0106] As an optional embodiment, based on the above embodiment, after determining whether the parameter value of the configuration parameter is the same as the parameter value of the corresponding preset configuration parameter, the following steps are further included:
[0107] If so, the target database is upgraded to a single-node database cluster, and when in a low-load state, the single-node database cluster is upgraded to a multi-node database cluster.
[0108] It can be understood that when the parameter value of the configuration parameter is the same as the parameter value of the corresponding preset configuration parameter, there is no need to adjust the configuration parameter of the target database. That is, the upgrade operation can be directly performed on the target database based on the current configuration parameter, and the target database is directly upgraded to a single-node database cluster. The specific execution process is similar to that of step b3 and will not be elaborated here. When in a low-load state, the single-node database cluster is upgraded to a multi-node database cluster. The specific execution process is similar to S204 and will not be elaborated here.
[0109] Correspondingly, after determining whether the effective mode of the configuration parameter during upgrade is the post-overload effective mode, the following steps are further included:
[0110] If not, the upgrade is exited.
[0111] In this embodiment, when the parameter value of the configuration parameter is different from the parameter value of the corresponding preset configuration parameter, and the effective mode of the configuration parameter of the target database during upgrade is the post-restart effective mode, that is, not the post-overload effective mode, if the upgrade continues, the target database needs to be restarted. Therefore, to avoid service interruption, the upgrade operation is exited.
[0112] The database upgrade method provided in this embodiment can directly upgrade the target database to a single-node database cluster by determining that the parameter value of the configuration parameter is the same as the parameter value of the corresponding preset configuration parameter, and can further upgrade the single-node database cluster to a multi-node database cluster in a low-load state, improving the upgrade efficiency. By further determining to exit the upgrade when there are configuration parameters that take effect after restart, it can ensure that the target database maintains the service state and avoid disconnection, further improving the service quality and enhancing the user experience.
[0113] As an alternative embodiment, based on any of the above embodiments, before obtaining the configuration parameter of the target database in response to the upgrade operation for the target database, the following steps are further included:
[0114] Step c1: In response to the initialization operation for the target database, a corresponding configuration file is generated based on the configuration template file corresponding to the target database; the configuration file includes the preloading configuration information of the cluster manager.
[0115] Among them, the initialization operation is an operation to initialize the target database.
[0116] Among them, the configuration template file is a file preliminarily written by database administrators.
[0117] Among them, the configuration file is the configuration file required for the target database to provide services normally, specifically including the preloading configuration information of the cluster manager. This preloading configuration information is the configuration information for preloading the cluster manager.
[0118] It is understandable that in order to successfully upgrade the target database to a single-node database cluster, a prerequisite for implementing this solution is that the cluster manager has been pre-loaded.
[0119] Based on this, the database administrator can add the pre-loading configuration information of the required pre-loaded cluster manager to the configuration template file corresponding to the target database, and perform an initialization operation on the target database based on the addition result. Then, in response to this initialization operation, the target database loads the corresponding configuration template file, enabling the added pre-loading configuration information of the cluster manager to take effect, thereby obtaining a configuration file containing the pre-loading configuration information of the cluster manager.
[0120] Step c2: Perform the pre-loading operation of the cluster manager according to the pre-loading configuration information of the cluster manager.
[0121] In this embodiment, based on the result of the effective pre-loading configuration information of the cluster manager, the pre-loading operation is performed on the cluster manager according to the pre-loading configuration information of the cluster manager to obtain the pre-loaded cluster manager.
[0122] In the database upgrade method provided in this embodiment, since the pre-loading configuration information of the cluster manager is pre-written into the configuration template file, in response to the initialization operation for the target database, through the configuration template file corresponding to the target database, a corresponding configuration file containing the pre-loading configuration information of the cluster manager can be generated, and the pre-loading operation of the cluster manager can be performed according to the pre-loading configuration information of the cluster manager, thereby quickly and successfully obtaining the pre-loaded cluster manager, improving the success rate and efficiency of subsequent upgrading to a single-node database cluster.
[0123] As an optional embodiment, based on any of the above embodiments, this embodiment further refines the determination of the current load status. When determining the current load status, this embodiment specifically includes the following steps:
[0124] When the current time is within the preset time range, determine that the current load status is a low load status; when the current time is outside the preset time range, determine that the current load status is a high load status.
[0125] Among them, the preset time range is a pre-set time range, such as 2:00 am - 5:00 am. This embodiment does not limit the specific preset time range.
[0126] Among them, the current time is the current time after upgrading the target database to a single-node database cluster.
[0127] Specifically, a time component can be used to monitor the current time in real time and determine whether the current time is within a preset time range. If so, it indicates that generally, fewer users are using the target database at this time, and the current load status is determined to be a low load status. If not, it indicates that generally, more users are still using the target database at this time, and the current load status is determined to be a high load status.
[0128] Or,
[0129] When the number of connections or resource utilization rate of the client is less than the corresponding preset value, the current load status is determined to be a low load status; when the number of connections or resource utilization rate of the client is greater than the corresponding preset value, the current load status is determined to be a high load status.
[0130] Among them, the number of connections of the client is the number of clients connected to the target data. The resource utilization rate is the proportion of resource usage of the target database, such as the disk or CPU usage proportion, which is not limited in this embodiment.
[0131] Among them, the preset value is the minimum value preset for the number of connections of the client, such as 10, or the minimum value preset for the resource utilization rate, such as 5%. The specific preset value is not limited in this embodiment.
[0132] Specifically, based on the built-in monitoring component, the number of client connections or resource utilization rate corresponding to the target database is monitored in real time, and the above-mentioned number of client connections or resource utilization rate is compared with the corresponding preset value in real time. When the number of client connections or resource utilization rate is less than the corresponding preset value, it indicates that fewer users are currently connected to the target database or the proportion of the current target database being used is relatively low, and the current load status is determined to be a low load status. When the number of client connections or resource utilization rate is greater than the corresponding preset value, it indicates that more users are currently connected to the target database or the proportion of the current target database being used is relatively high, and the current load status is determined to be a high load status.
[0133] In the database upgrade method provided in this embodiment, by presetting a preset time range in advance, or the preset value corresponding to the number of connections or resource utilization rate of the client, when the current time is within the preset time range, the current load status can be determined to be a low load status, and when the current time is outside the preset time range, the current load status can be determined to be a high load status. Or, when the number of connections or resource utilization rate of the client is less than the corresponding preset value, the current load status can be determined to be a low load status, and when the number of connections or resource utilization rate of the client is greater than the corresponding preset value, the current load status can be determined to be a high load status. Thus, the current load status can be determined quickly and accurately, improving the efficiency and accuracy of determining the current load status.
[0134] As an alternative embodiment, based on any of the above embodiments, this embodiment further refines the upgrade of a single-node database cluster to a multi-node database cluster. When upgrading a single-node database cluster to a multi-node database cluster, this embodiment specifically includes the following steps:
[0135] Step d1: Based on the single-node database cluster, copy the data in the target database serving as the master node to multiple preset databases, and perform a startup operation on the multiple preset databases after the copying.
[0136] Among them, the preset databases are other databases that are pre-set and different from the target database. In this embodiment, the preset databases are used as slave nodes in the database cluster.
[0137] Specifically, based on the single-node database cluster obtained through preliminary upgrade, obtain the data in the target database serving as the master node, and copy this data to multiple pre-set preset databases. Then, in response to the completion of the copying, perform a startup operation on the multiple preset databases storing the data.
[0138] Step d2: Establish a streaming replication relationship between the target database and the multiple preset databases to upgrade the single-node database cluster to a multi-node database cluster.
[0139] Among them, streaming replication is a database replication technology used to achieve real-time data synchronization between a master node and one or more slave nodes.
[0140] Specifically, based on the startup of the multiple preset databases, in order to ensure data synchronization between the target database serving as the master node and the multiple preset databases serving as slave nodes, establish a streaming replication relationship between the target database and the multiple preset databases. Then, in response to the completion of the establishment, determine that the single-node database cluster has been upgraded to a multi-node database cluster.
[0141] The database upgrade method provided in this embodiment can, by copying the data in the target database serving as the master node to multiple preset databases, perform a startup operation on the multiple preset databases after the copying, and can, by establishing a streaming replication relationship between the target database and the multiple preset databases, successfully upgrade the single-node database cluster to a multi-node database cluster, improving the success rate of upgrading to a multi-node database cluster.
[0142] Figure 3 It is a flowchart of the database upgrade method provided in this application Figure 2 , as Figure 3 shown. Based on the Figure 2 embodiment, this embodiment details the database upgrade method, and the method includes:
[0143] S301. In response to an initialization operation for a target database, generate a corresponding configuration file based on the configuration template file corresponding to the target database. The configuration file includes preloading configuration information of a cluster manager.
[0144] S302. Execute the preloading operation of the cluster manager according to the preloading configuration information of the cluster manager.
[0145] S303. In response to an upgrade operation for a target database, obtain the configuration parameters of the target database. The target database is the database that is providing services.
[0146] S304. Determine whether the parameter value of the configuration parameter is the same as the parameter value of the corresponding preset configuration parameter. If so, execute S309; if not, execute S305 - S306.
[0147] S305. Query the effective timing field corresponding to the configuration parameter in the set for displaying and managing configuration parameters.
[0148] S306. According to the effective timing field, determine whether the effective mode of the configuration parameter is the effective - after - reload mode. If so, execute S307 - S309; if not, execute S310.
[0149] S307. Update the parameter value of the configuration parameter with the parameter value of the corresponding preset configuration parameter to obtain an updated configuration parameter.
[0150] S308. Call the reload interface and re - read and configure the updated configuration parameter based on the call result.
[0151] S309. Sequentially execute the operations of creating a pre - loaded cluster manager, registering a master node, and starting a high - availability component, so that the target database is upgraded to a single - node database cluster, and continue to execute S311 - S313.
[0152] S310. Exit the upgrade.
[0153] S311. In response to the current load status being a low - load status, based on the single - node database cluster, copy the data in the target database serving as the master node to multiple preset databases.
[0154] Specifically, when the current time is within a preset time range, determine that the current load status is a low - load status. When the current time is outside the preset time range, determine that the current load status is a high - load status. Or, when the connection number or resource utilization rate of the client is less than the corresponding preset value, determine that the current load status is a low - load status. When the connection number or resource utilization rate of the client is greater than the corresponding preset value, determine that the current load status is a high - load status.
[0155] S312. Perform a startup operation on multiple preset databases after replication.
[0156] S313. Establish a streaming replication relationship between the target database and multiple preset databases to upgrade a single-node database cluster to a multi-node database cluster.
[0157] Figure 4 The structural schematic diagram of the database upgrade device provided by this application is as Figure 4 shown. The database upgrade device 40 provided in this embodiment includes: an acquisition module 41, a judgment module 42, a reload module 43, a determination module 44, and an upgrade module 45.
[0158] Among them, the acquisition module 41 is used to obtain the configuration parameters of the target database in response to an upgrade operation for the target database; the target database is a database that is providing services; the judgment module 42 is used to judge whether the parameter value of the configuration parameter is the same as the parameter value of the corresponding preset configuration parameter. If not, it judges whether the effective mode of the configuration parameter during upgrade is the effective-after-reload mode; the reload module 43 is used to, if so, reload the configuration parameter based on the parameter value of the corresponding preset configuration parameter, and the upgrade module 45 is used to upgrade the target database to a single-node database cluster based on the reload result; the determination module 44 is used to determine the current load status; the upgrade module 45 is further used to upgrade the single-node database cluster to a multi-node database cluster when the current load status is a low-load status.
[0159] Optionally, when the judgment module 42 judges whether the target database meets the preset upgrade conditions according to the configuration parameter, it is specifically used for:
[0160] Query the effective timing field corresponding to the configuration parameter in the set of displayed and managed configuration parameters; judge whether the effective mode of the configuration parameter is the effective-after-reload mode according to the effective timing field.
[0161] Optionally, when the reload module 43 reloads the configuration parameter based on the parameter value of the corresponding preset configuration parameter, it is specifically used for:
[0162] Update the parameter value of the configuration parameter with the parameter value of the corresponding preset configuration parameter to obtain an updated configuration parameter; call the reload interface and re-read and configure the updated configuration parameter based on the call result;
[0163] Correspondingly, when the upgrade module upgrades the target database to a single-node database cluster based on the reload result, it is specifically used for:
[0164] Sequentially perform operations of creating a pre-loaded cluster manager, registering a master node, and starting a high-availability component to upgrade the target database to a single-node database cluster.
[0165] Optionally, the database upgrade device further includes: an exit module;
[0166] Among them, the upgrade module 45 is further configured to, after the judgment module 42 judges whether the parameter value of the configuration parameter is the same as the parameter value of the corresponding preset configuration parameter, if so, upgrade the target database to a single-node database cluster, and upgrade the single-node database cluster to a multi-node database cluster when in a low-load state; the exit module is configured to exit the upgrade if the judgment module 42 judges that the effective mode of the configuration parameter during the upgrade is not the overload-after-effective mode.
[0167] Optionally, the database upgrade device further includes: a generation module and an execution module;
[0168] Among them, the generation module is configured to, before the acquisition module 41 acquires the configuration parameters of the target database in response to the upgrade operation for the target database, generate a corresponding configuration file based on the configuration template file corresponding to the target database in response to the initialization operation for the target database; the configuration file includes the preloading configuration information of the cluster manager; the execution module is configured to execute the preloading operation of the cluster manager according to the preloading configuration information of the cluster manager.
[0169] Optionally, when determining the current load state, the determination module 44 is specifically configured to:
[0170] When the current time is within the preset time range, determine that the current load state is a low-load state; when the current time is outside the preset time range, determine that the current load state is a high-load state; or, when the connection number or resource utilization rate of the client is less than the corresponding preset value, determine that the current load state is a low-load state; when the connection number or resource utilization rate of the client is greater than the corresponding preset value, determine that the current load state is a high-load state.
[0171] Optionally, when upgrading the single-node database cluster to a multi-node database cluster, the upgrade module 45 is specifically configured to:
[0172] Based on the single-node database cluster, copy the data in the target database as the primary node to multiple preset databases, and perform a startup operation on the multiple preset databases after the copy; establish a streaming replication relationship between the target database and the multiple preset databases to upgrade the single-node database cluster to a multi-node database cluster.
[0173] The database upgrade device provided in this embodiment can execute the method provided in the above method embodiment, and its implementation principle and technical effect are similar, which will not be elaborated here in this embodiment.
[0174] Figure 5The structural schematic diagram of the electronic device provided by this application is as follows Figure 5 As shown, the electronic device 50 provided in this embodiment includes: at least one processor 51 and a memory 52. Optionally, the device 50 further includes a communication component 53. Among them, the processor 51, the memory 52, and the communication component 53 are connected through a bus 54.
[0175] In the specific implementation process, at least one processor 51 executes the computer-executable instructions stored in the memory 52, so that at least one processor 51 executes the above-mentioned method.
[0176] For the specific implementation process of the processor 51, reference can be made to the above method embodiment, and its implementation principle and technical effects are similar, so they will not be elaborated here in this embodiment.
[0177] In the above embodiment, it should be understood that the processor may be a central processing unit (English: Central Processing Unit, abbreviated: CPU), or it may also be other general-purpose processors, digital signal processors (English: Digital Signal Processor, abbreviated: DSP), application-specific integrated circuits (English: Application Specific Integrated Circuit, abbreviated: ASIC), etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in combination with the invention can be directly embodied as being executed by a hardware processor, or can be executed by a combination of hardware and software modules in the processor.
[0178] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (Non-volatile Memory, NVM), such as at least one disk memory.
[0179] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, the bus in the drawings of this application is not limited to only one bus or one type of bus.
[0180] This application also provides a computer program product, including a computer program, which implements the above-mentioned method when executed by a processor.
[0181] The present application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above method.
[0182] The above-readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, a magnetic disk, or an optical disk. The readable storage medium can be any available medium accessible by a general-purpose or special-purpose computer.
[0183] An exemplary readable storage medium is coupled to the processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the readable storage medium can also exist as discrete components in a device.
[0184] The division of units is only a logical function division. In actual implementation, there may be other division methods. For example, 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 couplings or direct couplings or communication connections shown or discussed with each other can be indirect couplings or communication connections through some interfaces, devices or units, and can be in electrical, mechanical or other forms.
[0185] 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 can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0186] In addition, in each embodiment of the present invention, the functional units can be integrated in one processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit.
[0187] If a function 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 invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in various embodiments of the present invention. The aforementioned storage medium includes: USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs, and other various media that can store program codes.
[0188] Those of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When this program is executed, it executes the steps including the above method embodiments; and the aforementioned storage medium includes: ROMs, RAMs, magnetic disks, or optical discs, and other various media that can store program codes.
[0189] Finally, it should be noted that: After considering the specification and practicing the invention disclosed herein, those skilled in the art will easily think of other implementation manners of the present invention. The present invention aims to cover any variations, uses, or adaptive changes of the present invention. These variations, uses, or adaptive changes follow the general principles of the present invention and include common general knowledge or conventional technical means in the technical field not disclosed in the present invention. It is not limited to the exact structures already described and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present invention is only limited by the appended claims.
Claims
1. A database upgrade method, characterized in that: The method comprises: In response to an upgrade operation on a target database, obtaining configuration parameters of the target database; the target database is a database that is providing services; Determine whether the parameter value of the configuration parameter is the same as the parameter value of the corresponding preset configuration parameter, and if not, determine whether the effective mode of the configuration parameter during the upgrade is the effective mode after reloading; If yes, reloading the configuration parameter based on the parameter value of the corresponding preset configuration parameter, and upgrading the target database to a single-node database cluster based on the reloading result; A current load state is determined, and when the current load state is a low load state, the single-node database cluster is upgraded to a multi-node database cluster.
2. The method according to claim 1, characterized in that The determining whether the configuration parameter's effective mode during the upgrade is a post-reload effective mode includes: Querying the effective time field corresponding to the configuration parameter in the set of display and management configuration parameters; According to the effective time field, it is determined whether the effective mode of the configuration parameter is the effective mode after reloading.
3. The method according to claim 2, characterized in that The reloading of the configuration parameter based on the parameter value of the corresponding preset configuration parameter, and upgrading the target database to a single-node database cluster based on the reloading result, includes: Updating the parameter value of the configuration parameter by using the parameter value of the corresponding preset configuration parameter to obtain an updated configuration parameter; Calling the reload interface, and re-reading and configuring the update configuration parameters based on the calling result; The operations of creating a preloaded cluster manager, registering a master node, and starting a high-availability component are performed in sequence, so that the target database is upgraded to a single-node database cluster.
4. The method according to claim 3, characterized in that After determining whether the parameter value of the configuration parameter is the same as the parameter value of the corresponding preset configuration parameter, the method further includes: If yes, the target database is upgraded to a single-node database cluster, and when in a low-load state, the single-node database cluster is upgraded to a multi-node database cluster; After determining whether the configuration parameter takes effect in a reloaded mode during the upgrade, the method further includes: If not, exit the upgrade.
5. The method according to any one of claims 1 to 4, characterized in that: Before obtaining the configuration parameters of the target database in response to the upgrade operation on the target database, the method further includes: In response to the initialization operation for the target database, a corresponding configuration file is generated based on a configuration template file corresponding to the target database; the configuration file includes preloaded configuration information of the cluster manager; According to the preloading configuration information of the cluster manager, a preloading operation of the cluster manager is performed.
6. The method according to any one of claims 1 to 4, characterized in that: The determining of the current load state includes: When the current time is within the preset time range, the current load state is determined to be a low load state; when the current time is outside the preset time range, the current load state is determined to be a high load state; or, When the number of client connections or resource utilization is less than the corresponding preset value, the current load state is determined to be a low load state; when the number of client connections or resource utilization is greater than the corresponding preset value, the current load state is determined to be a high load state.
7. The method according to any one of claims 1 to 4, characterized in that: The step of upgrading the single-node database cluster to a multi-node database cluster includes: Based on the single-node database cluster, copy the data in the target database as the master node to multiple preset databases, and perform startup operations on the multiple preset databases after the copying; A stream replication relationship is established between the target database and the multiple preset databases to upgrade the single-node database cluster to a multi-node database cluster.
8. An electronic device, characterized in that: include: Memory, processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the method according to any one of claims 1 to 7.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 7 when executed by a processor.
10. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 7 when being executed by a processor.
Citation Information
Cited By
Database configuration optimization method based on parameter effective mechanism
CN121350003A
A database configuration optimization method based on a parameter taking effect mechanism
CN121350003B