CN114201549B - Switching method, system, server and storage medium - Google Patents
Switching method, system, server and storage medium Download PDFInfo
- Publication number
- CN114201549B CN114201549B CN202010981740.3A CN202010981740A CN114201549B CN 114201549 B CN114201549 B CN 114201549B CN 202010981740 A CN202010981740 A CN 202010981740A CN 114201549 B CN114201549 B CN 114201549B
- Authority
- CN
- China
- Prior art keywords
- data node
- node
- service
- main data
- stopping
- 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.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/23—Updating
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/23—Updating
- G06F16/2365—Ensuring data consistency and integrity
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Computer Security & Cryptography (AREA)
- Hardware Redundancy (AREA)
Abstract
The embodiment of the application relates to the field of distributed databases and discloses a switching method, a switching system, a server and a storage medium. In the method, a request for stopping the service of the computing node is sent to the computing node, a request for stopping the service of the main data node is sent to the main data node, a response sent by the computing node for stopping the service of the computing node and a response sent by the main data node for stopping the service of the main data node are received, and an upgrading request is sent to a slave data node to be upgraded into the main data node.
Description
Technical Field
The embodiment of the application relates to the field of distributed databases, in particular to a switching method, a switching system, a server and a storage medium.
Background
Distributed database systems are the product of the combination of database technology and network technology, and have become an important branch in the field of databases. In a distributed database system, data nodes are in a form of one master and one slave or one master and multiple slaves to ensure stability and high availability of services. When the service capability of the master data node is reduced or limited, in order to ensure the smooth operation of the service on the master data node, the service of the master data node is switched to the slave data node for execution; in the switching process, in order to ensure the consistency of the master data and the slave data, the computing node is prohibited from issuing data to the master data node. However, in the switching process, there may be a case that the computing node is not completely prohibited from issuing data to the main data node, so that a phenomenon of traffic blocking may occur, resulting in a long time consumed for switching and a slow switching speed.
Disclosure of Invention
The embodiments of the present application mainly aim to provide a switching method, a system, a server, and a storage medium, which not only ensure data consistency of a master data node and a slave data node, but also reduce time consumed by switching, and improve switching speed.
In order to achieve the above object, an embodiment of the present application provides a handover method, including: sending a request for stopping the service of the computing node to the computing node, so that the computing node cuts off the connection with a main data node when receiving the request for stopping the service of the computing node; sending a request for stopping the service of the main data node to the main data node, so that the main data node cuts off the connection with the computing node when receiving the request for stopping the service of the main data node; and receiving a response of stopping the service of the computing node sent by the computing node and a response of stopping the service of the main data node sent by the main data node, and sending an upgrading request to a slave data node to be upgraded into the main data node, so that the slave data node is upgraded into a new main data node when receiving the upgrading request.
In order to achieve the above object, an embodiment of the present application further provides a handover method, including: receiving a request for stopping the service of the main data node sent by a cluster manager; if the connection with the computing node is successfully cut off, sending a response of stopping the service of the main data node to the cluster manager, so that the cluster manager sends an upgrading request to a slave data node to be upgraded into the main data node when receiving the response of stopping the service of the computing node and the response of stopping the service of the main data node, which are sent by the computing node after the connection with the main data node is cut off; wherein said disconnecting the connection to the compute node comprises: and disconnecting the computing node with which the connection is established.
In order to achieve the above object, an embodiment of the present application further provides a server, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the handover method described above, and the server is applied to a cluster manager, or the handover method described above is performed, and the server is applied to a primary data node.
To achieve the above object, an embodiment of the present application further provides a computer-readable storage medium storing a computer program, where the computer program is executed by a processor to implement the handover method described above.
The switching method, the system, the server and the storage medium send a request for stopping the service of the computing node to the computing node, the computing node cuts off the connection with the main data node when receiving the request for stopping the service of the computing node, the main data node sends the request for stopping the service of the main data node, the main data node cuts off the connection with the computing node when receiving the request for stopping the service of the main data node, the response sent by the computing node for stopping the service of the computing node and the response sent by the main data node for stopping the service of the main data node are received, the upgrading request is sent to the slave data node to be upgraded into the main data node, the slave data node is upgraded into a new main data node when receiving the upgrading request, due to the fact that the connection between the computing node and the main data node is cut off in a bidirectional mode, the possibility of generating traffic jam is reduced, the main data node can finish the service quickly, the possibility of data consistency of the main data node and the slave data node is improved, the upgrading request can be sent to the slave data node to be upgraded into the main data node quickly, the slave data node, the switching is finished, the switching time is reduced, and the switching speed is improved.
Drawings
Fig. 1 is a flow chart of a handover method according to a first embodiment of the present application;
fig. 2 is a flow chart of a handover method according to a second embodiment of the present application;
fig. 3 is a flow chart of a handover method according to a third embodiment of the present application;
fig. 4 is a schematic structural diagram of a switching system according to a fourth embodiment of the present application;
fig. 5 is a schematic structural diagram of a server according to a fifth embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present application clearer, the embodiments of the present application will be described in detail below with reference to the accompanying drawings. However, it will be appreciated by those of ordinary skill in the art that in the examples of the present application, numerous technical details are set forth in order to provide a better understanding of the present application. However, the technical solution claimed in the present application can be implemented without these technical details and various changes and modifications based on the following embodiments. The following embodiments are divided for convenience of description, and should not constitute any limitation to the specific implementation manner of the present application, and the embodiments may be mutually incorporated and referred to without contradiction.
A first embodiment of the present application relates to a handover method, which is applied to a cluster manager. The specific process is shown in fig. 1, and comprises the following steps:
Specifically, when the cluster manager detects that a user instruction indicates switching between a master data node and a slave data node, or when the cluster manager detects that the service capability of the master data node is reduced or limited, the cluster manager sends a request for stopping the service of the computing node to the computing node manager, and the computing node manager transmits the request for stopping the service of the computing node to the computing node; and when receiving the request for stopping the service of the computing node, the computing node cuts off the connection with the main data node, sends a response of stopping the service of the computing node to the computing node manager, and the computing node manager transmits the response of stopping the service of the computing node to the cluster manager.
And 102, sending a request for stopping the service of the main data node to the main data node, so that the main data node cuts off the connection with the computing node when receiving the request for stopping the service of the main data node.
Specifically, the cluster manager sends a request to the master data node to stop the service of the master data node, and the master data node disconnects the connection with the compute node when receiving the request to stop the service of the master data node, and sends a response to the cluster manager that the service of the compute node has been stopped. In one example, the master data node receives a request sent by the cluster manager to stop the service of the master data node and sends a response to the cluster manager that the service of the compute node has been stopped, through the database monitoring agent of the master data node.
In one example, step 102 is performed before step 101. In one example, step 101 and step 102 are performed simultaneously.
And 103, receiving a response of stopping the service of the computing node sent by the computing node and a response of stopping the service of the main data node sent by the main data node, and sending an upgrading request to a slave data node to be upgraded into the main data node, so that the slave data node is upgraded into a new main data node when receiving the upgrading request.
Specifically, the cluster manager receives a response sent by the computing node from the computing node manager to stop the service of the computing node and receives a response sent by the master data node to stop the service of the master data node, when the cluster manager receives the response sent by the computing node to stop the service of the computing node and the response sent by the master data node to stop the service of the master data node, an upgrade request is sent to the slave data node to be upgraded to the master data node, and the slave data node to be upgraded to the master data node executes a structured query language (sql) command for upgrading to a new master data node, so that the slave data node is upgraded to the new master data node. The new main data node firstly sends a response of successful upgrade to the cluster manager, the cluster manager sends a request for starting the service of the computing node to the computing node manager when receiving the response of successful upgrade, the computing node manager transmits the request for starting the service of the computing node to the computing node, and the computing node establishes connection with the new main data node and recovers transmission of services when receiving the request for starting the service of the computing node; and sending a response of the enabled computing node service to the computing node manager, and transmitting the response of the enabled computing node service to the cluster manager by the computing node manager.
In one example, the new master data node receives an upgrade request sent by the cluster manager and sends a response to the cluster manager of a successful upgrade via the database monitoring agent of the new master data node.
In one example, when receiving a request for stopping the service of the computing node, the computing node sets the fragmentation state of a cluster consisting of a main data node and a slave data node to be in an unavailable state, and cuts off the connection with the main data node; when receiving a request for starting the service of the computing node, the computing node sets the fragmentation state of the cluster to be an available state, establishes connection with a new main data node and recovers transmission of services. By the method, when the computing node receives the request for stopping the computing node service, the possibility of disconnecting the computing node from the main data node can be further improved, and when the computing node receives the request for starting the computing node service, the fragmentation state of the cluster can be rapidly recovered to be the available state.
In this embodiment, the cluster manager sends a request for stopping service of the computing node to the computing node, so that the computing node cuts off connection with the master data node when receiving the request for stopping service of the computing node, sends the request for stopping service of the master data node to the master data node, and allows the master data node to cut off connection with the computing node when receiving the request for stopping service of the master data node, receives a response sent by the computing node for stopping service of the computing node and a response sent by the master data node for stopping service of the master data node, and sends an upgrade request to the slave data node to be upgraded into the master data node, so that the slave data node can be upgraded into a new master data node when receiving the upgrade request.
A second embodiment of the present application relates to a handover method, which is applied to a master data node. The specific process is shown in fig. 2, and includes:
Specifically, when the main data node receives a request sent by the cluster manager for stopping the service of the main data node, the main data node disconnects with the computing node which has established connection, if the disconnection succeeds, the main data node indicates that the main data node successfully cuts off the connection with the computing node, the main data node sends a response of stopping the service of the main data node to the cluster manager, the cluster manager receives the response of stopping the service of the computing node sent by the computing node after cutting off the connection with the main data node and the response of stopping the service of the main data node, sends an upgrade request to a slave data node to be upgraded to the main data node, and the slave data node to be upgraded to the main data node executes a structured query language command for upgrading to a new main data node, so that the slave data node is upgraded to a new main data node.
In one example, the master data node receives a request sent by the cluster manager to stop the service of the master data node and sends a response to the cluster manager that the service of the compute node has been stopped, through the database monitoring agent of the master data node.
In one example, if the connection with the computing node is not successfully disconnected, the running service related to the computing node is terminated through a kill command, and then a response that the service of the main data node is stopped is sent to the cluster manager. Specifically, if the disconnection between the main data node and the computing node which has established connection fails, indicating that the main data node has not successfully disconnected the connection with the computing node, the main data node terminates the running service related to the computing node through a kill command, that is, terminates the process related to the computing node, wherein the kill command may be a kill-9 command or the like; and sending a response of stopping the service of the main data node to the cluster manager, so that the cluster manager sends an upgrading request to a slave data node to be upgraded into the main data node when receiving the response of stopping the service of the main data node and the response of stopping the service of the main data node, which are sent by the computing node after the connection with the main data node is cut off. By the method, the possibility of service blocking can be further reduced, the time consumed by switching can be further reduced, and the switching speed can be improved.
In one example, before sending the response to the cluster manager that the primary data node service has been stopped, the method further comprises: the read-only mode is initiated. Specifically, if the connection with the computing node is successfully cut off, the main data node starts a read-only mode first, and then sends a response that the service of the main data node is stopped to the cluster manager, when the main data node starts the read-only mode, the computing node can only read data and cannot rewrite the data, so that the computing node can be prevented from performing write operation through the unsuccessfully cut-off connection, and the possibility of service blocking is further reduced.
In one example, before sending the response to the cluster manager that the primary data node service has been stopped, the method further comprises: the transaction log is flushed. Specifically, if the connection with the computing node is successfully cut off, the transaction log is refreshed, and then a response that the service of the main data node is stopped is sent to the cluster manager, wherein the main data node executes an sql command for refreshing the transaction log, so that the transaction log is refreshed, executed services are stored in a disk-down mode, and the possibility of data loss before and after switching is reduced.
In one example, before sending the response to the cluster manager that the primary data node service has been stopped, further comprising: the read-only mode is started first, and then the transaction log is refreshed. That is, if the connection with the computing node is successfully cut off, the transaction log is refreshed, then the transaction log is refreshed, and then a response that the service of the master data node is stopped is sent to the cluster manager.
In one example, before sending the response to the cluster manager that the primary data node service has been stopped, the method further comprises: if the read-only mode is not successfully started and/or the transaction log is not successfully refreshed, the service which is operated by a kill command and is related to the computing node is ended, and then a response of sending the service of the stopped main data node to the cluster manager is sent.
In this embodiment, a master data node receives a request for stopping a master data node service, which is sent by a cluster manager; if the connection with the computing node is successfully cut off; wherein disconnecting the connection to the compute node comprises: disconnecting the connection with the computing node which has already established the connection; and sending a response of stopping the service of the main data node to the cluster manager, so that the cluster manager sends an upgrading request to a slave data node to be upgraded into the main data node when receiving the response of stopping the service of the main data node and the response of stopping the service of the main data node sent by the computing node after cutting off the connection with the main data node. Therefore, the connection between the main data node and the computing node can be disconnected, the possibility of service blocking is reduced, the main data node can finish service quickly, the possibility of data consistency of the main data node and the slave data node is improved, an upgrade request can be sent to the slave data node to be upgraded into the main data node quickly, the switching is finished as soon as possible, the time consumed by switching is reduced, and the switching speed is improved.
A third embodiment of the present application relates to a handover method, and the third embodiment is substantially the same as the second embodiment, and mainly differs in that: connection requests sent by computing nodes not yet connected are also rejected. The specific process is shown in fig. 3, and includes:
Specifically, when a main data node receives a request for stopping the service of the main data node, sent by a cluster manager, the main data node disconnects with a computing node which has established connection, and rejects a connection request sent by a computing node which has not established connection, if the connection is successfully disconnected and the connection request sent by the computing node which has not established connection is successfully rejected, indicating that the main data node successfully cuts off the connection with the computing node, the main data node sends a response of stopping the service of the main data node to the cluster manager, the cluster manager receives the response of stopping the service of the computing node and the response of stopping the service of the main data node, sent by the computing node after cutting off the connection with the main data node, sends an upgrade request to a slave data node to be upgraded to the main data node, and the slave data node to be upgraded to the main data node executes a structural query language command for upgrading to a new main data node, so as to be upgraded to a new main data node.
In one example, rejecting a connection request sent by a computing node that has not established a connection comprises: and stopping monitoring the transmission control protocol TCP connection request sent by the computing node which does not establish the connection. Specifically, the main data node executes the sql command for stopping port monitoring, so as to stop monitoring the TCP connection request sent by the computing node which has not established a connection, and more conveniently reject the connection request sent by the computing node which has not established a connection.
In one example, the master data node receives a request sent by the cluster manager to stop the service of the master data node and sends a response to the cluster manager that the service of the compute node has been stopped, through the database monitoring agent of the master data node.
In one example, if the connection with the compute node is not successfully severed, the running services associated with the compute node are terminated via a kill command, and a response is entered to send the cluster manager a response that the service of the master data node has been stopped.
In one example, before sending the response to the cluster manager that the primary data node service has been stopped, the method further comprises: the read-only mode is initiated.
In one example, before sending the response to the cluster manager that the primary data node service has been stopped, further comprising: the transaction log is flushed.
In one example, before sending the response to the cluster manager that the primary data node service has been stopped, the method further comprises: the read-only mode is started first, and then the transaction log is refreshed.
In one example, before sending the response to the cluster manager that the primary data node service has been stopped, the method further comprises: if the read-only mode is not successfully started and/or the transaction log is not successfully refreshed, the service which is operated by a kill command and is related to the computing node is ended, and then a response of sending the service of the stopped main data node to the cluster manager is sent.
In this embodiment, the master data node may not only disconnect from the computing node that has already established a connection, but also reject a connection request sent by a computing node that has not yet established a connection, that is, avoid a new connection between the master data node and the computing node, so that a situation of performing a write operation on the master data node through the new connection may further improve a possibility of master-slave data consistency and further reduce a possibility of service blocking.
The steps of the above methods are divided for clarity, and the implementation may be combined into one step or split some steps, and the steps are divided into multiple steps, so long as the same logical relationship is included, which are all within the protection scope of the present patent; it is within the scope of this patent to add insignificant modifications or introduce insignificant designs to the algorithms or processes, but not to change the core designs of the algorithms and processes.
A fourth embodiment of the present application relates to a handover system, as shown in fig. 4, including: the cluster system comprises a cluster manager 401, a computing node 402, a master data node 403 and a slave data node 404 to be upgraded to the master data node;
The computing node 402 is configured to disconnect the master data node 403 when receiving the request for stopping the service of the computing node, and send a response to the cluster manager 401 that the service of the computing node has been stopped.
The master data node 403 is configured to disconnect the computing node 402 upon receiving the request to stop the master data node service, and send 401 a response to the cluster manager that the master data node service has been stopped.
The cluster manager 401 is further configured to receive a response sent by the computing node 402 to stop the service of the computing node and a response sent by the master data node 403 to stop the service of the master data node, and send an upgrade request to the slave data node 404 to be upgraded as the master data node.
The slave data node 404 to be upgraded to the master data node is configured to be upgraded to a new master data node upon receiving the upgrade request.
In one example, a master data node disconnects from a compute node, including: and disconnecting the computing node with which the connection is established.
In one example, a master data node disconnects from a compute node, including: the main data node is disconnected from the computing nodes which have established connection, and the main data node rejects the connection request sent by the computing nodes which have not established connection.
In one example, the method for rejecting the connection request sent by the computing node which has not established the connection by the master data node comprises the following steps: the main data node stops listening for TCP connection requests sent by the computing nodes which have not established connection.
In one example, before the master data node sends a response to the cluster manager that the master data node service has stopped, further comprising: the primary data node initiates a read-only mode.
In one example, before the master data node sends a response to the cluster manager that the master data node service has stopped, further comprising: the master data node flushes the transaction log.
In one example, after the master data node receives the request sent by the cluster manager to stop the service of the master data node, the method further includes: if the connection with the computing node is not successfully cut off, the main data node terminates the running service related to the computing node through a kill command, and then enters a response of sending the stopped main data node service to the cluster manager.
It should be understood that the present embodiment is a system embodiment corresponding to the first embodiment, and the present embodiment can be implemented in cooperation with the first embodiment. The related technical details mentioned in the first embodiment are still valid in this embodiment, and are not described herein again in order to reduce repetition. Accordingly, the related-art details mentioned in the present embodiment can also be applied to the first embodiment.
A fifth embodiment of the present application is directed to a server, as shown in fig. 5, comprising at least one processor 502; and, a memory 501 communicatively coupled to the at least one processor; wherein the memory 501 stores instructions executable by the at least one processor 502, the instructions being executable by the at least one processor 502 to enable the at least one processor to perform the switching method of the first embodiment, the server being applied to the cluster manager, or to perform the switching method of the second and third embodiments, the server being applied to the primary data node.
The memory 501 and the processor 502 are coupled by a bus, which may include any number of interconnected buses and bridges that couple one or more of the various circuits of the processor 502 and the memory 501. The bus may also connect various other circuits such as peripherals, voltage regulators, power management circuits, and the like, which are well known in the art, and therefore, will not be described any further herein. A bus interface provides an interface between the bus and the transceiver. The transceiver may be one element or a plurality of elements, such as a plurality of receivers and transmitters, providing a means for communicating with various other apparatus over a transmission medium. Data processed by processor 502 may be transmitted over a wireless medium through an antenna, which may receive the data and transmit the data to processor 502.
The processor 502 is responsible for managing the bus and general processing and may also provide various functions including timing, peripheral interfaces, voltage regulation, power management, and other control functions. While memory 501 may be used to store data used by processor 502 in performing operations.
A sixth embodiment of the present invention relates to a computer-readable storage medium storing a computer program. The computer program realizes the above-described method embodiments when executed by a processor.
That is, as can be understood by those skilled in the art, all or part of the steps in the method for implementing the embodiments described above may be implemented by a program instructing related hardware, where the program is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, or the like) or a processor (processor) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It will be understood by those of ordinary skill in the art that the foregoing embodiments are specific to implementations of the invention, and that various changes in form and detail may be made therein without departing from the spirit and scope of the invention in practice.
Claims (10)
1. A method of handover, comprising:
sending a request for stopping the service of the computing node to the computing node, so that the computing node cuts off the connection with a main data node when receiving the request for stopping the service of the computing node;
sending a request for stopping the service of the main data node to the main data node, so that the main data node cuts off the connection with the computing node when receiving the request for stopping the service of the main data node;
and receiving a response of stopping the service of the computing node sent by the computing node and a response of stopping the service of the main data node sent by the main data node, and sending an upgrading request to a slave data node to be upgraded into the main data node, so that the slave data node is upgraded into a new main data node when receiving the upgrading request.
2. A method of handover, comprising:
receiving a request for stopping the service of the main data node sent by a cluster manager;
if the connection with the computing node is successfully cut off, sending a response of stopping the service of the main data node to the cluster manager, so that the cluster manager sends an upgrading request to a slave data node to be upgraded into the main data node when receiving the response of stopping the service of the computing node and the response of stopping the service of the main data node, which are sent by the computing node after the connection with the main data node is cut off; wherein said disconnecting the connection to the compute node comprises: and disconnecting the computing node with which the connection is established.
3. The handover method according to claim 2, wherein the disconnecting the connection to the computing node further comprises:
and rejecting the connection request sent by the computing node which does not establish the connection.
4. The handover method according to claim 3, wherein the rejecting the connection request sent by the computing node that has not established a connection comprises:
and stopping monitoring the transmission control protocol TCP connection request sent by the computing node which does not establish the connection.
5. The switchover method of any one of claims 2 to 4, further comprising, before said sending a response to the cluster manager that the primary data node service has been stopped:
the read-only mode is initiated.
6. The switchover method of any one of claims 2 to 4, further comprising, before said sending a response to the cluster manager that the primary data node service has been stopped:
the transaction log is flushed.
7. The switching method according to claim 2, wherein after receiving the request sent by the cluster manager to stop the service of the primary data node, the method further comprises:
if the connection with the computing node is not successfully cut off, the service which is operated finally through a kill command and is related to the computing node enters the response of sending the stopped main data node service to the cluster manager.
8. A handover system, comprising: the cluster system comprises a cluster manager, a computing node, a master data node and a slave data node to be upgraded into the master data node;
the cluster manager is used for sending a request for stopping the service of the computing node to the computing node and sending a request for stopping the service of the main data node to the main data node;
the computing node is used for cutting off the connection with the main data node when receiving the request for stopping the service of the computing node, and sending a response of stopping the service of the computing node to the cluster manager;
the main data node is used for cutting off the connection with the computing node when receiving the request for stopping the service of the main data node, and sending a response that the service of the main data node is stopped to the cluster manager;
the cluster manager is further configured to receive a response sent by the compute node to stop the compute node service and a response sent by the master data node to stop the master data node service, and send an upgrade request to a slave data node to be upgraded into a master data node;
and the slave data node to be upgraded into the master data node is used for upgrading into a new master data node when receiving the upgrading request.
9. A server, comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the handover method of claim 1, the server being for use in a cluster manager, or the handover method of any one of claims 2 to 7, the server being for use in a primary data node.
10. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the handover method of claim 1 or implements the handover method of any one of claims 2 to 7.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010981740.3A CN114201549B (en) | 2020-09-17 | 2020-09-17 | Switching method, system, server and storage medium |
PCT/CN2021/113587 WO2022057561A1 (en) | 2020-09-17 | 2021-08-19 | Switching method, system, server, and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010981740.3A CN114201549B (en) | 2020-09-17 | 2020-09-17 | Switching method, system, server and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114201549A CN114201549A (en) | 2022-03-18 |
CN114201549B true CN114201549B (en) | 2022-11-25 |
Family
ID=80644860
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010981740.3A Active CN114201549B (en) | 2020-09-17 | 2020-09-17 | Switching method, system, server and storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN114201549B (en) |
WO (1) | WO2022057561A1 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117573656B (en) * | 2024-01-16 | 2024-04-12 | 浙江智臾科技有限公司 | Database upgrading method, electronic equipment and readable storage medium |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101729346A (en) * | 2008-10-15 | 2010-06-09 | 雅马哈株式会社 | Network system and audio signal processor |
CN104618127A (en) * | 2013-11-01 | 2015-05-13 | 深圳市腾讯计算机系统有限公司 | Master and standby storage node switching method and system |
CN107295080A (en) * | 2017-06-19 | 2017-10-24 | 北京百度网讯科技有限公司 | Date storage method and server applied to distributed server cluster |
CN108667641A (en) * | 2017-03-30 | 2018-10-16 | 杭州海康威视数字技术股份有限公司 | Distributed system upgrade method, distributed system and updating and management equipment |
CN108984569A (en) * | 2017-06-05 | 2018-12-11 | 中兴通讯股份有限公司 | Database switching method, system and computer readable storage medium |
CN109213507A (en) * | 2018-08-27 | 2019-01-15 | 郑州云海信息技术有限公司 | A kind of upgrade method and server |
CN110019529A (en) * | 2017-12-29 | 2019-07-16 | 华为技术有限公司 | Management method, system and the relevant device of back end |
CN110879718A (en) * | 2019-11-15 | 2020-03-13 | 北京浪潮数据技术有限公司 | maridb upgrading method and device, electronic equipment and storage medium |
CN111460429A (en) * | 2020-03-30 | 2020-07-28 | 北京百度网讯科技有限公司 | Task processing method, device, equipment and medium based on trusted execution environment |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108763312B (en) * | 2018-04-26 | 2021-07-06 | 大连理工大学 | Slave data node screening method based on load |
CN110209405B (en) * | 2019-06-04 | 2023-06-16 | 杭州安恒信息技术股份有限公司 | Automatic upgrading method and device for distributed system |
CN110659262A (en) * | 2019-09-20 | 2020-01-07 | 聚好看科技股份有限公司 | Master-slave switching method and device for redis node |
-
2020
- 2020-09-17 CN CN202010981740.3A patent/CN114201549B/en active Active
-
2021
- 2021-08-19 WO PCT/CN2021/113587 patent/WO2022057561A1/en active Application Filing
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101729346A (en) * | 2008-10-15 | 2010-06-09 | 雅马哈株式会社 | Network system and audio signal processor |
CN104618127A (en) * | 2013-11-01 | 2015-05-13 | 深圳市腾讯计算机系统有限公司 | Master and standby storage node switching method and system |
CN108667641A (en) * | 2017-03-30 | 2018-10-16 | 杭州海康威视数字技术股份有限公司 | Distributed system upgrade method, distributed system and updating and management equipment |
CN108984569A (en) * | 2017-06-05 | 2018-12-11 | 中兴通讯股份有限公司 | Database switching method, system and computer readable storage medium |
CN107295080A (en) * | 2017-06-19 | 2017-10-24 | 北京百度网讯科技有限公司 | Date storage method and server applied to distributed server cluster |
CN110019529A (en) * | 2017-12-29 | 2019-07-16 | 华为技术有限公司 | Management method, system and the relevant device of back end |
CN109213507A (en) * | 2018-08-27 | 2019-01-15 | 郑州云海信息技术有限公司 | A kind of upgrade method and server |
CN110879718A (en) * | 2019-11-15 | 2020-03-13 | 北京浪潮数据技术有限公司 | maridb upgrading method and device, electronic equipment and storage medium |
CN111460429A (en) * | 2020-03-30 | 2020-07-28 | 北京百度网讯科技有限公司 | Task processing method, device, equipment and medium based on trusted execution environment |
Also Published As
Publication number | Publication date |
---|---|
CN114201549A (en) | 2022-03-18 |
WO2022057561A1 (en) | 2022-03-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US5953719A (en) | Heterogeneous database system with dynamic commit procedure control | |
CN107181637B (en) | Heartbeat information sending method and device and heartbeat sending node | |
US20050235019A1 (en) | Method and system for transmitting data for data synchronization between server and client when data synchronization session was abnormally terminated | |
CN112671928B (en) | Equipment centralized management architecture, load balancing method, electronic equipment and storage medium | |
CN105677380B (en) | Method and device for board-by-board upgrading of double master control isolations | |
CN109189851B (en) | Data access method, database equipment and master-slave database instance system | |
CN110880998B (en) | Message transmission method and device based on programmable device | |
US20200293220A1 (en) | Log processing method, and related device and system | |
CN114201549B (en) | Switching method, system, server and storage medium | |
JP2009251786A (en) | Data processing method, storage apparatus, and storage system | |
CN113726581B (en) | Method and device for restoring factory configuration of network equipment and network equipment | |
CN110958139B (en) | Network control method, orchestrator, controller, and computer-readable storage medium | |
CN112328560A (en) | File scheduling method and system | |
CN112491951A (en) | Request processing method, server and storage medium in peer-to-peer network | |
CN112714181A (en) | Data transmission method and device | |
KR100492167B1 (en) | Shared-nothing database cluster server system and On-line scaling method | |
CN113032477A (en) | Long-distance data synchronization method and device based on GTID and computing equipment | |
KR100194773B1 (en) | Data consistency control method between mobile data processing system and mobile terminal | |
CN112118118B (en) | Method and device for broadcasting instruction notification message based on inverse entropy algorithm | |
US20050281258A1 (en) | Address translation program, program utilizing method, information processing device and readable-by-computer medium | |
CN112769640B (en) | Process communication method, system, server and storage medium | |
CN111216134B (en) | Robot control method, device, controller, storage medium and robot | |
WO2023185267A1 (en) | Microservice management method, electronic device, and computer readable storage medium | |
CN117725100A (en) | Database master-slave switching method, system, equipment and storage medium | |
WO2021072967A1 (en) | Method and device for managing configuration information |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |