CN117688085A - Distributed database switching method, device, system, equipment and storage medium - Google Patents

Distributed database switching method, device, system, equipment and storage medium Download PDF

Info

Publication number
CN117688085A
CN117688085A CN202311505749.7A CN202311505749A CN117688085A CN 117688085 A CN117688085 A CN 117688085A CN 202311505749 A CN202311505749 A CN 202311505749A CN 117688085 A CN117688085 A CN 117688085A
Authority
CN
China
Prior art keywords
node
switching
management node
service
distributed database
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311505749.7A
Other languages
Chinese (zh)
Inventor
陈少龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jinzhuan Xinke Co Ltd
Original Assignee
Jinzhuan Xinke Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jinzhuan Xinke Co Ltd filed Critical Jinzhuan Xinke Co Ltd
Priority to CN202311505749.7A priority Critical patent/CN117688085A/en
Publication of CN117688085A publication Critical patent/CN117688085A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a distributed database switching method, device, system, equipment and storage medium, wherein the management node id of a target machine room is acquired to switch a main management node, and meanwhile, according to metadata information recorded by the main management node, a new node with optimal service components is determined, so that the shortest switching time is ensured, new transactions to be executed are cached in the service component switching process, the operation errors and stable operation of the service components are avoided, the technical problems that the current switching mode has influence on the execution of the service in the switching process, the efficiency is lower, and the availability and the reliability of manual operation are low are solved.

Description

Distributed database switching method, device, system, equipment and storage medium
Technical Field
The present disclosure relates to the field of database management technologies, and in particular, to a distributed database switching method, device, system, device, and storage medium.
Background
The distributed database adopts a main and standby deployment mode to ensure the reliability of the service, and the scale of the distributed database is continuously expanded along with the continuous expansion of the service.
When the machine room where the main node is located influences normal operation of the service due to network, equipment and the like, the component switching of a single partition can be usually performed manually, the mode is long in time consumption and needs a large amount of manual operation to realize, the requirements on high availability and high reliability of the financial industry are obviously not met, and a method is also provided for realizing the rapid switching of multiple components through the machine room switching, but when a plurality of identical nodes exist in the same partition, the node selection has randomness, and if the expected node is to be ensured to be used, human intervention is possibly needed.
The two modes can have certain influence on the execution of the service in the switching process, and meanwhile, the influence time on the service in the switching process is one of the important focused projects in the financial field. Under the background, a method or device for realizing fast switching of the database without influencing the service is needed to reduce manual operation so as to ensure high availability and high reliability of the database.
Disclosure of Invention
The application provides a distributed database switching method, device, system, equipment and storage medium, which solve the technical problems that the current switching mode has influence on the execution of service in the switching process, the efficiency is low, and the availability and reliability of manual operation are low.
In view of this, a first aspect of the present application provides a distributed database switching method, the method including:
s1, receiving a node switching request, and acquiring a management node ip of a target machine room and an id of a service component according to the node switching request;
s2, switching a master management node to the management node ip according to the management node ip of the target machine room;
s3, after the management node is switched, sending a node switching notification to the service component, and acquiring service information of the service component switching;
s4, sending the service information to a computing node through the master management node, enabling the computing node to continue to execute the executing transaction in the service information and buffer the new transaction in the service information until the service component node is switched, and sending the buffered new transaction in the service information to the new node of the service component by the computing node.
Optionally, the step S1 includes:
performing environment inspection according to the node switching request, and executing the skipped cluster when the cluster which does not meet the preset requirement exists in the environment;
if the check is passed, the step S2 is continuously executed, otherwise, a refusal switching notification is returned.
Optionally, before the step S4, the method further includes:
and the service component determines an optimal new node according to the metadata information recorded in the master management node and switches to the new node.
Optionally, the step S4 further includes:
and sending a node switching notification to other related components so that the other related components are switched to the new node.
Optionally, the step S4 further includes:
and recording the front-back switching information of the main management node and the business component.
Optionally, the ids of the service components include the ids of the global transaction nodes and the ids of the data nodes.
A second aspect of the present application provides a distributed database switching apparatus, the apparatus comprising:
the receiving unit is used for receiving a node switching request and acquiring a management node ip of a target machine room and an id of a service component according to the node switching request;
the management switching unit is used for switching the master management node to the management node ip according to the management node ip of the target machine room;
the first sending unit is used for sending a node switching notification to the service component after the management node switching is completed and obtaining service information of the service component switching;
and the second sending unit is used for sending the service information to a computing node through the master management node, so that the computing node continuously executes the executing transaction in the service information and caches the new transaction in the service information until the service component node is switched, and the computing node issues the cached new transaction in the service information to the new node of the service component.
A third aspect of the present application provides a distributed database switching system, where the system includes a distributed database switching device according to the second aspect of the present application, and further includes a management node, a service component, and a computing node;
wherein, distributed database auto-change over device includes:
the receiving unit is used for receiving a node switching request and acquiring a management node ip of a target machine room and an id of a service component according to the node switching request;
the management switching unit is used for switching the master management node to the management node ip according to the management node ip of the target machine room;
the first sending unit is used for sending a node switching notification to the service component after the management node switching is completed and obtaining service information of the service component switching;
and the second sending unit is used for sending the service information to a computing node through the master management node, so that the computing node continuously executes the executing transaction in the service information and caches the new transaction in the service information until the service component node is switched, and the computing node issues the cached new transaction in the service information to the new node of the service component.
A fourth aspect of the present application provides a distributed database switching apparatus, the apparatus comprising a processor and a memory:
the memory is used for storing program codes and transmitting the program codes to the processor;
the processor is configured to execute the steps of the distributed database switching method according to the first aspect according to the instructions in the program code.
A fifth aspect of the present application provides a computer readable storage medium storing program code for performing the steps of the distributed database switching method according to the first aspect above.
From the above technical solutions, the embodiments of the present application have the following advantages:
in the application, a distributed database switching method, a device, a system, equipment and a storage medium are provided, the switching of a main management node is performed by acquiring the management node id of a target machine room, and meanwhile, according to metadata information recorded by the main management node, a new node with optimal service components is determined, so that the shortest switching time is ensured, new transactions to be executed are cached in the service component switching process, the operation errors and stable operation of the service components are avoided, the technical problems that the current switching mode has influence on the execution of the service in the switching process, the efficiency is lower, and the availability and the reliability of manual operation are low are solved.
Drawings
FIG. 1 is a flow chart of a method for switching a distributed database according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of a distributed database switching device in an embodiment of the present application;
FIG. 3 is a schematic diagram of a distributed database switching system according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a distributed database switching device in an embodiment of the present application.
Detailed Description
In order to make the present application solution better understood by those skilled in the art, the following description will clearly and completely describe the technical solution in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
The application designs a distributed database switching method, a device, a system, equipment and a storage medium, which solve the technical problems that the current switching mode has influence on the execution of the service in the switching process, the efficiency is low, and the availability and the reliability of manual operation are low.
For ease of understanding, referring to fig. 1, fig. 1 is a flowchart of a method for switching a distributed database according to an embodiment of the present application, as shown in fig. 1, specifically:
s1, receiving a node switching request, and acquiring a management node ip of a target machine room and an id of a service component according to the node switching request;
it should be noted that, in general, the node switching request is received by entering the management node ip of the target machine room and the id of the service component.
S2, switching the master management node to the management node ip according to the management node ip of the target machine room;
it should be noted that, first, the switching of the master management node is performed, and the master management node is switched according to the management node ip of the target machine room included in the node switching request.
S3, after the management node is switched, sending a node switching notification to the service component, and acquiring service information of the service component switching;
it should be noted that, the service component corresponding node includes a global transaction node and a data node, after the management node is switched, the service component receives a node switching notification, and the service component returns switched service information.
And S4, sending the service information to the computing node through the master management node, so that the computing node continues to execute the executing transaction in the service information and caches the new transaction in the service information until the service component node is switched, and the computing node issues the cached new transaction in the service information to the new node of the service component.
It should be noted that, the computing node obtains the service information sent by the master management node, the computing node ensures that the service transaction being executed continues to be executed, and caches the new transaction in the service information until the node switching of the service component is completed, and then issues the new transaction in the cached service information to the new node, thereby ensuring the normal operation of the service.
Further, step S1 includes:
performing environment inspection according to the node switching request, and executing the skipped cluster when the cluster which does not meet the preset requirement exists in the environment;
if the check is passed, the step S2 is continuously executed, otherwise, a refusal switching notification is returned.
It should be noted that, the environment inspection is performed according to the node switching request, if the environment inspection passes, the master management node is notified to perform switching, if an unsatisfactory cluster exists in the environment, the cluster can be skipped, and the normal operation of switching is preferentially ensured.
Further, before step S4, the method further includes:
and the service component determines an optimal new node according to the metadata information recorded in the main management node and switches to the new node.
It should be noted that, the service component selects the optimal node to switch according to the recorded metadata information, including consistency copy, synchronization delay, and the like, so as to ensure that the switching time is shortest.
Further, step S4 further includes:
and sending a node switching notification to other related components so that the other related components are switched to the new node.
It should be noted that, other components, such as big data components, are notified to switch, and the service operation is not affected in the switching process of the components.
Further, step S4 further includes:
and recording the front-back switching information of the main management node and the business component.
It should be noted that, in the switching process, the front and back switching information of the main management node and the service component is recorded, so that the subsequent back switching is facilitated.
Further, the ids of the business components include the ids of the global transaction nodes and the ids of the data nodes.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a distributed database switching device according to an embodiment of the present application, and as shown in fig. 2, the structure specifically includes:
a receiving unit 201, configured to receive a node switching request, and obtain a management node ip of a target machine room and an id of a service component according to the node switching request;
a management switching unit 202, configured to switch a master management node to a management node ip according to the management node ip of the target machine room;
a first sending unit 203, configured to send a node switching notification to a service component after the management node switching is completed, and obtain service information of the service component switching;
the second sending unit 204 is configured to send, by the master management node, the service information to the computing node, so that the computing node continues to execute the executing transaction in the service information, and caches the new transaction in the service information, until the service component node finishes switching, and the computing node issues the cached new transaction in the service information to the new node of the service component.
Further, the receiving unit is further configured to:
performing environment inspection according to the node switching request, and executing the skipped cluster when the cluster which does not meet the preset requirement exists in the environment;
if the check is passed, the step S2 is continuously executed, otherwise, a refusal switching notification is returned.
Further, the method further comprises the following steps:
and the service component determines an optimal new node according to the metadata information recorded in the main management node and switches to the new node.
Further, the method further comprises the following steps:
and the third sending unit is used for sending a node switching notification to other related components so that the other related components are switched to the new node.
Further, the method further comprises the following steps:
and the recording unit is used for recording the front-back switching information of the master management node and the business component.
Further, the ids of the business components include the ids of the global transaction nodes and the ids of the data nodes.
As shown in fig. 3, the embodiment of the present application further provides a distributed database switching system, including a distributed database switching device 301, a management node 302, a service component 303, and a computing node 304 in the embodiment of the present application;
wherein the distributed database switching device 301 includes:
the receiving unit is used for receiving the node switching request and acquiring the management node ip of the target machine room and the id of the service component according to the node switching request;
the management switching unit is used for switching the master management node to the management node ip according to the management node ip of the target machine room;
the first sending unit is used for sending a node switching notification to the service component after the management node switching is completed and obtaining service information of the service component switching;
and the second sending unit is used for sending the service information to the computing node through the master management node, so that the computing node continues to execute the executing transaction in the service information and caches the new transaction in the service information until the service component node is switched to be finished, and the computing node issues the cached new transaction in the service information to the new node of the service component.
The embodiment of the present application further provides another distributed database switching device, as shown in fig. 4, for convenience of explanation, only the portion relevant to the embodiment of the present application is shown, and specific technical details are not disclosed, please refer to the method portion of the embodiment of the present application. The terminal can be any terminal equipment including a mobile phone, a tablet personal computer, a personal digital assistant (English full name: personal DigitalAssistant, english abbreviation: PDA), a sales terminal (English full name: point of sales, english abbreviation: POS), a vehicle-mounted computer and the like, taking the mobile phone as an example of the terminal:
fig. 4 is a block diagram showing a part of a structure of a mobile phone related to a terminal provided in an embodiment of the present application. Referring to fig. 4, the mobile phone includes: radio Frequency (RF) circuit 1010, memory 1020, input unit 1030, display unit 1040, sensor 1050, audio circuit 1060, wireless fidelity (wireless fidelity, wiFi) module 1070, processor 1080, and power source 1090. Those skilled in the art will appreciate that the handset configuration shown in fig. 4 is not limiting of the handset and may include more or fewer components than shown, or may combine certain components, or may be arranged in a different arrangement of components.
The following describes the components of the mobile phone in detail with reference to fig. 4:
the RF circuit 1010 may be used for receiving and transmitting signals during a message or a call, and particularly, after receiving downlink information of a base station, the signal is processed by the processor 1080; in addition, the data of the design uplink is sent to the base station. Generally, RF circuitry 1010 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (English full name: lowNoiseAmplifier, english abbreviation: LNA), a duplexer, and the like. In addition, the RF circuitry 1010 may also communicate with networks and other devices via wireless communications. The wireless communication may use any communication standard or protocol, including but not limited to global system for mobile communications (english: global System ofMobile communication, english: GSM), general packet radio service (english: generalPacket Radio Service, GPRS), code division multiple access (english: code Division Multiple Access, english: CDMA), wideband code division multiple access (english: wideband Code DivisionMultipleAccess, english: WCDMA), long term evolution (english: long TermEvolution, english: LTE), email, short message service (english: shortMessaging Service, SMS), and the like.
The memory 1020 may be used to store software programs and modules that the processor 1080 performs various functional applications and data processing of the handset by executing the software programs and modules stored in the memory 1020. The memory 1020 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data (such as audio data, phonebook, etc.) created according to the use of the handset, etc. In addition, memory 1020 may include high-speed random access memory and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state memory device.
The input unit 1030 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the handset. In particular, the input unit 1030 may include a touch panel 1031 and other input devices 1032. The touch panel 1031, also referred to as a touch screen, may collect touch operations thereon or thereabout by a user (e.g., operations of the user on the touch panel 1031 or thereabout using any suitable object or accessory such as a finger, stylus, etc.), and drive the corresponding connection device according to a predetermined program. Alternatively, the touch panel 1031 may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch azimuth of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device and converts it into touch point coordinates, which are then sent to the processor 1080 and can receive commands from the processor 1080 and execute them. Further, the touch panel 1031 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. The input unit 1030 may include other input devices 1032 in addition to the touch panel 1031. In particular, other input devices 1032 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a track ball, a mouse, a joystick, etc.
The display unit 1040 may be used to display information input by a user or information provided to the user and various menus of the mobile phone. The display unit 1040 may include a display panel 1041, and alternatively, the display panel 1041 may be configured in the form of a liquid crystal display (english full name: liquid Crystal Display, acronym: LCD), an Organic Light-Emitting Diode (OLED), or the like. Further, the touch panel 1031 may overlay the display panel 1041, and when the touch panel 1031 detects a touch operation thereon or thereabout, the touch panel is transferred to the processor 1080 to determine a type of touch event, and then the processor 1080 provides a corresponding visual output on the display panel 1041 according to the type of touch event. Although in fig. 4, the touch panel 1031 and the display panel 1041 are two independent components for implementing the input and output functions of the mobile phone, in some embodiments, the touch panel 1031 and the display panel 1041 may be integrated to implement the input and output functions of the mobile phone.
The handset may also include at least one sensor 1050, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 1041 according to the brightness of ambient light, and the proximity sensor may turn off the display panel 1041 and/or the backlight when the mobile phone moves to the ear. As one of the motion sensors, the accelerometer sensor can detect the acceleration in all directions (generally three axes), and can detect the gravity and direction when stationary, and can be used for applications of recognizing the gesture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer and knocking), and the like; other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc. that may also be configured with the handset are not described in detail herein.
Audio circuitry 1060, a speaker 1061, and a microphone 1062 may provide an audio interface between a user and a cell phone. Audio circuit 1060 may transmit the received electrical signal after audio data conversion to speaker 1061 for conversion by speaker 1061 into an audio signal output; on the other hand, microphone 1062 converts the collected sound signals into electrical signals, which are received by audio circuit 1060 and converted into audio data, which are processed by audio data output processor 1080 for transmission to, for example, another cell phone via RF circuit 1010 or for output to memory 1020 for further processing.
WiFi belongs to a short-distance wireless transmission technology, and a mobile phone can help a user to send and receive emails, browse webpages, access streaming media and the like through a WiFi module 1070, so that wireless broadband Internet access is provided for the user. Although fig. 4 shows a WiFi module 1070, it is understood that it does not belong to the necessary constitution of the handset, and can be omitted entirely as required within the scope of not changing the essence of the invention.
Processor 1080 is the control center of the handset, connects the various parts of the entire handset using various interfaces and lines, and performs various functions and processes of the handset by running or executing software programs and/or modules stored in memory 1020, and invoking data stored in memory 1020, thereby performing overall monitoring of the handset. Optionally, processor 1080 may include one or more processing units; preferably, processor 1080 may integrate an application processor primarily handling operating systems, user interfaces, applications, etc., with a modem processor primarily handling wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 1080.
The handset further includes a power source 1090 (e.g., a battery) for powering the various components, which may preferably be logically connected to the processor 1080 by a power management system, such as to provide for managing charging, discharging, and power consumption by the power management system.
Although not shown, the mobile phone may further include a camera, a bluetooth module, etc., which will not be described herein.
In the embodiment of the present application, the processor 1080 included in the terminal further has the following functions:
s1, receiving a node switching request, and acquiring a management node ip of a target machine room and an id of a service component according to the node switching request;
s2, switching the master management node to the management node ip according to the management node ip of the target machine room;
s3, after the management node is switched, sending a node switching notification to the service component, and acquiring service information of the service component switching;
and S4, sending the service information to the computing node through the master management node, so that the computing node continues to execute the executing transaction in the service information and caches the new transaction in the service information until the service component node is switched, and the computing node issues the cached new transaction in the service information to the new node of the service component.
The present embodiments also provide a computer readable storage medium for storing program code for performing any one of the foregoing distributed database switching methods of the respective embodiments.
In the embodiment of the application, a method, a device, a system, equipment and a storage medium for switching a distributed database are provided, the switching of a master management node is performed by acquiring the management node id of a target machine room, and meanwhile, according to metadata information recorded by the master management node, an optimal new node of a service component is determined, so that the shortest switching time is ensured, a new transaction to be executed is cached in the switching process of the service component, the running error and stable running of the service component are avoided, the technical problems that the current switching mode has influence on the execution of the service in the switching process, the efficiency is lower, and the availability and reliability of manual operation are low are solved.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein.
The terms "first," "second," "third," "fourth," and the like in the description of the present application and in the above-described figures, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that embodiments of the present application described herein may be capable of operation in sequences other than those illustrated or described herein, for example. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be understood that in this application, "at least one" means one or more, and "a plurality" means two or more. "and/or" for describing the association relationship of the association object, the representation may have three relationships, for example, "a and/or B" may represent: only a, only B and both a and B are present, wherein a, B may be singular or plural. The character "/" generally indicates that the context-dependent object is an "or" relationship. "at least one of" or the like means any combination of these items, including any combination of single item(s) or plural items(s). For example, at least one (one) of a, b or c may represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", wherein a, b, c may be single or plural.
In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: u disk, mobile hard disk, read-Only Memory (ROM), random access Memory (RandomAccess Memory, RAM), magnetic disk or optical disk, etc.
The above embodiments are merely for illustrating the technical solution of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the corresponding technical solutions.

