Component expansion method and device for distributed database and electronic equipment
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- JINZHUAN INFORMATION TECHNOLOGY CO LTD
- Filing Date
- 2023-10-24
- Publication Date
- 2026-08-07
AI Technical Summary
[0003]本申请提供了一种分布式数据库的组件扩容方法、装置以及电子设备,以解决无法在已经部署完成的分布式数据库上扩容不同系统的组件的技术问题
[0014]In this embodiment, a method is employed whereby the installation media corresponding to the system of the server to be expanded is uploaded to the operation and maintenance management account of all management nodes of the distributed database; the operation and maintenance management account then installs the installation media corresponding to the system of the server to be expanded on the distributed database; and a target component is installed on the server to be expanded to enable the target component to access the distributed database. Because this method uploads the installation media corresponding to the system of the server to be expanded (which is not deployed on the distributed database) to the operation and maintenance management account of all management nodes of the distributed database, thus installing the installation media on the distributed database, the server to be expanded is deployed on the distributed database. If component expansion is required on the server to be expanded, the target component to be expanded is installed on the server to enable the target component to access the distributed database. This achieves the goal of expanding components of different systems on an already deployed distributed database, thereby solving the technical problem of not being able to expand components of different systems on an already deployed distributed database.
Smart Images

Figure CN117435673B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of databases, and more particularly to a method, apparatus, and electronic device for expanding the components of a distributed database. Background Technology
[0002] The digital age has arrived, and data is becoming increasingly important. Databases, as crucial data storage devices, play an indispensable role in the digital world, especially in the financial industry. Distributed databases use network technology to combine partial databases from various nodes into a logically complete database and provide services. Traditional distributed database construction requires all nodes to have the same operating system. However, in reality, issues such as insufficient machines may lead to the use of two or more types of machines to build a distributed database, making it impossible to scale up components from different systems on an already deployed distributed database. Summary of the Invention
[0003] This application provides a method, apparatus, and electronic device for scaling up components of a distributed database, in order to solve the technical problem of being unable to scale up components of different systems on an already deployed distributed database.
[0004] In a first aspect, this application provides a method for expanding the capacity of a distributed database component, comprising: uploading the installation medium corresponding to the system of the server to be expanded to the operation and maintenance management account of all management nodes of the distributed database; having the operation and maintenance management account install the installation medium corresponding to the system of the server to be expanded on the distributed database; and installing a target component on the server to be expanded so that the target component can be connected to the distributed database.
[0005] Secondly, this application provides a component expansion device for a distributed database, comprising: an upload module for uploading the installation medium corresponding to the system of the server to be expanded to the operation and maintenance management account of all management nodes of the distributed database; a first installation module for the operation and maintenance management account to install the installation medium corresponding to the system of the server to be expanded on the distributed database; and a second installation module for installing a target component on the server to be expanded so that the target component can be connected to the distributed database.
[0006] As an optional example, the second installation module includes: an upload submodule, used to upload the installation medium corresponding to the big data component to the main management node of the distributed database when the target component is a big data component; and a first installation submodule, used to install the big data component on the server to be expanded so that the big data component can be connected to the distributed database.
[0007] As an optional example, the second installation module includes: a second installation submodule, used to install the installation medium corresponding to the management node component on the server to be expanded when the target component is a management node component; and a processing submodule, used to perform an expansion operation on the management node component so that the management node component automatically connects to the distributed database after the expansion is completed.
[0008] As an optional example, the above processing submodule includes: a first adding unit, used to add the configuration information of the management node component to the global configuration of the distributed database; a first processing unit, used to stop the process of the management node component; a second processing unit, used to synchronize the data of the metadata database corresponding to the management node component; a modification unit, used to modify the high watermark and low watermark of the distributed database; a second adding unit, used to add the configuration information of the management node component to the configuration of the management component of the distributed database; and a restart unit, used to restart all metadata databases and management components of the distributed database.
[0009] As an optional example, the second processing unit includes: a first processing subunit, used to write the node information of the management node component to each meta-database in the distributed database; and a second processing subunit, used to write data from any meta-database in the distributed database to the meta-database corresponding to the management node component.
[0010] As an optional example, the second installation module mentioned above also includes a sending submodule, used to send the expansion result file to all management nodes of the distributed database after performing the expansion operation on the management node component mentioned above.
[0011] As an optional example, the second installation module includes: a deployment submodule for deploying a host agent device on the server to be expanded when the target component is a non-management node component; a determination submodule for determining the non-management node component to be installed; and a third installation submodule for installing the installation media corresponding to the non-management node component to be installed on the server to be expanded.
[0012] Thirdly, this application provides a storage medium storing a computer program, wherein the computer program is executed by a processor to perform the above-described distributed database component expansion method.
[0013] Fourthly, this application also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the aforementioned distributed database component expansion method through the computer program.
[0014] In this embodiment, a method is employed whereby the installation media corresponding to the system of the server to be expanded is uploaded to the operation and maintenance management account of all management nodes of the distributed database; the operation and maintenance management account then installs the installation media corresponding to the system of the server to be expanded on the distributed database; and a target component is installed on the server to be expanded to enable the target component to access the distributed database. Because this method uploads the installation media corresponding to the system of the server to be expanded (which is not deployed on the distributed database) to the operation and maintenance management account of all management nodes of the distributed database, thus installing the installation media on the distributed database, the server to be expanded is deployed on the distributed database. If component expansion is required on the server to be expanded, the target component to be expanded is installed on the server to enable the target component to access the distributed database. This achieves the goal of expanding components of different systems on an already deployed distributed database, thereby solving the technical problem of not being able to expand components of different systems on an already deployed distributed database. Attached Figure Description
[0015] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0016] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] One or more embodiments are illustrated by way of example with reference numerals in the accompanying drawings. These illustrations do not constitute a limitation on the embodiments. Elements with the same reference numerals in the drawings are denoted as similar elements. Unless otherwise stated, the figures in the drawings are not to be limited by scale.
[0018] Figure 1 This is a flowchart of an optional distributed database component scaling method according to an embodiment of this application;
[0019] Figure 2 This is a schematic diagram of the structure of an optional distributed database component expansion device according to an embodiment of this application;
[0020] Figure 3 This is a schematic diagram of an optional electronic device according to an embodiment of this application. Detailed Implementation
[0021] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0022] The following disclosure provides numerous different embodiments or examples for implementing various structures of this application. To simplify the disclosure, specific examples of components and arrangements are described below. These are merely examples and are not intended to limit the scope of this application. Furthermore, reference numerals and / or letters may be repeated in different examples. Such repetition is for simplification and clarity and does not in itself indicate a relationship between the various embodiments and / or arrangements discussed.
[0023] According to a first aspect of the embodiments of this application, a method for scaling up components of a distributed database is provided, optionally, as follows: Figure 1 As shown, the above method includes:
[0024] S102, upload the installation media corresponding to the system of the server to be expanded to the operation and maintenance management account of all management nodes of the distributed database;
[0025] S104, the operation and maintenance management account installs the installation media corresponding to the system of the server to be expanded on the distributed database;
[0026] S106, Install the target component on the server to be expanded so that the target component can be connected to the distributed database.
[0027] Optionally, in this embodiment, the operations and maintenance management account is the Insight user in the distributed database. Insight refers to a tool or component used for monitoring and managing database performance. The Insight component is a unified operations and maintenance management platform that performs daily operations and maintenance management of the distributed database, and its corresponding application user is the Insight user. This tool or component aims to provide insights into real-time information on database operating status, performance metrics, fault detection and diagnosis, etc., to help administrators and operations and maintenance personnel effectively manage and maintain the distributed database.
[0028] Optionally, in this embodiment, to expand components on different systems, the installation media of the system corresponding to the server to be expanded needs to be uploaded to the `insight` user on all management nodes of the current distributed database. This ensures that there are corresponding installation resources on different systems. The installation media corresponding to the system of the server to be expanded is then installed on the distributed database, allowing the server to be expanded to be deployed within the distributed database. If component expansion is performed on the server to be expanded, the target component to be expanded is installed on the server to be expanded, enabling the target component to be connected to the distributed database. This achieves the goal of expanding components of different systems on an already deployed distributed database, thereby solving the technical problem of not being able to expand components of different systems on an already deployed distributed database.
[0029] As an optional example, installing the target component on the server to be scaled up, so that the target component can access the distributed database, includes:
[0030] When the target component is a big data component, the installation media corresponding to the big data component is uploaded to the main management node of the distributed database;
[0031] Install the big data component on the server to be expanded so that the big data component can be connected to the distributed database.
[0032] Optionally, in this embodiment, if the component to be expanded on the server to be expanded is a big data component, the installation medium corresponding to the big data component is uploaded to the main management node of the distributed database, and then the operation and maintenance management interface of the main management node is used to install the big data component on the server to be expanded, so that the big data component can be connected to the distributed database.
[0033] As an optional example, installing the target component on the server to be scaled up, so that the target component can access the distributed database, includes:
[0034] If the target component is a management node component, install the installation media corresponding to the management node component on the server to be expanded;
[0035] Perform a scaling operation on the management node component so that the management node component automatically connects to the distributed database after the scaling is completed.
[0036] Optionally, in this embodiment, if the component to be expanded on the server to be expanded is a management node component, then the installation media corresponding to the management node component needs to be installed on the machine to be expanded using the installation media of the corresponding system. This is to create a new management node on the server to be expanded. Then, the expansion operation is performed on the management node component on the operation and maintenance management interface of the main management node, so that the management node component automatically connects to the distributed database after the expansion is completed.
[0037] As an optional example, performing a scaling operation on the management node component so that it automatically connects to the distributed database after scaling is complete includes:
[0038] Add configuration information for the management node component to the global configuration of the distributed database;
[0039] Stop the process of the management node component;
[0040] Synchronize the data in the metadata database corresponding to the management node component;
[0041] Modify the high watermark and low watermark of the distributed database;
[0042] Add the configuration information of the management node component to the configuration of the distributed database management component;
[0043] Restart all metadata and management components of the distributed database.
[0044] Optionally, in this embodiment, configuration information for the newly added management node component is added to the global configuration of the distributed database. This ensures that the correct information can be obtained when other components are subsequently expanded, guaranteeing that the system is aware of the existence of the new management node. Some processes of the newly added management node component are stopped to ensure that only one management node component is running, preventing conflicts such as dual-master management nodes and maintaining system stability. The node information of the newly added management node component is written into each RDB (RDB is a metadata database that records information about the entire distributed database; one management node corresponds to one RDB) of the distributed database. Then, the distributed database RDB data is synchronized to the RDB corresponding to the newly added management node component. This ensures that the information of the newly added management node is correctly recorded and synchronized in the system.
[0045] Because of the addition of RDB, the high and low watermarks of the distributed database's RDB need to be modified. The high watermark refers to the ideal number of RDB responses, representing an ideal high-availability environment. The failure of one RDB instance will not affect the normal functioning of the entire system, and the system will not trigger any mechanism when the response count exceeds the high watermark. The low watermark refers to the minimum number of RDB responses required for normal system operation. When the response count falls below the low watermark, the system will trigger corresponding mechanisms. Modify the RDB configuration to make the data in the RDB read-only and not write-only, generating an alarm in the system. The response count is incremented by one for each normally functioning RDB instance in the entire system.
[0046] Modify the ommagent configuration. Ommagent is a component related to high availability. When the primary management node fails, ommagent will elect a new primary management node from the backup management nodes and start the relevant services. Since a new management node has been added, the ommagent configuration file needs to be modified accordingly to ensure its normal operation. Add the configuration information of the management node component to the configuration of the distributed database management component. The ommagent management component is also related to high availability. When the primary management node fails, ommagent will elect a new primary management node from the backup management nodes and start the relevant services. Since a new management node component has been added, the ommagent configuration file needs to be modified accordingly to ensure its normal operation.
[0047] Restart all metadata and management components of the distributed database to make the modified configuration take effect. This ensures that the configuration changes are also correctly applied on the backup nodes. Restart ommagent on the primary management node. This ensures that ommagent on the primary management node is running normally and avoids switching primary management nodes. Finally, check the status of all management nodes to ensure that the scaling operation has been successfully completed.
[0048] As an optional example, synchronizing data in the metadata database corresponding to the management node component includes:
[0049] Write the node information of the management node component to each meta database in the distributed database;
[0050] Write data from any metadata database in the distributed database to the metadata database corresponding to the management node component.
[0051] Optionally, in this embodiment, the node information of the newly added management node component is written into each RDB (RDB is a metadata database that records information about the entire distributed database; one management node corresponds to one RDB) of the distributed database, and then the distributed database RDB data is synchronized to the RDB corresponding to the newly added management node component. This ensures that the information of the newly added management node is correctly recorded and synchronized in the system.
[0052] As an optional example, after performing a scaling operation on the management node component, the above method also includes:
[0053] The expansion result file is sent to all management nodes of the distributed database.
[0054] Optionally, in this embodiment, when scaling up the management node component, the system may generate files recording the results of the scaling process. These files may contain detailed information about the scaling operation, logs, status reports, etc. These files are crucial for tracking the progress of the scaling operation and diagnosing potential problems. Sending the scaling result files to all management nodes in the distributed database ensures that the scaling result files are synchronously sent to all management nodes. Ensuring that each management node has the same operation records and information allows for consistency checks and continuation of the operation when needed. In a distributed database, the primary management node may sometimes switch due to failure or other reasons. If a primary management node switch occurs during scaling up on different operating systems, the newly elected management node needs to be able to continue the scaling operation without interruption or introducing inconsistencies. In this case, the scaling result files become very useful. When the new management node takes over the main work, it can use the previously synchronously sent scaling result files to understand the status of the previous operation. This allows the new management node to continue the scaling operation from the previous state without having to restart or interrupt the scaling. This continuity ensures the continuity and consistency of the scaling operation, regardless of whether the primary management node switches. This ensures that the expansion result files are correctly synchronized and sent to all management nodes to maintain consistency among management nodes, and provides a mechanism to deal with possible master management node switching during the expansion process, which helps to ensure the reliability and continuity of the expansion operation.
[0055] As an optional example, installing the target component on the server to be scaled up, so that the target component can access the distributed database, includes:
[0056] When the target component is a non-management node component, deploy a host agent device on the server to be expanded;
[0057] Identify the non-management node components to be installed;
[0058] Install the installation media corresponding to the non-management node components to be installed on the server to be expanded.
[0059] Optionally, in this embodiment, the host agent device is a tool for managing and executing distributed system operations. It is typically installed on the server to be expanded and can perform various operations, including installing, configuring, and monitoring components. First, the host agent needs to be installed on the server to be expanded. The host agent's installer is uploaded to the server, and the installation command is run. After installation, the host agent will be able to communicate with the management page and receive installation instructions for the expansion components. On the management page, the administrator can select the non-managed node components to be expanded, including database instances, application servers, cache servers, etc. The administrator can make necessary configuration modifications to the selected components, including setting component parameters, adjusting resource allocation, and configuration files. These configuration changes will affect the installation and operation of the new components. Once the administrator has completed the component selection and configuration on the management page, the host agent can be triggered to execute the installation command. These commands will be distributed by the host agent to the non-managed node servers to be expanded. The installation commands are usually generated by a script and will select the appropriate installation media based on the current operating system type and version. This ensures that the same expansion operation is performed on different operating systems. After receiving the installation command, the appropriate installation media is selected according to the instructions. The installation script will begin the installation process based on the selected installation media. The installation process is typically monitored to ensure it proceeds smoothly. The hosting agent may periodically report the installation progress and status to the management page. If problems arise during installation, the hosting agent can provide feedback, such as error messages or warnings. Administrators can then take appropriate action to resolve the issues based on this information. This allows for effective scaling of the system's capabilities while ensuring consistency and manageability across different systems.
[0060] To illustrate this with an example, this application relates to a method for deploying a distributed database across different systems, including two scenarios:
[0061] Scenario 1: Installing a distributed database from scratch on various servers. First, plan the deployment scheme and fill in the configuration file strictly according to the format. Then, upload the installation media for different systems to the host. Use a script to combine the installation media for different systems, and then check the environment. After the check passes, proceed with the installation and deployment. The first deployment is the host agent, which will be deployed on each node. Subsequent installation operations are performed through the host agent. During actual installation, the corresponding installation media will be sent according to different systems and architectures. The host sends the installation media to different nodes based on a configuration file that records the corresponding media for each system. This configuration file can be modified, and the installation media is handled accordingly. Some systems with the same architecture can use the same installation media; for example, x86-RH and x86-Kylin use the same installation media, which simplifies the installation process for different operating systems.
[0062] Scenario 2: Expanding the scale of components from different systems, including the management node component, on an already deployed distributed database. The entire expansion process has minimal impact on the environment, and all system services can continue to run online.
[0063] (1) In order to support the expansion of components on different systems, it is necessary to upload the installation media of the corresponding system of the server to be expanded to the insight user on all management nodes of the distributed database (the distributed database contains different components, and each component will create a corresponding user when it is installed. Among them, the insight component is a unified operation and maintenance management platform for the interface, which performs daily operation and maintenance management of the distributed database. Its corresponding application user is the insight user).
[0064] (2) If the component to be expanded includes a big data component, the big data component needs to be expanded first. Upload the installation media for expanding the big data component to the main management node of the distributed database. Operate on the operation and maintenance management interface. First, deploy the host agent device on the server to be expanded, and then expand the big data component. After the expansion is completed, it will be automatically added to the distributed database.
[0065] (3) If the expansion component includes the management node component, the management node component needs to be installed on the machine to be expanded using the installation media of the corresponding system. Then, the expansion operation of the management node component is performed on the management page of the distributed database to connect the newly added management node component to the distributed database.
[0066] Scaling up the management node component:
[0067] Step 1: Add the configuration information for the newly added management node component to the global configuration of the distributed database;
[0068] Step 2: Stop some processes of the newly added management node component. Only one management node component can be running at any time to prevent situations such as dual-master operation.
[0069] Step 3: Write the node information of the newly added management node component into each RDB of the distributed database, and then synchronize the RDB data of the distributed database to the RDB corresponding to the newly added management node component.
[0070] Step 4: Modify the high watermark and low watermark of the distributed database to avoid affecting the normal use of the distributed database system due to incorrect configuration;
[0071] Step 5: Modify the ommagent configuration to ensure it functions correctly.
[0072] Step 6: Restart all RDB and Ommagent servers in the distributed database to make the modified configuration take effect;
[0073] Step 7: Restart the host ommagent, and finally restart the ommagent on the primary management node to avoid switching primary management nodes.
[0074] Step 8: Check the status of all management nodes to ensure that the expansion operation has been successfully completed.
[0075] The expansion result file will be sent synchronously to each management node. If the master management node is switched during the expansion process of different operating systems, the newly selected management node can continue to execute the next expansion steps according to the file sent.
[0076] (4) To expand non-management node components, the host agent must first be installed and deployed on the management page. Then, the components to be installed can be selected and necessary configurations modified on the management page. The script selects the corresponding installation media according to the current operating system and starts the installation.
[0077] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0078] According to another aspect of the embodiments of this application, a component expansion device for a distributed database is also provided, such as... Figure 2 As shown, it includes:
[0079] Upload module 202 is used to upload the installation media corresponding to the system of the server to be expanded to the operation and maintenance management account of all management nodes of the distributed database;
[0080] The first installation module 204 is used by the operation and maintenance management account to install the installation media corresponding to the system of the server to be expanded on the distributed database.
[0081] The second installation module 206 is used to install the target component on the server to be expanded, so that the target component can be connected to the distributed database.
[0082] Optionally, in this embodiment, the operations and maintenance management account is the Insight user in the distributed database. Insight refers to a tool or component used for monitoring and managing database performance. The Insight component is a unified operations and maintenance management platform that performs daily operations and maintenance management of the distributed database, and its corresponding application user is the Insight user. This tool or component aims to provide insights into real-time information on database operating status, performance metrics, fault detection and diagnosis, etc., to help administrators and operations and maintenance personnel effectively manage and maintain the distributed database.
[0083] Optionally, in this embodiment, to expand components on different systems, the installation media of the system corresponding to the server to be expanded needs to be uploaded to the `insight` user on all management nodes of the current distributed database. This ensures that there are corresponding installation resources on different systems. The installation media corresponding to the system of the server to be expanded is then installed on the distributed database, allowing the server to be expanded to be deployed within the distributed database. If component expansion is performed on the server to be expanded, the target component to be expanded is installed on the server to be expanded, enabling the target component to be connected to the distributed database. This achieves the goal of expanding components of different systems on an already deployed distributed database, thereby solving the technical problem of not being able to expand components of different systems on an already deployed distributed database.
[0084] As an optional example, the second installation module includes:
[0085] The upload submodule is used to upload the installation media corresponding to the big data component to the main management node of the distributed database when the target component is a big data component.
[0086] The first installation submodule is used to install the big data components on the server to be expanded, so that the big data components can be connected to the distributed database.
[0087] Optionally, in this embodiment, if the component to be expanded on the server to be expanded is a big data component, the installation medium corresponding to the big data component is uploaded to the main management node of the distributed database, and then the operation and maintenance management interface of the main management node is used to install the big data component on the server to be expanded, so that the big data component can be connected to the distributed database.
[0088] As an optional example, the second installation module includes:
[0089] The second installation submodule is used to install the installation media corresponding to the management node component on the server to be expanded when the target component is the management node component.
[0090] The processing submodule is used to perform scaling operations on the management node component so that the management node component can automatically connect to the distributed database after scaling is completed.
[0091] Optionally, in this embodiment, if the component to be expanded on the server to be expanded is a management node component, then the installation media corresponding to the management node component needs to be installed on the machine to be expanded using the installation media of the corresponding system. This is to create a new management node on the server to be expanded. Then, the expansion operation is performed on the management node component on the operation and maintenance management interface of the main management node, so that the management node component automatically connects to the distributed database after the expansion is completed.
[0092] As an optional example, the processing submodule includes:
[0093] The first addition unit is used to add configuration information for the management node component in the global configuration of the distributed database;
[0094] The first processing unit is used to stop the process of the management node component;
[0095] The second processing unit is used to synchronize the data in the metadata database corresponding to the management node component;
[0096] The modification unit is used to modify the high watermark and low watermark of the distributed database.
[0097] The second adding unit is used to add the configuration information of the management node component to the configuration of the distributed database management component;
[0098] The restart unit is used to restart all metadata databases and management components of the distributed database.
[0099] Optionally, in this embodiment, configuration information for the newly added management node component is added to the global configuration of the distributed database. This ensures that the correct information can be obtained when other components are subsequently expanded, guaranteeing that the system is aware of the existence of the new management node. Some processes of the newly added management node component are stopped to ensure that only one management node component is running, preventing conflicts such as dual-master management nodes and maintaining system stability. The node information of the newly added management node component is written into each RDB (RDB is a metadata database that records information about the entire distributed database; one management node corresponds to one RDB) of the distributed database. Then, the distributed database RDB data is synchronized to the RDB corresponding to the newly added management node component. This ensures that the information of the newly added management node is correctly recorded and synchronized in the system.
[0100] Because of the addition of RDB, the high and low watermarks of the distributed database's RDB need to be modified. The high watermark refers to the ideal number of RDB responses, representing an ideal high-availability environment. The failure of one RDB instance will not affect the normal functioning of the entire system, and the system will not trigger any mechanism when the response count exceeds the high watermark. The low watermark refers to the minimum number of RDB responses required for normal system operation. When the response count falls below the low watermark, the system will trigger corresponding mechanisms. Modify the RDB configuration to make the data in the RDB read-only and not write-only, generating an alarm in the system. The response count is incremented by one for each normally functioning RDB instance in the entire system.
[0101] Modify the ommagent configuration. Ommagent is a component related to high availability. When the primary management node fails, ommagent will elect a new primary management node from the backup management nodes and start the relevant services. Since a new management node has been added, the ommagent configuration file needs to be modified accordingly to ensure its normal operation. Add the configuration information of the management node component to the configuration of the distributed database management component. The ommagent management component is also related to high availability. When the primary management node fails, ommagent will elect a new primary management node from the backup management nodes and start the relevant services. Since a new management node component has been added, the ommagent configuration file needs to be modified accordingly to ensure its normal operation.
[0102] Restart all metadata and management components of the distributed database to make the modified configuration take effect. This ensures that the configuration changes are also correctly applied on the backup nodes. Restart ommagent on the primary management node. This ensures that ommagent on the primary management node is running normally and avoids switching primary management nodes. Finally, check the status of all management nodes to ensure that the scaling operation has been successfully completed.
[0103] As an optional example, the second processing unit includes:
[0104] The first processing subunit is used to write the node information of the management node component to each meta database in the distributed database;
[0105] The second processing subunit is used to write data from any metadata database in the distributed database to the metadata database corresponding to the management node component.
[0106] Optionally, in this embodiment, the node information of the newly added management node component is written into each RDB (RDB is a metadata database that records information about the entire distributed database; one management node corresponds to one RDB) of the distributed database, and then the distributed database RDB data is synchronized to the RDB corresponding to the newly added management node component. This ensures that the information of the newly added management node is correctly recorded and synchronized in the system.
[0107] As an optional example, the second installation module also includes:
[0108] The sending submodule is used to send the expansion result file to all management nodes of the distributed database after performing an expansion operation on the management node component.
[0109] Optionally, in this embodiment, when scaling up the management node component, the system may generate files recording the results of the scaling process. These files may contain detailed information about the scaling operation, logs, status reports, etc. These files are crucial for tracking the progress of the scaling operation and diagnosing potential problems. Sending the scaling result files to all management nodes in the distributed database ensures that the scaling result files are synchronously sent to all management nodes. Ensuring that each management node has the same operation records and information allows for consistency checks and continuation of the operation when needed. In a distributed database, the primary management node may sometimes switch due to failure or other reasons. If a primary management node switch occurs during scaling up on different operating systems, the newly elected management node needs to be able to continue the scaling operation without interruption or introducing inconsistencies. In this case, the scaling result files become very useful. When the new management node takes over the main work, it can use the previously synchronously sent scaling result files to understand the status of the previous operation. This allows the new management node to continue the scaling operation from the previous state without having to restart or interrupt the scaling. This continuity ensures the continuity and consistency of the scaling operation, regardless of whether the primary management node switches. This ensures that the expansion result files are correctly synchronized and sent to all management nodes to maintain consistency among management nodes, and provides a mechanism to deal with possible master management node switching during the expansion process, which helps to ensure the reliability and continuity of the expansion operation.
[0110] As an optional example, the second installation module includes:
[0111] The deployment submodule is used to deploy a host agent device on the server to be scaled up when the target component is a non-management node component.
[0112] The determination submodule is used to identify the non-management node components to be installed;
[0113] The third installation submodule is used to install the installation media corresponding to the non-management node components to be installed on the server to be expanded.
[0114] Optionally, in this embodiment, the host agent device is a tool for managing and executing distributed system operations. It is typically installed on the server to be expanded and can perform various operations, including installing, configuring, and monitoring components. First, the host agent needs to be installed on the server to be expanded. The host agent's installer is uploaded to the server, and the installation command is run. After installation, the host agent will be able to communicate with the management page and receive installation instructions for the expansion components. On the management page, the administrator can select the non-managed node components to be expanded, including database instances, application servers, cache servers, etc. The administrator can make necessary configuration modifications to the selected components, including setting component parameters, adjusting resource allocation, and configuration files. These configuration changes will affect the installation and operation of the new components. Once the administrator has completed the component selection and configuration on the management page, the host agent can be triggered to execute the installation command. These commands will be distributed by the host agent to the non-managed node servers to be expanded. The installation commands are usually generated by a script and will select the appropriate installation media based on the current operating system type and version. This ensures that the same expansion operation is performed on different operating systems. After receiving the installation command, the appropriate installation media is selected according to the instructions. The installation script will begin the installation process based on the selected installation media. The installation process is typically monitored to ensure it proceeds smoothly. The hosting agent may periodically report the installation progress and status to the management page. If problems arise during installation, the hosting agent can provide feedback, such as error messages or warnings. Administrators can then take appropriate action to resolve the issues based on this information. This allows for effective scaling of the system's capabilities while ensuring consistency and manageability across different systems.
[0115] For other examples of this embodiment, please refer to the examples above, which will not be repeated here.
[0116] Figure 3 This is a schematic diagram of an optional electronic device according to an embodiment of this application, such as... Figure 3 As shown, it includes a processor 302, a communication interface 304, a memory 306, and a communication bus 308. The processor 302, communication interface 304, and memory 306 communicate with each other via the communication bus 308.
[0117] Memory 306 is used to store computer programs;
[0118] When processor 302 executes a computer program stored in memory 306, it performs the following steps:
[0119] Upload the installation media corresponding to the system of the server to be expanded to the operation and maintenance management account of all management nodes of the distributed database;
[0120] The operation and maintenance management account installs the installation media corresponding to the system of the server to be expanded onto the distributed database.
[0121] Install the target component on the server to be expanded so that the target component can be connected to the distributed database.
[0122] Optionally, in this embodiment, the communication bus can be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 The symbol is represented by a single thick line, but this does not indicate that there is only one bus or one type of bus. The communication interface is used for communication between the aforementioned electronic devices and other devices.
[0123] The memory may include RAM, or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0124] As an example, the aforementioned storage 306 may include, but is not limited to, the upload module 202, the first installation module 204, and the second installation module 206 from the component expansion device of the aforementioned distributed database. Furthermore, it may include, but is not limited to, other module units from the component expansion device of the aforementioned distributed database, which will not be elaborated upon in this example.
[0125] The processors mentioned above can be general-purpose processors, including but not limited to: CPU (Central Processing Unit), NP (Network Processor), etc.; they can also be DSP (Digital Signal Processor), ASIC (Application Specific Integrated Circuit), FPGA (Field-Programmable Gate Array), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0126] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments, and will not be repeated here.
[0127] Those skilled in the art will understand that Figure 3 The structure shown is for illustrative purposes only. The device implementing the above-described distributed database component expansion method can be a terminal device, such as a smartphone (e.g., Android phone, iOS phone), tablet computer, PDA, mobile Internet Devices (MID), PAD, etc. Figure 3 This does not limit the structure of the aforementioned electronic devices. For example, the electronic device may also include components that are more... Figure 3 The more or fewer components shown (such as network interfaces, display devices, etc.), or having the same Figure 3 The different configurations shown.
[0128] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, ROM, RAM, disk or optical disk, etc.
[0129] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer program, which, when executed by a processor, performs the steps in the above-described distributed database component expansion method.
[0130] Optionally, in this embodiment, those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0131] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0132] If the integrated units in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in the aforementioned computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application.
[0133] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0134] In the several embodiments provided in this application, it should be understood that the disclosed client can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection between units or modules, and may be electrical or other forms.
[0135] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0136] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0137] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A method for scaling up components of a distributed database, characterized in that, include: Upload the installation media corresponding to the system of the server to be expanded, which is different from the operating system of the current node of the distributed database, to the operation and maintenance management account of all management nodes of the distributed database. The operation and maintenance management account installs the installation media corresponding to the system of the server to be expanded onto the distributed database; Installing the target component on the server to be expanded, so that the target component can be connected to the distributed database, includes: If the target component is a management node component, the installation medium corresponding to the management node component is installed on the server to be expanded. Perform a scaling operation on the management node component so that the management node component automatically connects to the distributed database after the scaling is completed; The step of performing a scaling operation on the management node component so that the management node component automatically connects to the distributed database after the scaling is completed includes: Add the configuration information of the management node component to the global configuration of the distributed database; Stop the process of the management node component; Synchronize the data in the metadata database corresponding to the management node component; Modify the high watermark and low watermark of the distributed database; Add the configuration information of the management node component to the configuration of the management component of the distributed database; Restart all metadata and management components of the distributed database.
2. The method according to claim 1, characterized in that, The step of installing the target component on the server to be expanded, so that the target component can access the distributed database, includes: If the target component is a big data component, the installation medium corresponding to the big data component is uploaded to the main management node of the distributed database; The big data component is installed on the server to be expanded, so that the big data component can be connected to the distributed database.
3. The method according to claim 1, characterized in that, The synchronization of data in the metadata database corresponding to the management node component includes: Write the node information of the management node component to each meta database in the distributed database; Write data from any metadatabase in the distributed database to the metadatabase corresponding to the management node component.
4. The method according to claim 1, characterized in that, After performing a scaling operation on the management node component, the method further includes: The expansion result file is sent to all management nodes of the distributed database.
5. The method according to claim 1, characterized in that, The step of installing the target component on the server to be expanded, so that the target component can access the distributed database, includes: When the target component is a non-management node component, a host agent device is deployed on the server to be expanded. Identify the non-management node components to be installed; Install the installation media corresponding to the non-management node component to be installed on the server to be expanded.
6. A component expansion device for a distributed database, characterized in that, include: The upload module is used to upload the installation media corresponding to the system of the server to be expanded, which is different from the operating system of the current node of the distributed database, to the operation and maintenance management account of all management nodes of the distributed database. The first installation module is used by the operation and maintenance management account to install the installation media corresponding to the system of the server to be expanded on the distributed database. The second installation module, used to install the target component on the server to be expanded, so that the target component can be connected to the distributed database, includes: If the target component is a management node component, the installation medium corresponding to the management node component is installed on the server to be expanded. Perform a scaling operation on the management node component so that the management node component automatically connects to the distributed database after the scaling is completed; The step of performing a scaling operation on the management node component so that the management node component automatically connects to the distributed database after the scaling is completed includes: Add the configuration information of the management node component to the global configuration of the distributed database; Stop the process of the management node component; Synchronize the data in the metadata database corresponding to the management node component; Modify the high watermark and low watermark of the distributed database; Add the configuration information of the management node component to the configuration of the management component of the distributed database; Restart all metadata and management components of the distributed database.
7. A computer-readable storage medium storing a computer program, characterized in that, The computer program is executed by the processor to perform the method described in any one of claims 1 to 5.
8. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to execute the method described in any one of claims 1 to 5 through the computer program.
Citation Information
Patent Citations
Cluster service capacity expansion method and device based on heterogeneous storage engine and storage medium
CN113835623A