CN111142921A - Software upgrading method and device - Google Patents

Software upgrading method and device Download PDF

Info

Publication number
CN111142921A
CN111142921A CN201811300532.1A CN201811300532A CN111142921A CN 111142921 A CN111142921 A CN 111142921A CN 201811300532 A CN201811300532 A CN 201811300532A CN 111142921 A CN111142921 A CN 111142921A
Authority
CN
China
Prior art keywords
node
database
controlling
upgrading
upgraded
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
CN201811300532.1A
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.)
TD Tech Chengdu Co Ltd
Chengdu TD Tech Ltd
Original Assignee
Chengdu TD Tech 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 Chengdu TD Tech Ltd filed Critical Chengdu TD Tech Ltd
Priority to CN201811300532.1A priority Critical patent/CN111142921A/en
Publication of CN111142921A publication Critical patent/CN111142921A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/658Incremental updates; Differential updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • G06F11/1469Backup restoration techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1471Saving, restoring, recovering or retrying involving logging of persistent data for recovery

Abstract

The invention provides a software upgrading method and a device, wherein the method comprises the following steps of controlling a first node to carry out software upgrading according to an upgrading instruction, so that a database after the first node is upgraded comprises: the table entry of the database before the first node is upgraded; controlling a second node to process system service in the upgrading process of the first node according to a service instruction to generate service data; and after the upgrading of the first node is completed, controlling the second node to synchronize the service data to the first node. The method can keep the service data generated in the node upgrading process and ensure the normal processing of the system service.

Description

Software upgrading method and device
Technical Field
The present invention relates to software technologies, and in particular, to a method and an apparatus for upgrading software.
Background
The main and standby disaster recovery clusters are generally applied to a system with a high requirement on reliability, and the service of the whole system can be ensured not to be interrupted when a single point of failure occurs in the system. The technology is widely applied to the fields of computers, communication and the like.
In the main and standby disaster recovery clusters, there are usually a plurality of nodes, and when a node in the main and standby disaster recovery clusters is upgraded, one node is usually upgraded first, and when the one node is upgraded, another node can continue to provide services. Therefore, the system service can be ensured not to be interrupted in the upgrading process.
During the upgrade process of the node, the structure of the database of the upgrade node may be changed, for example, the entry of the database may be deleted, so that the service data generated at the node providing the service is difficult to synchronize to the upgrade node. That is, the service data generated during the node upgrade process cannot be retained, so that the related system service cannot be processed normally.
Disclosure of Invention
The invention provides a software upgrading method and device, which are used for avoiding the situation that service data generated in the node upgrading process cannot be reserved.
The invention provides a software upgrading method, which comprises the following steps:
controlling a first node to carry out software upgrading according to a first upgrading instruction, so that the upgraded database of the first node comprises: the table entry of the database before the first node is upgraded;
according to a first service instruction, controlling a second node to process system service in the upgrading process of a first node to generate service data;
after the upgrade of the first node is completed, controlling the first node to synchronize the service data on the second node to the first node.
Optionally, the table entry included in the database after the first node is upgraded is equal to the table entry in the database before the first node is upgraded;
or;
the database after the first node is upgraded comprises more entries than the database before the first node is upgraded.
Specifically, the controlling the second node to synchronize the service data to the first node includes:
controlling the first node to acquire the database binary log on the second node from the second node and acquiring the position of the database binary log;
controlling the first node to store the database binary log as a database relay log;
and controlling the first node to execute the record in the database relay log so as to synchronize the change of the record in the database binary log to the database of the first node.
Further, the controlling the second node to synchronize the service data to the first node further includes:
and controlling the second node to synchronize data of a file type different from the historical service data in the service data to the first node.
Optionally, the method provided by the present invention further includes:
controlling the second node to carry out software upgrading according to a second upgrading instruction, so that the upgraded database of the second node comprises: the second node updates the table entry of the database before;
according to a second service instruction, controlling the first node to process system service in the process of upgrading the second node to generate service data;
after the upgrade of the second node is completed, controlling the second node to synchronize the service data on the first node to the second node.
In practical application, the first node is a standby node, and the second node is a main node; or, the first node is a master node and the second node is a standby node.
The present invention can also provide a software upgrading apparatus, comprising:
the first upgrading module is used for controlling the first node to carry out software upgrading according to the first upgrading instruction, so that the upgraded database of the first node comprises: the table entry of the database before the first node is upgraded;
the first service module is used for controlling a second node to process system services in the upgrading process of the first node according to a first service instruction to generate service data;
and the first synchronization module is used for controlling the first node to synchronize the service data on the second node to the first node after the upgrade of the first node is completed.
Specifically, the first synchronization module includes:
the acquisition unit is used for controlling the first node to acquire the database binary log on the second node from the second node and acquiring the position of the database binary log;
the replication unit is used for controlling the first node to store the database binary log as a database relay log;
and the first synchronization unit is used for controlling the first node to execute the record in the database relay log so as to synchronize the change of the record in the database binary log to the database of the first node.
Further, the first synchronization module further comprises:
and the second synchronization unit is used for controlling the second node to synchronize the data of the file type different from the historical service data in the service data to the first node.
Optionally, the apparatus further comprises:
a second upgrade module, configured to control the second node to perform software upgrade according to a second upgrade instruction, so that the upgraded database of the second node includes: the second node updates the table entry of the database before;
the second service module is used for controlling the first node to process the system service in the upgrading process of the second node according to a second service instruction so as to generate service data;
and the second synchronization module is used for controlling the second node to synchronize the service data on the first node to the second node after the upgrade of the second node is completed.
The invention provides a software upgrading method and a device, wherein the software upgrading method comprises the following steps of controlling a first node to carry out software upgrading according to an upgrading instruction, so that a database after the first node is upgraded comprises: the table entry of the database before the first node is upgraded; controlling a second node to process system service in the upgrading process of the first node according to a service instruction to generate service data; and after the upgrading of the first node is completed, controlling the second node to synchronize the service data to the first node. The method ensures that the database after the first node is upgraded comprises the table entry of the database before the first node is upgraded by controlling the upgrading instruction, thereby synchronizing the service data generated on the second node for processing the system service to the first node after the first node is upgraded, keeping the service data generated in the node upgrading process and ensuring the normal processing of the system service.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a flowchart of a first embodiment of a software upgrading method provided by the present invention;
FIG. 2 is a flowchart of a second embodiment of a software upgrading method provided by the present invention;
FIG. 3 is a flowchart of a third embodiment of a software upgrading method provided by the present invention;
FIG. 4 is a block diagram of a first embodiment of a software upgrading apparatus provided in the present invention;
FIG. 5 is a block diagram of a second embodiment of a software upgrading apparatus provided in the present invention;
FIG. 6 is a block diagram of a third embodiment of a software upgrading apparatus provided in the present invention;
fig. 7 is a block diagram of a server provided by the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a flowchart of a first embodiment of a software upgrading method provided by the present invention. The software upgrading method may be executed by a control device, and the control device may control upgrading of each node in the cluster, for example, the control device may be a node in the cluster dedicated to node management, or may be a node in the cluster that can process both system services and node management. The control device may also be referred to as a software upgrading device.
As shown in fig. 1, the method of this embodiment may include:
step 101, controlling a first node to perform software upgrade according to a first upgrade instruction, so that a database after the first node is upgraded comprises: and the first node upgrades the table entry of the database before.
In a system using a main disaster recovery cluster and a backup disaster recovery cluster, each node in the cluster has the same software version, and the same service data is stored in a database corresponding to each node in the cluster. When the software of the cluster is upgraded, each node in the cluster needs to be upgraded to the same version so that each node can still maintain mutual active-standby disaster tolerance. Meanwhile, in order to reduce the influence of the upgrade process on the system service as much as possible, the nodes in the cluster are usually upgraded in batches. In this embodiment, one of the nodes, for example, the first node, may be upgraded preferentially.
In practical applications, the nodes in the cluster may be managed in a unified manner, for example, each node is managed in a unified manner by the control device in the cluster through the management software. When cluster software is upgraded, the control device may send a first upgrade instruction to the first node through the management software, and after receiving the first upgrade instruction, the first node may upgrade according to the first upgrade instruction, where the first upgrade instruction may be a software upgrade code corresponding to the first node. The first node can perform software upgrade by running the code of the first upgrade instruction.
And in the process of software upgrading of the first node, upgrading the database of the first node. Thus, the first upgrade instruction includes, among other things, database upgrade code. The first node may run the database upgrade code in the first upgrade instruction, so that all entries in the database before the first node is upgraded are retained in the upgraded database, that is, the upgraded database of the first node includes the entries in the database before the first node is upgraded.
The control device can control the upgrading of the database of the first node through the database upgrading code in the first upgrading instruction, so that the upgraded database of the first node comprises: and the first node upgrades the table entry of the database before.
Optionally, the entry included in the updated database of the first node may be equal to the entry in the database before the first node is updated, that is, the entry included in the database before the first node is updated and the entry included in the database after the first node is updated are not changed, for example, the table included in the database, the field included in the table, and the like are not changed.
Optionally, the table entry included in the database after the first node is upgraded may also be more than the table entry in the database before the first node is upgraded, that is, the database after the first node is upgraded includes, in addition to the table entry before the first node is upgraded, a table entry newly generated in the upgrading process, for example, the database includes an additional table or the table includes an additional field.
And step 102, controlling the second node to process the system service in the upgrading process of the first node according to the second service instruction, and generating service data.
In the process of upgrading the first node, in order to keep the system service uninterrupted, the control device may send the second service instruction to the second node to control the second node to process the system service in the process of upgrading the first node. The second service instruction may include an Internet Protocol Address (IP Address for short), so that the second stage processes the system service according to the IP Address. In practical applications, there is an IP address in the cluster, through which the cluster provides various services to the outside, and the IP address is allocated to which node in the cluster, and the system service is handled by which node, and the IP address is called a floating IP address of the cluster. For example, the control device may assign the floating IP address to a first node, control the first node to process system traffic; if the first node fails and the node is unavailable, the control device can allocate the floating IP address to the second node again to control the second node to process system services.
In this embodiment, before the first node starts upgrading, the floating IP address may be allocated to the second node under the control of the first service instruction, so that the second node processes system services during the upgrading process of the first node. During the processing of the system service, the second node generates various service data related to the system service processed by the second node, for example, related information of a user using the system service. These traffic data are stored at the second node.
In practical application, the first node may be a standby node, and the second node is a master node; or, the first node is a master node and the second node is a standby node. That is to say, in the scheme provided in this embodiment, software upgrade may be performed on the standby node first, and in the process of upgrading the standby node, the host node processes a service; or the software upgrading can be carried out on the main node firstly, and the main node processes the service in the process of upgrading the main node.
Step 103, after the upgrade of the first node is completed, controlling the first node to synchronize the service data on the second node to the first node.
In the process of upgrading the first node, the second node generates service data when processing the system service, and the service data are stored in the database of the second node, and the stored service data may be used in subsequent system service processing.
The step 101 is executed to enable the updated database of the first node to include the entry of the database before the first node is updated, and the entry in the database before the first node is updated is the same as the entry in the database of the second node, so that the service data generated on the second node can be copied to the corresponding entry in the database of the first node.
The software upgrading method provided by the embodiment includes controlling a first node to perform software upgrading according to an upgrading instruction, so that a database after the first node is upgraded includes: the table entry of the database before the first node is upgraded; controlling a second node to process system service in the upgrading process of the first node according to a service instruction to generate service data; after the upgrading of the first node is completed, controlling the first node to synchronize the service data on the second node to the first node. The method ensures that the database after the first node is upgraded comprises the table entry of the database before the first node is upgraded by controlling the upgrading instruction, thereby synchronizing the service data generated on the second node for processing the system service to the first node after the first node is upgraded, keeping the service data generated in the node upgrading process and ensuring the normal operation of the system service.
On the basis of the embodiment shown in fig. 1, the present invention may also provide a software upgrading method,
fig. 2 is a flowchart of a second embodiment of a software upgrading method provided by the present invention. As shown in fig. 2, on the basis of the embodiment shown in fig. 1, controlling the first node to synchronize the service data on the second node to the first node in step 103 may include:
step 201, controlling the first node to obtain the binary log of the database on the second node from the second node, and obtaining the location of the binary log of the database.
In the process of processing system services by the second node, service data generated on the second node is stored in the database of the second node, so that the data stored in the database of the second node is changed in the process, and the changes of the database are recorded in a binary log (binary log for short) of the database.
Step 202, controlling the first node to store the database binary log as a database relay log.
After the first node obtains the database binary log on the second node, the binary log is saved as a relay log (relay log) of the first node, so that the relay log also includes: the second node database. In the database, the binary log on one node is only used for recording the change generated by the database of the node, the relay log is the binary log obtained by the node from other nodes, and the database synchronization mechanism is to store the binary log of other nodes as the relay log of the node and then synchronize the change of other nodes to the node through the relay log.
Step 203, controlling the first node to execute the record in the database relay log so as to synchronize the change recorded in the database relay log to the database of the first node.
The first node reads the content of the relay log and executes corresponding operation according to the change record of the database in the relay log, so that the operation executed on the second node to cause the change of the database of the second node is correspondingly executed on the first node. In this way, the data in the first node database can be kept consistent with the data in the second node database again.
In addition, since the first node acquires the location of the binary log of the database in step 201, the synchronization is interrupted in the process of executing the synchronization in time, and the synchronization can be continued from the interrupted place according to the location of the binary log after recovery.
Optionally, controlling the first node to synchronize the service data on the second node to the first node in step 103 as shown above may further include:
and 204, controlling the second node to synchronize data of a file type different from the historical service data in the service data to the first node.
In addition to the above-described data in the database format synchronized by the binary log and the relay log, the service data generated at the second node includes data stored in a file type at the second node, for example, a configuration file stored in a disk of the second node. These file type data are not stored in the database, but stored in other storage devices of the second node, so after the first node is upgraded, in addition to the above synchronization of the data in the database of the second node, these file type data need to be synchronized. For data of file type, the second node may copy its increment to the first node, i.e. synchronize only the part of it different from the historical traffic data to the first node, to improve the synchronization efficiency.
In the software upgrading method provided in this embodiment, on the basis of the embodiment shown in fig. 1, controlling the first node to synchronize the service data on the second node to the first node includes: controlling the first node to acquire the database binary log on the second node from the second node and acquiring the position of the database binary log; controlling the first node to store the database binary log as a database relay log; controlling the first node to execute the record in the database relay log to synchronize the change of the record in the database binary log to the database of the first node; and controlling the second node to synchronize data of a file type different from the historical service data in the service data to the first node. In the method, the first node copies the change of the database recorded in the binary log at the first node correspondingly by acquiring the binary log of the second node, thereby realizing the synchronization of the first node and the second node database, keeping the service data generated in the node upgrading process and ensuring the normal processing of the system service.
On the basis of the first embodiment shown in fig. 1, the present invention may also provide a software upgrading method,
fig. 3 is a flowchart of a third embodiment of a software upgrading method provided by the present invention. As shown in fig. 3, on the basis of the embodiment shown in fig. 1, the method may further include:
step 301, according to the second upgrade instruction, controlling the second node to perform software upgrade, so that the upgraded database of the second node includes: the second node upgrades the entries of the database before.
After the service data on the second node is synchronized to the first node in step 103, the upgrade of the second node can be performed. Specifically, the control device sends a second upgrade instruction to the second node through the management software, and the second node can be upgraded according to the second upgrade instruction after receiving the second upgrade instruction, where the second upgrade instruction may be a software upgrade code corresponding to the second node. The second node can perform software upgrade by running the code of the second upgrade instruction.
The second node may further run the database upgrade code in the second upgrade instruction, so that all entries in the database before the second node is upgraded are retained in the upgraded database, that is, the upgraded database of the second node includes the entries in the database before the second node is upgraded. Meanwhile, the software version after the second node is upgraded is consistent with the software version after the first node is upgraded, and the table entries included in the databases of the second node and the first node are also the same.
Step 302, according to the second service instruction, controlling the first node to process the system service in the process of upgrading the second node, and generating service data.
Before the second node starts upgrading, the control equipment sends a second service instruction to control the floating IP address of the cluster to be distributed on the first node, so that the first node processes system service in the upgrading process of the second node. For example, the second service instruction may include a primary/standby switching instruction to reallocate the floating IP address allocated to the second node to the first node in step 102. During the processing of the system service, the first node generates various service data related to the system service processed by the first node, for example, related information of a user using the system service. These traffic data are stored at the first node.
Step 303, after the upgrade of the second node is completed, controlling the second node to synchronize the service data on the first node to the second node.
In the process of upgrading the second node, the first node generates service data when processing the system service, and the service data are stored in the database of the first node, and the stored service data may be used in subsequent system service processing.
The step 301 is executed to enable the upgraded database of the second node to include the entry of the database before the second node is upgraded and to be consistent with the entry of the database after the first node is upgraded, so that the service data generated on the first node can be copied to the corresponding entry in the database of the second node.
Optionally, before step 101, the method may further include: controlling the automatic synchronization between the first node and the second node to stop; after step 303, the method may further comprise: and controlling the automatic synchronous starting between the first node and the second node. The automatic synchronization between the first node and the second node includes synchronization of data of a file type and synchronization of a database. When the databases are synchronized, the databases of the first node and the second node are in a double-master replication state, and new service data generated at each side can be replicated to the other side.
The software upgrading method provided by the implementation can process system services by the second node when the first node is upgraded, and synchronizes service data generated on the second node to the first node; then, node switching can be carried out, when the second node is upgraded, the first node processes system service, and service data generated on the first node is synchronized to the second node. In the method, the system service is unavailable only in the process of node switching, the system service can be normally used at other time, and the user experience is better. Meanwhile, the service data generated in the upgrading process of each node of the cluster can be reserved, and the normal processing of the system service is ensured.
The invention also provides a software upgrading device. Fig. 4 is a block diagram of a first embodiment of a software upgrading apparatus provided in the present invention. As shown in fig. 4, the apparatus includes:
a first upgrade module 41, configured to control a first node to perform software upgrade according to a first upgrade instruction, so that a database after the first node is upgraded includes: and the first node updates the table entries of the database before.
And the first service module 42 is configured to control, according to the first service instruction, the second node to process the system service in the process of upgrading the first node, and generate service data.
A first synchronization module 43, configured to control the second node to synchronize the service data to the first node after the upgrade of the first node is completed.
The software upgrading apparatus provided in this embodiment may be used to execute the technical solution of the method embodiment shown in fig. 1, and the implementation principle and the technical effect are similar, which are not described herein again.
On the basis of the embodiment shown in fig. 4, the invention can also provide a software upgrading device. Fig. 5 is a block diagram of a second embodiment of a software upgrading apparatus provided in the present invention. As shown in fig. 5, on the basis of the apparatus shown in fig. 4, the first synchronization module 43 includes:
an obtaining unit 51, configured to control the first node to obtain a database binary log on the second node from the second node, and obtain a location of the database binary log;
a replication unit 52, configured to control the first node to save the database binary log as a database relay log;
a first synchronization unit 53, configured to control the first node to execute the record in the database relay log, so as to synchronize the change recorded in the database binary log to the database of the first node.
A second synchronization unit 54, configured to control the second node to synchronize, to the first node, data of a file type different from the historical service data in the service data.
The software upgrading apparatus provided in this embodiment may be used to execute the technical solution of the method embodiment shown in fig. 2, and the implementation principle and the technical effect are similar, which are not described herein again.
On the basis of the embodiment shown in fig. 4, the invention can also provide a software upgrading device. Fig. 6 is a block diagram of a third embodiment of a software upgrading apparatus provided in the present invention. As shown in fig. 6, the apparatus further includes:
a second upgrade module 61, configured to control a second node to perform software upgrade according to a second upgrade instruction, so that a database after the second node is upgraded includes: the table entry of the database before the second node is upgraded;
a second service module 62, configured to control, according to a second service instruction, the first node to process a system service in an upgrade process of the second node, and generate service data;
a second synchronization module 63, configured to control the first node to synchronize the service data to the second node after the upgrade of the second node is completed.
The software upgrading apparatus provided in this embodiment may be used to execute the technical solution of the method embodiment shown in fig. 3, and the implementation principle and the technical effect are similar, which are not described herein again.
The present invention may also provide a control apparatus. Fig. 7 is a block diagram of a control apparatus provided by the present invention. As shown in fig. 7, the control device 70 includes: a memory 71 and a processor 72;
the memory 71 is connected to the processor 72;
the memory 71 is used to store program instructions;
the processor 72 is adapted to call program instructions stored in the memory 71 to cause the control device 70 to perform the software upgrade method of the embodiment shown in fig. 1-3. The implementation principle and the technical effect are similar, and the detailed description is omitted here.
Alternatively, the control device 70 may be a server.
The present invention may also provide a computer-readable storage medium on which a computer program is stored, which, when executed by a processor, may implement the software upgrading method of the embodiment shown in fig. 1-3 described above.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (12)

1. A method of upgrading software, comprising:
controlling a first node to carry out software upgrading according to a first upgrading instruction, so that the upgraded database of the first node comprises: the table entry of the database before the first node is upgraded;
according to a first service instruction, controlling a second node to process system service in the upgrading process of a first node to generate service data;
after the upgrading of the first node is completed, controlling the first node to synchronize the service data on the second node to the first node.
2. The method of claim 1,
the table entry included in the database after the first node is upgraded is equal to the table entry in the database before the first node is upgraded;
or;
the database after the first node is upgraded comprises more entries than the database before the first node is upgraded.
3. The method of claim 1, wherein the controlling the first node to synchronize the traffic data on the second node to the first node comprises:
controlling the first node to acquire a binary log of a database on the second node from the second node and acquire the position of the binary log;
controlling the first node to store the binary log as a database relay log;
controlling the first node to execute the record in the relay log of the database to synchronize the change of the record in the binary log to the database of the first node.
4. The method of claim 3, wherein the controlling the first node to synchronize the traffic data on the second node to the first node further comprises:
and controlling the second node to synchronize data of a file type different from the historical service data in the service data to the first node.
5. The method according to any one of claims 1-4, further comprising:
controlling the second node to carry out software upgrading according to a second upgrading instruction, so that the upgraded database of the second node comprises: the table entry of the database before the second node is upgraded;
according to a second service instruction, controlling the first node to process system service in the process of upgrading the second node to generate service data;
after the upgrading of the second node is completed, controlling the second node to synchronize the service data on the first node to the second node.
6. The method of any of claims 1-4, wherein the first node is a standby node and the second node is a master node; or, the first node is a master node, and the second node is a standby node.
7. A software upgrading apparatus, comprising:
the first upgrading module is used for controlling the first node to carry out software upgrading according to a first upgrading instruction, so that the upgraded database of the first node comprises: the table entry of the database before the first node is upgraded;
the first service module is used for controlling a second node to process system services in the upgrading process of the first node according to a first service instruction to generate service data;
and the first synchronization module is used for controlling the first node to synchronize the service data on the second node to the first node after the upgrade of the first node is completed.
8. The apparatus of claim 7, wherein the first synchronization module comprises:
an obtaining unit, configured to control the first node to obtain, from the second node, a database binary log on the second node, and obtain a location of the database binary log in a database of the second node;
the replication unit is used for controlling the first node to store the database binary log as a database relay log;
a first synchronization unit, configured to control the first node to execute the record in the database relay log, so as to synchronize the change of the record in the database binary log to the database of the first node.
9. The apparatus of claim 8, wherein the first synchronization module further comprises:
and the second synchronization unit is used for controlling the second node to synchronize the data of the file type different from the historical service data in the service data to the first node.
10. The apparatus according to any one of claims 7-9, further comprising:
the second upgrade module is used for controlling the second node to perform software upgrade according to a second upgrade instruction, so that the upgraded database of the second node comprises: the table entry of the database before the second node is upgraded;
the second service module is used for controlling the first node to process the system service in the upgrading process of the second node according to a second service instruction so as to generate service data;
and the second synchronization module is used for controlling the second node to synchronize the service data on the first node to the second node after the upgrade of the second node is completed.
11. A control apparatus, characterized by comprising: a memory and a processor; the memory is connected with the processor;
the memory to store program instructions;
the processor, when the program instructions are executed, implementing the software upgrade method of any one of claims 1-5.
12. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the software upgrading method of any one of claims 1-5.
CN201811300532.1A 2018-11-02 2018-11-02 Software upgrading method and device Pending CN111142921A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811300532.1A CN111142921A (en) 2018-11-02 2018-11-02 Software upgrading method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811300532.1A CN111142921A (en) 2018-11-02 2018-11-02 Software upgrading method and device

Publications (1)

Publication Number Publication Date
CN111142921A true CN111142921A (en) 2020-05-12

Family

ID=70516169

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811300532.1A Pending CN111142921A (en) 2018-11-02 2018-11-02 Software upgrading method and device

Country Status (1)

Country Link
CN (1) CN111142921A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112631627A (en) * 2020-12-10 2021-04-09 武汉联影医疗科技有限公司 Software upgrading method and device, computer equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080086480A1 (en) * 2006-10-06 2008-04-10 Sybase, Inc. System and Methods For Temporary Data Management in Shared Disk Cluster
CN101753349A (en) * 2008-12-09 2010-06-23 中国移动通信集团公司 Upgrading method of data node, upgrade dispatching node as well as upgrading system
CN102611580A (en) * 2012-04-01 2012-07-25 Ut斯达康通讯有限公司 Multi-version network management method based on specification drive
CN103810257A (en) * 2014-01-24 2014-05-21 华为技术有限公司 Method and device for upgrading software database and equipment
CN105610903A (en) * 2015-12-17 2016-05-25 北京奇虎科技有限公司 Data node upgrading method and device for distributed system
US20160179850A1 (en) * 2009-06-11 2016-06-23 Talari Networks Incorporated Methods and Apparatus for Providing Adaptive Private Network Database Schema Migration and Management Processes

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080086480A1 (en) * 2006-10-06 2008-04-10 Sybase, Inc. System and Methods For Temporary Data Management in Shared Disk Cluster
CN101753349A (en) * 2008-12-09 2010-06-23 中国移动通信集团公司 Upgrading method of data node, upgrade dispatching node as well as upgrading system
US20160179850A1 (en) * 2009-06-11 2016-06-23 Talari Networks Incorporated Methods and Apparatus for Providing Adaptive Private Network Database Schema Migration and Management Processes
CN102611580A (en) * 2012-04-01 2012-07-25 Ut斯达康通讯有限公司 Multi-version network management method based on specification drive
CN103810257A (en) * 2014-01-24 2014-05-21 华为技术有限公司 Method and device for upgrading software database and equipment
CN105610903A (en) * 2015-12-17 2016-05-25 北京奇虎科技有限公司 Data node upgrading method and device for distributed system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112631627A (en) * 2020-12-10 2021-04-09 武汉联影医疗科技有限公司 Software upgrading method and device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN102594849B (en) Data backup and recovery method and device, virtual machine snapshot deleting and rollback method and device
CN108345617B (en) Data synchronization method and device and electronic equipment
CN105677380B (en) Method and device for board-by-board upgrading of double master control isolations
US20120324436A1 (en) Method of updating versioned software using a shared cache
US8612799B2 (en) Method and apparatus of backing up subversion repository
CN113268472A (en) Distributed data storage system and method
CN107623705B (en) Storage mode upgrading method, device and system based on video cloud storage system
CN111142921A (en) Software upgrading method and device
CN113297316A (en) Method, device and system for realizing data synchronization
WO2017000586A1 (en) Method and device for upgrading virtual network element, and computer storage medium
CN108881452B (en) Data synchronization method, device and storage medium
CN115658390A (en) Container disaster tolerance method, system, device, equipment and computer readable storage medium
EP4318243A1 (en) Data backup method and system, and related device
CN115292408A (en) Master-slave synchronization method, device, equipment and medium for MySQL database
CN114281600A (en) Disaster recovery backup and recovery method, device, equipment and storage medium
JP6237925B2 (en) Cluster system and cluster control method
US20240028611A1 (en) Granular Replica Healing for Distributed Databases
CN113874842B (en) Fault tolerant system, server, method for operating fault tolerant system and method for operating server
CN111241200B (en) Master-slave synchronous processing method and device based on SQLite database
CN111522688B (en) Data backup method and device for distributed system
CN114968656A (en) Data rollback method, device, equipment and medium
JP2015153128A (en) Call processing control device and software update method of the same, call processing system, and computer program
WO2017047065A1 (en) Cluster system, information processing device, synchronization method for cluster system, and storage medium for storing program
CN116627658A (en) Yun Bianduan load balancing method and system
CN117112690A (en) Data synchronization method of distributed cluster and related equipment thereof

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200512

RJ01 Rejection of invention patent application after publication