Upgrading method and device of cloud distributed database system, equipment and medium
By snapshotting and upgrading the resource pool components of the cloud distributed database system, the problem of low business processing efficiency during the version upgrade process is solved, and the system upgrade without business interruption is achieved, and processing efficiency is improved.
Patent Information
- Application Number
- CN202411967637.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-04-25
AI Technical Summary
During the version upgrade of the cloud distributed database system, the business processing operations of the resource pool are suspended, resulting in the impact of the business processing efficiency.
By snapsing the components of the resource pool to be upgraded, a resource pool snapshot is generated, and the snapshot is upgraded to obtain a target upgrade snapshot. Finally, the resource pool to be upgraded is updated based on the target upgrade snapshot to complete the system upgrade.
During the upgrade process, the service processing of the resource pool to be upgraded does not affect it, and the efficiency of the cloud distributed database system processing services is improved.
Smart Images

Figure CN119883342A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of computer technology, and in particular to a method, device, equipment and medium for upgrading a cloud distributed database system. Background Art
[0002] With the rapid development of business, the cloud deployment of distributed databases is called the future development trend, and the number of resource pools in the cloud distributed database system is gradually increasing. Each time the cloud distributed database system is upgraded, the ongoing business processing operations of the resource pools in the cloud distributed database system need to be suspended, and the suspended resource pools need to be upgraded.
[0003] However, in the process of implementing the present invention, it is found that the prior art has at least the following technical problems: the business processing operation of the resource pool is suspended during the version upgrade, which affects the business processing efficiency. Summary of the invention
[0004] The embodiments of the present invention provide a method, device, equipment and medium for upgrading a cloud distributed database system, so as to achieve the purpose of improving the efficiency of processing business in the cloud distributed database system.
[0005] According to one aspect of the present invention, a method for upgrading a cloud distributed database system is provided, comprising:
[0006] In response to an upgrade trigger operation on a cloud distributed database system, determining a resource pool to be upgraded in the cloud distributed database system, taking a snapshot of a component to be upgraded corresponding to the resource pool to be upgraded, and obtaining a resource pool snapshot corresponding to the resource pool to be upgraded;
[0007] Performing an upgrade process on the resource pool snapshot to obtain a target upgrade snapshot corresponding to the resource pool snapshot;
[0008] Based on the target upgrade snapshot, the resource pool to be upgraded in the cloud distributed database system is updated to complete the upgrade of the cloud distributed database system.
[0009] According to another aspect of the present invention, there is provided an upgrade device for a cloud distributed database system, the device comprising:
[0010] A resource pool determination module, configured to, in response to an upgrade triggering operation on a cloud distributed database system, determine a resource pool to be upgraded in the cloud distributed database system, take a snapshot of a component to be upgraded corresponding to the resource pool to be upgraded, and obtain a resource pool snapshot corresponding to the resource pool to be upgraded;
[0011] A snapshot sending module, used for performing upgrade processing on the resource pool snapshot to obtain a target upgrade snapshot corresponding to the resource pool snapshot;
[0012] The snapshot receiving module is used to update the resource pool to be upgraded in the cloud distributed database system based on the target upgrade snapshot to complete the upgrade of the cloud distributed database system.
[0013] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0014] at least one processor; and
[0015] a memory communicatively connected to the at least one processor; wherein,
[0016] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the upgrade method of the cloud distributed database system described in any embodiment of the present invention.
[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the cloud distributed database system upgrade method described in any embodiment of the present invention when executed.
[0018] According to another aspect of the present invention, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the method for upgrading the cloud distributed database system according to any embodiment of the present invention is implemented.
[0019] The technical solution of the embodiment of the present invention, in response to the upgrade trigger operation of the cloud distributed database system, determines the resource pool to be upgraded in the cloud distributed database system, takes a snapshot of the to-be-upgraded component corresponding to the resource pool to be upgraded, and obtains the resource pool snapshot corresponding to the resource pool to be upgraded; obtains the target upgrade snapshot corresponding to the resource pool snapshot by performing upgrade processing on the resource pool snapshot, so that the business processing of the resource pool to be upgraded is not affected during the upgrade processing; and based on the target upgrade snapshot, updates the resource pool to be upgraded in the cloud distributed database system to complete the upgrade of the cloud distributed database system. The technical solution provided by this embodiment completes the upgrade of the cloud distributed database system by performing upgrade processing on the resource pool snapshot, so that during the upgrade processing, there is no need to suspend the business processing operation of the resource pool to be upgraded, which can improve the efficiency of the cloud distributed database system in processing business.
[0020] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0022] Figure 1 is a flow chart of a method for upgrading a cloud distributed database system provided according to an embodiment of the present invention;
[0023] Figure 2 is a schematic diagram of the structure of a cloud distributed database system provided according to an embodiment of the present invention;
[0024] Figure 3 It is a structural schematic diagram of an upgrade device for a cloud distributed database system provided according to an embodiment of the present invention;
[0025] Figure 4 It is a structural diagram of an electronic device for implementing the upgrade method of the cloud distributed database system according to an embodiment of the present invention. DETAILED DESCRIPTION
[0026] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "etc." and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.
[0028] It should be noted that the collection, collection, updating, analysis, processing, use, transmission, storage and other aspects of user personal information involved in the technical solution of this disclosure are in compliance with the provisions of relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. Necessary measures are taken for user personal information to prevent illegal access to user personal information data and maintain the security of user personal information and network security.
[0029] Figure 1 This is a flow chart of a method for upgrading a cloud distributed database system provided according to an embodiment of the present invention. This embodiment is applicable to the case of performing version upgrades on a cloud distributed database system. The method can be executed by an upgrade device for a cloud distributed database system, and the upgrade device for a cloud distributed database system can be implemented in the form of hardware and / or software.
[0030] like Figure 1 As shown, the method of this embodiment may specifically include:
[0031] S110. In response to an upgrade triggering operation on the cloud distributed database system, determine a resource pool to be upgraded in the cloud distributed database system, take a snapshot of a component to be upgraded corresponding to the resource pool to be upgraded, and obtain a resource pool snapshot corresponding to the resource pool to be upgraded.
[0032] It should be noted that the cloud distributed database system is a data management system that combines distributed database technology with cloud computer technology. A cloud distributed database system is obtained by cloud-deploying the distributed database according to the cloud deployment architecture. The cloud deployment architecture places tenant nodes in containers for operation, and the container can realize on-demand allocation of resources. The deployment method corresponding to the cloud deployment architecture only needs to make the node installation file into a mirror to complete the container deployment. The cloud distributed database system may include multiple resource pools, and the resource pools may be distinguished according to different regions. Exemplarily, the cloud distributed database system includes a resource pool in region a, a resource pool in region b, and a resource pool in region c. A Kubernetes (k8s) cluster is deployed in each resource pool. The cloud distributed database system also includes a mobile cloud platform, which is used to manage and control the entire cloud distributed data architecture.
[0033] In this embodiment, in response to an upgrade trigger operation on the cloud distributed database system, the cloud distributed database system may be upgraded. The upgrade trigger operation may include a click operation on the version information of the target upgrade version on the user interface. Exemplarily, the user interface displays the version information of the current upgradeable version corresponding to the cloud distributed database system, and the version information includes the version number and the generation date. By clicking on the version information, the upgrade of the cloud distributed database system is triggered.
[0034] In a specific implementation, when performing an upgrade operation on a cloud distributed database system, each resource pool in the cloud distributed database system may be determined as a resource pool to be upgraded. Alternatively, a specific implementation method of determining a resource pool to be upgraded in a cloud distributed database system may be: obtaining a switch identifier of a grayscale switch corresponding to each resource pool in the cloud distributed database system; for each resource pool, when the switch identifier corresponding to the resource pool is a preset open identifier, determining the resource pool as a resource pool to be upgraded.
[0035] It should be noted that the configuration items of the grayscale switch can be configured for the resource pool in the cloud distributed database system. The upgrade method of each resource pool is determined by controlling the switch identifier of the grayscale switch. For each resource pool, the switch identifier of the grayscale switch is different, and the corresponding upgrade method is different. Exemplarily, for a resource pool whose switch identifier of the grayscale switch is an open identifier, a snapshot can be generated for the resource pool, and after upgrading the snapshot, the resource pool is replaced to achieve an upgrade of the resource pool. For a resource pool whose switch identifier of the grayscale switch is a closed identifier, the business processing of the resource pool can be suspended, and the resource pool can be directly upgraded.
[0036] In this embodiment, when upgrading the cloud distributed database system, the switch identifier of the grayscale switch corresponding to each resource pool in the cloud distributed database system can be obtained. The resource pool represented by the switch identifier of the grayscale switch being turned on can be determined as the resource pool to be upgraded. Specifically, for each resource pool, it is determined whether the switch identifier corresponding to the resource pool is consistent with the preset open identifier. If they are consistent, the resource pool is determined as the resource pool to be upgraded. Exemplarily, the preset open identifier can be true, 1, or enable. The close identifier of the grayscale switch can be false, 0, or disable. This embodiment uses the switch identifier of the grayscale switch to quickly and effectively determine the resource pool to be upgraded that needs to be snapshotted.
[0037] In a specific implementation, a snapshot can be taken of the components to be upgraded corresponding to the resource pool to be upgraded, and the snapshots of each component to be upgraded form a resource pool snapshot corresponding to the resource pool to be upgraded. Specifically, a snapshot is taken of the components to be upgraded corresponding to the resource pool to be upgraded to obtain a resource pool snapshot corresponding to the resource pool to be upgraded, including: taking snapshots of the component images in the image library corresponding to the resource pool to be upgraded, the gateway service components in the resource pool to be upgraded, the original database instance, and the cluster management service components, respectively, to obtain a resource pool snapshot corresponding to the resource pool to be upgraded.
[0038] It should be noted that each resource pool includes a metadata library, a gateway service component (GDB-WEB), an original database instance, and a cluster management service component (operator). Each resource pool is associated with an image library, which contains component images.
[0039] In this embodiment, a snapshot may be taken of the component image in the image library corresponding to the resource pool to be upgraded to obtain a first snapshot, a snapshot may be taken of the gateway service component to obtain a second snapshot, a snapshot may be taken of the original database instance to obtain a third snapshot, and a snapshot may be taken of the cluster management service component to obtain a fourth snapshot. The first snapshot, the second snapshot, the third snapshot, and the fourth snapshot constitute a resource pool snapshot.
[0040] This embodiment takes snapshots of different components in the resource pool to be upgraded to obtain a resource pool snapshot that can completely replace the resource pool to be upgraded, thereby facilitating subsequent version upgrade processing.
[0041] S120: Perform upgrade processing on the resource pool snapshot to obtain a target upgrade snapshot corresponding to the resource pool snapshot.
[0042] In this embodiment, the resource pool snapshot can be sent to the operation and maintenance terminal, so that the resource pool snapshot can be upgraded by the operation and maintenance terminal to obtain a target upgraded snapshot. Specifically, the snapshot obtained by the upgrade process can be used as the target upgraded snapshot corresponding to the resource pool snapshot.
[0043] In order to ensure the stability and effectiveness of the target upgrade snapshot, the resource pool snapshot can be optionally upgraded to obtain the target upgrade snapshot corresponding to the resource pool snapshot. The specific implementation method can also be: performing version upgrade on the resource pool snapshot and performing version testing on the upgraded resource pool snapshot; if the test passes, the upgraded resource pool snapshot is used as the target upgrade snapshot.
[0044] In this embodiment, the resource pool snapshot can be upgraded according to the pre-acquired version information. In order to ensure the stability and effectiveness of the upgraded resource pool snapshot, the resource pool snapshot obtained after the version upgrade can be tested. If the test passes, it means that the upgraded resource pool snapshot meets the operation requirements, and the upgraded resource pool snapshot can be directly used as the target upgrade snapshot.
[0045] Furthermore, it also includes: if the test fails, based on the test data generated during the version test, generating a target test log corresponding to the resource pool snapshot after the upgrade, and displaying the target test log.
[0046] In this embodiment, if the test fails, in order to facilitate the operation and maintenance personnel to check and find problems, the test data generated during the version test can be used as the target test log corresponding to the target upgrade snapshot. The target test log is sent to the operation and maintenance terminal and displayed on the operation and maintenance terminal.
[0047] After upgrading the resource pool snapshot, in order to ensure the stability and security of the upgraded resource pool snapshot, this implementation tests the upgraded resource pool snapshot and uses the resource pool snapshot that passes the test as the target upgraded snapshot, thereby ensuring that the target upgraded snapshot can run normally.
[0048] S130: Based on the target upgrade snapshot, update the resource pool to be upgraded in the cloud distributed database system to complete the upgrade of the cloud distributed database system.
[0049] In this embodiment, the resource pool to be upgraded in the cloud distributed database system can be replaced with the target upgrade snapshot corresponding to the resource pool to be upgraded to complete the upgrade of the resource pool to be upgraded. After each resource pool in the cloud distributed database system completes the upgrade operation, the upgrade of the cloud distributed database system is completed.
[0050] Optionally, based on the target upgrade snapshot, updating the resource pool to be upgraded in the cloud distributed database system includes: obtaining the current database instance in the resource pool to be upgraded, updating the target upgrade snapshot based on the current database instance; replacing the resource pool to be upgraded with the updated target upgrade snapshot.
[0051] It should be noted that since the resource pool to be upgraded has been executing business processing during the resource pool snapshot upgrade process, the database instance can be migrated to make the database instance in the target upgrade snapshot match the database instance in the resource pool to be upgraded at the current moment.
[0052] The current database instance is the database instance in the resource pool to be upgraded at the moment when the target upgrade snapshot is obtained.
[0053] In this embodiment, the current database instance in the resource pool to be upgraded can be obtained, and the current database instance is compared with the instance snapshot included in the target upgrade snapshot. If the current database instance matches the instance snapshot included in the target upgrade snapshot, the resource pool to be upgraded can be directly replaced with the updated target upgrade snapshot. If the current database instance does not match the instance snapshot included in the target upgrade snapshot, the current database instance can be replaced with the instance snapshot included in the target upgrade snapshot, and the resource pool to be upgraded can be replaced with the target upgrade snapshot after the instance snapshot is replaced.
[0054] In this embodiment, by comparing the instance snapshot in the target upgrade snapshot with the current database instance, it is ensured that the database instance in the target upgrade snapshot matches the database instance in the resource pool to be upgraded at the current moment.
[0055] The technical solution of the embodiment of the present invention, in response to the upgrade trigger operation of the cloud distributed database system, determines the resource pool to be upgraded in the cloud distributed database system, takes a snapshot of the to-be-upgraded component corresponding to the resource pool to be upgraded, and obtains the resource pool snapshot corresponding to the resource pool to be upgraded; obtains the target upgrade snapshot corresponding to the resource pool snapshot by performing upgrade processing on the resource pool snapshot, so that the business processing of the resource pool to be upgraded is not affected during the upgrade processing; and based on the target upgrade snapshot, updates the resource pool to be upgraded in the cloud distributed database system to complete the upgrade of the cloud distributed database system. The technical solution provided by this embodiment completes the upgrade of the cloud distributed database system by performing upgrade processing on the resource pool snapshot, so that during the upgrade processing, there is no need to suspend the business processing operation of the resource pool to be upgraded, which can improve the efficiency of the cloud distributed database system in processing business.
[0056] The above describes in detail the embodiments corresponding to the upgrade method of the cloud distributed database system. In order to make the technical scheme of the method further clear to those skilled in the art, a specific application scenario is given below.
[0057] In this embodiment, the cloud distributed database system includes resource pool 1, resource pool 2 and resource pool 3, the mobile cloud platform is connected to the three resource pools, and the mobile cloud platform includes a mobile cloud ordering page, a mobile cloud console and a mobile cloud collaboration platform. A k8s cluster is deployed in each resource pool, and each resource pool contains a corresponding metadata library, a gateway service component, an original database instance and a cluster management service component. Each resource pool corresponds to an image library for storing the component images required in the resource pool.
[0058] In order to describe the upgrade process of the cloud distributed database system in detail, please refer to Figure 2. For each resource pool, it can be determined whether the grayscale switch is turned on. When the grayscale switch is turned on, the resource pool is used as the resource pool to be upgraded, and a resource pool snapshot corresponding to the resource pool to be upgraded is generated. The resource pool snapshot contains all components in the resource pool to be upgraded. For example, if the grayscale switches of resource pool 1, resource pool 2, and resource pool 3 are all turned on, snapshot 1, snapshot 2, and snapshot 3 are generated. After the resource pool snapshot is generated, the resource pool snapshot can be sent to the operation and maintenance terminal, and the operation and maintenance personnel upgrade the resource pool snapshot to obtain the target upgrade snapshot, and perform version testing on the target upgrade snapshot; at the same time, the resource pool to be upgraded corresponding to the target upgrade snapshot provides library services normally. When the target upgrade snapshot passes the test, the target upgrade snapshot can replace the resource pool to be upgraded and provide services externally; the resource pool to be upgraded can be retained for a preset period of time and then deleted to ensure that the upgraded target upgrade snapshot can run stably, and then the original resource pool to be upgraded can be deleted. After all resource pools in the cloud distributed database system have been upgraded, it means that the cloud distributed database system has been upgraded, and the grayscale switches corresponding to each resource pool can be turned off.
[0059] This embodiment realizes the rapid upgrade of the mobile cloud distributed database, reduces the operational risk of the upgrade, and improves the upgrade efficiency.
[0060] Figure 3 1 is a schematic diagram of the structure of a cloud distributed database system upgrade device provided according to an embodiment of the present invention, and the device is used to execute the cloud distributed database system upgrade method provided in any of the above embodiments. The device and the cloud distributed database system upgrade method of the above embodiments belong to the same inventive concept, and the details not described in detail in the embodiment of the cloud distributed database system upgrade device can refer to the embodiment of the cloud distributed database system upgrade method. Figure 3 As shown, the device comprises:
[0061] The resource pool determination module 10 is used to determine the resource pool to be upgraded in the cloud distributed database system in response to the upgrade triggering operation of the cloud distributed database system, take a snapshot of the component to be upgraded corresponding to the resource pool to be upgraded, and obtain a resource pool snapshot corresponding to the resource pool to be upgraded;
[0062] The snapshot sending module 11 is used to perform upgrade processing on the resource pool snapshot to obtain a target upgrade snapshot corresponding to the resource pool snapshot;
[0063] The snapshot receiving module 12 is used to update the resource pool to be upgraded in the cloud distributed database system based on the target upgrade snapshot to complete the upgrade of the cloud distributed database system.
[0064] Based on any optional technical solution in the embodiment of the present invention, optionally, the resource pool determination module 10 includes:
[0065] An identification acquisition unit, used to acquire a switch identification of a grayscale switch corresponding to each resource pool in the cloud distributed database system;
[0066] The resource pool determining unit is used to determine, for each resource pool, a resource pool as a resource pool to be upgraded when a switch identifier corresponding to the resource pool is a preset on identifier.
[0067] Based on any optional technical solution in the embodiment of the present invention, optionally, the resource pool determination module 10 includes:
[0068] The snapshot unit is used to take snapshots of the component images in the image library corresponding to the resource pool to be upgraded, the gateway service components in the resource pool to be upgraded, the original database instance and the cluster management service components, respectively, to obtain a resource pool snapshot corresponding to the resource pool to be upgraded.
[0069] Based on any optional technical solution in the embodiment of the present invention, optionally, the snapshot sending module 11 includes:
[0070] The version testing unit is used to perform version upgrade on the resource pool snapshot and to perform version testing on the upgraded resource pool snapshot; if the test passes, the upgraded resource pool snapshot is used as the target upgrade snapshot.
[0071] Based on any optional technical solution in the embodiments of the present invention, optionally, the method further includes:
[0072] The log generation module is used to generate a target test log corresponding to the resource pool snapshot after the upgrade based on the test data generated during the version test process when the test fails, and display the target test log.
[0073] Based on any optional technical solution in the embodiment of the present invention, optionally, the snapshot receiving module 12 includes:
[0074] The updating unit is used to obtain the current database instance in the resource pool to be upgraded, update the target upgrade snapshot based on the current database instance, and replace the resource pool to be upgraded with the updated target upgrade snapshot.
[0075] The technical solution of the embodiment of the present invention, in response to the upgrade trigger operation of the cloud distributed database system, determines the resource pool to be upgraded in the cloud distributed database system, takes a snapshot of the to-be-upgraded component corresponding to the resource pool to be upgraded, and obtains the resource pool snapshot corresponding to the resource pool to be upgraded; obtains the target upgrade snapshot corresponding to the resource pool snapshot by performing upgrade processing on the resource pool snapshot, so that the business processing of the resource pool to be upgraded is not affected during the upgrade processing; and based on the target upgrade snapshot, updates the resource pool to be upgraded in the cloud distributed database system to complete the upgrade of the cloud distributed database system. The technical solution provided by this embodiment completes the upgrade of the cloud distributed database system by performing upgrade processing on the resource pool snapshot, so that during the upgrade processing, there is no need to suspend the business processing operation of the resource pool to be upgraded, which can improve the efficiency of the cloud distributed database system in processing business.
[0076] It is worth noting that in the embodiment of the upgrade device of the above-mentioned cloud distributed database system, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.
[0077] Figure 4 It is a structural schematic diagram of an electronic device for implementing the upgrade method of the cloud distributed database system of an embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0078] like Figure 4As shown, the electronic device 20 includes at least one processor 21, and a memory connected to the at least one processor 21, such as a read-only memory (ROM) 22, a random access memory (RAM) 23, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 21 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 22 or the computer program loaded from the storage unit 28 to the random access memory (RAM) 23. In RAM23, various programs and data required for the operation of the electronic device 20 can also be stored. The processor 21, ROM22 and RAM23 are connected to each other through a bus 24. An input / output (I / O) interface 25 is also connected to the bus 24.
[0079] A number of components in the electronic device 20 are connected to the I / O interface 25, including: an input unit 26, such as a keyboard, a mouse, etc.; an output unit 27, such as various types of displays, speakers, etc.; a storage unit 28, such as a disk, an optical disk, etc.; and a communication unit 29, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 29 allows the electronic device 20 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0080] The processor 21 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 21 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 21 executes the various methods and processes described above, such as the upgrade method of the cloud distributed database system.
[0081] In some embodiments, the upgrade method of the cloud distributed database system may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 28. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 20 via the ROM 22 and / or the communication unit 29. When the computer program is loaded into the RAM 23 and executed by the processor 21, one or more steps of the upgrade method of the cloud distributed database system described above may be performed. Alternatively, in other embodiments, the processor 21 may be configured to execute the upgrade method of the cloud distributed database system in any other appropriate manner (e.g., by means of firmware).
[0082] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0083] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0084] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0085] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0086] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0087] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0088] This embodiment also provides a computer program product, including a computer program, which, when executed by a processor, implements the upgrade method of the cloud distributed database system provided in any embodiment of the present application.
[0089] In the process of implementation, the computer program product can be written in one or more programming languages or a combination thereof to perform the computer program code of the present invention, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, using an Internet service provider to connect through the Internet).
[0090] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0091] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for upgrading a cloud distributed database system, characterized in that: include: In response to an upgrade trigger operation on a cloud distributed database system, determining a resource pool to be upgraded in the cloud distributed database system, taking a snapshot of a component to be upgraded corresponding to the resource pool to be upgraded, and obtaining a resource pool snapshot corresponding to the resource pool to be upgraded; Performing an upgrade process on the resource pool snapshot to obtain a target upgrade snapshot corresponding to the resource pool snapshot; Based on the target upgrade snapshot, the resource pool to be upgraded in the cloud distributed database system is updated to complete the upgrade of the cloud distributed database system.
2. The method according to claim 1, characterized in that: The determining of a resource pool to be upgraded in the cloud distributed database system includes: Obtaining a switch identifier of a grayscale switch corresponding to each resource pool in the cloud distributed database system; For each of the resource pools, when a switch identifier corresponding to the resource pool is a preset on identifier, the resource pool is determined as the resource pool to be upgraded.
3. The method according to claim 1, characterized in that The taking a snapshot of the to-be-upgraded component corresponding to the to-be-upgraded resource pool to obtain a resource pool snapshot corresponding to the to-be-upgraded resource pool includes: Snapshots are taken of the component images in the image library corresponding to the resource pool to be upgraded, the gateway service components, the original database instances, and the cluster management service components in the resource pool to be upgraded, respectively, to obtain a resource pool snapshot corresponding to the resource pool to be upgraded.
4. The method according to claim 1, characterized in that The step of performing an upgrade process on the resource pool snapshot to obtain a target upgrade snapshot corresponding to the resource pool snapshot includes: Performing version upgrade on the resource pool snapshot and performing version testing on the upgraded resource pool snapshot; If the test passes, the upgraded resource pool snapshot is used as the target upgraded snapshot.
5. The method according to claim 4, characterized in that Also includes: In the case of a test failure, a target test log corresponding to the upgraded resource pool snapshot is generated based on the test data generated during the version test process, and the target test log is displayed.
6. The method according to claim 1, characterized in that The updating the resource pool to be upgraded in the cloud distributed database system based on the target upgrade snapshot includes: Acquire the current database instance in the resource pool to be upgraded, and update the target upgrade snapshot based on the current database instance; The resource pool to be upgraded is replaced with the updated target upgrade snapshot.
7. An upgrade device for a cloud distributed database system, characterized in that: include: A resource pool determination module, configured to, in response to an upgrade triggering operation on a cloud distributed database system, determine a resource pool to be upgraded in the cloud distributed database system, take a snapshot of a component to be upgraded corresponding to the resource pool to be upgraded, and obtain a resource pool snapshot corresponding to the resource pool to be upgraded; A snapshot sending module, used for performing upgrade processing on the resource pool snapshot to obtain a target upgrade snapshot corresponding to the resource pool snapshot; The snapshot receiving module is used to update the resource pool to be upgraded in the cloud distributed database system based on the target upgrade snapshot to complete the upgrade of the cloud distributed database system.
8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the cloud distributed database system upgrade method described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the cloud distributed database system upgrade method according to any one of claims 1 to 6 when executed.
10. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the upgrade method of the cloud distributed database system according to any one of claims 1 to 6.