Claims (10)

1. A distributed database switching method, comprising:
s1, receiving a node switching request, and acquiring a management node ip of a target machine room and an id of a service component according to the node switching request;
s2, switching a master management node to the management node ip according to the management node ip of the target machine room;
s3, after the management node is switched, sending a node switching notification to the service component, and acquiring service information of the service component switching;
s4, sending the service information to a computing node through the master management node, enabling the computing node to continue to execute the executing transaction in the service information and buffer the new transaction in the service information until the service component node is switched, and sending the buffered new transaction in the service information to the new node of the service component by the computing node.
2. The distributed database switching method according to claim 1, wherein the step S1 includes:
performing environment inspection according to the node switching request, and executing the skipped cluster when the cluster which does not meet the preset requirement exists in the environment;
if the check is passed, the step S2 is continuously executed, otherwise, a refusal switching notification is returned.
3. The distributed database switching method according to claim 1, wherein the step S4 is preceded by:
and the service component determines an optimal new node according to the metadata information recorded in the master management node and switches to the new node.
4. The distributed database switching method according to claim 1, wherein the step S4 further comprises:
and sending a node switching notification to other related components so that the other related components are switched to the new node.
5. The distributed database switching method according to claim 1, wherein the step S4 further comprises:
and recording the front-back switching information of the main management node and the business component.
6. The distributed database switching method of claim 1, wherein the ids of the business components include an id of a global transaction node and an id of a data node.
7. A distributed database switching apparatus, comprising:
the receiving unit is used for receiving a node switching request and acquiring a management node ip of a target machine room and an id of a service component according to the node switching request;
the management switching unit is used for switching the master management node to the management node ip according to the management node ip of the target machine room;
the first sending unit is used for sending a node switching notification to the service component after the management node switching is completed and obtaining service information of the service component switching;
and the second sending unit is used for sending the service information to a computing node through the master management node, so that the computing node continuously executes the executing transaction in the service information and caches the new transaction in the service information until the service component node is switched, and the computing node issues the cached new transaction in the service information to the new node of the service component.
8. A distributed database switching system comprising the distributed database switching apparatus of claim 7, further comprising a management node, a service component, and a computing node;
wherein, distributed database auto-change over device includes:
the receiving unit is used for receiving a node switching request and acquiring a management node ip of a target machine room and an id of a service component according to the node switching request;
the management switching unit is used for switching the master management node to the management node ip according to the management node ip of the target machine room;
the first sending unit is used for sending a node switching notification to the service component after the management node switching is completed and obtaining service information of the service component switching;
and the second sending unit is used for sending the service information to a computing node through the master management node, so that the computing node continuously executes the executing transaction in the service information and caches the new transaction in the service information until the service component node is switched, and the computing node issues the cached new transaction in the service information to the new node of the service component.
9. A distributed database switching device, the device comprising a processor and a memory:
the memory is used for storing program codes and transmitting the program codes to the processor;
the processor is configured to perform the distributed database switching method of any of claims 1-6 according to instructions in the program code.
10. A computer readable storage medium, characterized in that the computer readable storage medium is for storing a program code for performing the distributed database switching method of any of claims 1-6.
CN202311505749.7A 2023-11-13 2023-11-13 Distributed database switching method, device, system, equipment and storage medium Pending CN117688085A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311505749.7A CN117688085A (en) 2023-11-13 2023-11-13 Distributed database switching method, device, system, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311505749.7A CN117688085A (en) 2023-11-13 2023-11-13 Distributed database switching method, device, system, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117688085A true CN117688085A (en) 2024-03-12

Family

ID=90125373

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311505749.7A Pending CN117688085A (en) 2023-11-13 2023-11-13 Distributed database switching method, device, system, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117688085A (en)

Similar Documents

Publication Publication Date Title
CN104518953B (en) Method for deleting message, instant communication terminal and system
CN109309696B (en) Folder transmission method, sender, receiver, and storage medium
CN110620822A (en) Network element determination method and device
WO2018120905A1 (en) Message reminding method for terminal, and terminal
CN110569078B (en) Method and device for preloading webpage-level program
CN106484326B (en) A kind of data transmission processing method and mobile terminal
JP6915074B2 (en) Message notification method and terminal
CN110602766B (en) Personal hotspot identification method and method for determining association relationship between terminals
CN116468382A (en) RPA robot flow management method, device, equipment and storage medium
CN108804434B (en) Message query method, server and terminal equipment
CN115794654A (en) Test case distribution processing method, system, equipment and storage medium
CN104717283A (en) File downloading control method, terminal and logic processing server
CN115065609A (en) B-end SaaS system hybrid deployment method and system
CN110109788B (en) Multi-key detection method and device, electronic equipment and storage medium
CN112214699B (en) Page processing method and related device
CN109582240B (en) Data moving method and related equipment thereof
CN117688085A (en) Distributed database switching method, device, system, equipment and storage medium
CN106657278B (en) Data transmission method and device and computer equipment
CN106358070B (en) Multimedia file uploading method and device
CN111382335B (en) Data pulling method and device and storage medium
CN112199245B (en) Mobile terminal screen detection method, system, storage medium and mobile terminal
CN110290424B (en) Audio and video source preview method and related device
CN112083887B (en) Data processing method and related equipment
CN112199049B (en) Fingerprint storage method, fingerprint storage device and terminal
CN116382945A (en) Card making processing method, system, equipment and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination