CN110633096A - Node control method and device, version control method and device and distributed system - Google Patents

Node control method and device, version control method and device and distributed system Download PDF

Info

Publication number
CN110633096A
CN110633096A CN201810644099.7A CN201810644099A CN110633096A CN 110633096 A CN110633096 A CN 110633096A CN 201810644099 A CN201810644099 A CN 201810644099A CN 110633096 A CN110633096 A CN 110633096A
Authority
CN
China
Prior art keywords
version information
list
node
version
legal
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.)
Granted
Application number
CN201810644099.7A
Other languages
Chinese (zh)
Other versions
CN110633096B (en
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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201810644099.7A priority Critical patent/CN110633096B/en
Publication of CN110633096A publication Critical patent/CN110633096A/en
Application granted granted Critical
Publication of CN110633096B publication Critical patent/CN110633096B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Abstract

The embodiment of the application provides a node control method and device, a version control method and device and a distributed system, wherein the node control method is applied to the distributed system, the distributed system comprises working nodes capable of providing services, and the node control method comprises the following steps: the method comprises the steps of obtaining version information of each working node and obtaining a legal version information list, wherein the legal version information list comprises one or more version information of the working nodes allowed to provide services, and determining whether the working nodes are allowed to provide the services or not according to the obtained version information of the working nodes and the legal version information list.

Description

Node control method and device, version control method and device and distributed system
Technical Field
The present application relates to the field of computer technologies, and in particular, to a node control method and apparatus, a version control method and apparatus, and a distributed system.
Background
A distributed system generally includes a plurality of nodes, each of which runs a software program to provide services, such as data query services, to the outside. In the distributed system, the nodes have corresponding version information, which may be version information of software programs in the nodes, and during the operation of the distributed system, version upgrade needs to be performed on each node, so that each node can provide internet services more efficiently.
Considering that the version information of the nodes in the distributed system has a certain influence on the operating efficiency of the distributed system, for example, when the version information of the nodes in the distributed system is not completely consistent, a problem of data processing incompatibility may be caused, and the data processing efficiency of the distributed system is reduced. Therefore, it is necessary to provide a technical solution for controlling the nodes based on the version information of the nodes, so as to avoid the influence of the version information of the nodes on the operation efficiency of the distributed system and improve the operation efficiency of the distributed system.
Disclosure of Invention
An object of the embodiments of the present application is to provide a node control method and apparatus, a version control method and apparatus, and a distributed system, which can determine whether to allow a work node to provide a service based on version information and a legal version information list of the work node in the distributed system, thereby avoiding an influence of the version information of the work node on an operation efficiency of the distributed system, and improving the operation efficiency of the distributed system.
To solve the above object, the embodiments of the present application are implemented as follows:
the embodiment of the application provides a node control method for a distributed system, wherein the distributed system comprises a working node capable of providing service, and the method comprises the following steps:
the method comprises the steps of obtaining version information of each working node and obtaining a legal version information list, wherein the legal version information list comprises one or more version information of the working nodes which are allowed to provide services;
and determining whether the working node is allowed to provide service or not according to the acquired version information of the working node and the legal version information list.
The embodiment of the application provides a version control method for a distributed system, wherein the distributed system comprises a working node capable of providing service, and the method comprises the following steps:
after an upgrading request for upgrading the version information of the working node is obtained, a list expansion instruction for expanding a legal version information list is sent; wherein the legal version information list comprises one or more version information of the working nodes which are allowed to provide the service;
acquiring version upgrading results of all the working nodes;
and sending a list contraction instruction for contracting the legal version information list after the version upgrading result of each working node meets a preset condition.
An embodiment of the present application provides a distributed system, including: a master node and a worker node capable of providing a service;
the master node is used for acquiring the version information of each working node and storing a legal version information list; determining whether the working node is allowed to provide service according to the acquired version information of the working node and the legal version information list;
and the working node is used for providing service or stopping providing service according to the determination result of the main node.
An embodiment of the present application provides a node control apparatus for a distributed system, where the distributed system includes a work node capable of providing a service, and the apparatus includes:
the system comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring version information of each working node and acquiring a legal version information list, and the legal version information list comprises one or more version information of the working nodes which are allowed to provide services;
and the determining module is used for determining whether the working node is allowed to provide service according to the acquired version information of the working node and the legal version information list.
The embodiment of the application provides a version control device for a distributed system, wherein the distributed system comprises a working node capable of providing service, and the version control device comprises:
the first sending module is used for sending a list expansion instruction for expanding a legal version information list after an upgrading request for upgrading the version information of the working node is obtained, wherein the legal version information list comprises one or more version information of the working node which is allowed to provide service;
the result acquisition module is used for acquiring the version upgrading result of each working node;
and the second sending module is used for sending a list contraction instruction for contracting the legal version information list after the version upgrading result of each working node meets the preset condition.
An embodiment of the present application provides a node control device, including: a processor; and a memory arranged to store computer executable instructions that, when executed, cause the processor to perform the node control method described above.
The embodiment of the application provides a storage medium for storing computer-executable instructions, and the computer-executable instructions realize the node control method when being executed.
An embodiment of the present application provides a version control device, including: a processor; and a memory arranged to store computer executable instructions that, when executed, cause the processor to perform the above-described versioning method.
Embodiments of the present application provide a storage medium for storing computer-executable instructions, which when executed implement the above-described version control method.
By the technical scheme in the embodiment, whether the working node is allowed to provide the service or not can be determined based on the version information and the legal version information list of the working node in the distributed system, so that the influence of the version information of the working node on the operation efficiency of the distributed system is avoided, and the operation efficiency of the distributed system is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application 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, it is obvious that the drawings in the following description are only some embodiments described in the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without any creative effort.
Fig. 1 is a schematic structural diagram of a distributed system according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a node control method according to an embodiment of the present application;
FIG. 3 is an expanded view of a legal version information list according to an embodiment of the present application;
FIG. 4 is a schematic diagram illustrating a contraction of a legal version information list according to an embodiment of the present application;
fig. 5 is a flowchart illustrating a version control method according to an embodiment of the present application;
fig. 6 is a schematic block diagram of a node control apparatus according to an embodiment of the present application;
fig. 7 is a schematic diagram illustrating a module composition of a version control apparatus according to an embodiment of the present application
Fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. 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 application.
The embodiment of the application provides a node control method and device, a version control method and device, and a distributed system, which can determine whether a working node is allowed to provide a service or not based on version information and a legal version information list of the working node in the distributed system, thereby avoiding the influence of the version information of the working node on the operation efficiency of the distributed system, and improving the operation efficiency of the distributed system. The following is a detailed description with reference to examples.
Fig. 1 is a schematic structural diagram of a distributed system according to an embodiment of the present application, and as shown in fig. 1, the distributed system includes a master node 100, a plurality of worker nodes 200, and an operation and maintenance node 300, where each worker node 200 is connected to the master node 100, and the master node 100 is connected to the operation and maintenance node 300. The operation and maintenance node 300 is used for operation and maintenance management and control of the distributed system, and the main node 100 is used for storing metadata. When each working node 200 is started, it needs to send a registration request to the master node 100, and if the master node 100 agrees to register the working node 200 according to the registration request, the master node 100 returns notification information of successful registration to the working node 200, and the working node 200 can operate according to a set operation mode according to the notification information of successful registration and provide services, such as data query services. On the contrary, if the master node 100 rejects the working node 200 to register according to the registration request, the master node 100 returns notification information of registration failure to the working node 200, and the working node 200 stops providing service according to the notification information of registration failure.
In fig. 1, the master node 100, the worker node 200, and the operation and maintenance node 300 may each be composed of one or more servers.
Fig. 2 is a flowchart illustrating a node control method for the distributed system according to an embodiment of the present application, where the method can be executed by the master node 100 in fig. 1, as shown in fig. 2, and the method includes the following steps:
step S202, obtaining version information of each working node and obtaining a legal version information list, wherein the legal version information list comprises one or more version information of the working nodes which are allowed to provide service;
and step S204, determining whether the working node is allowed to provide service according to the acquired version information of the working node and the legal version information list.
Therefore, according to the embodiment of the application, whether the working node is allowed to provide the service or not can be determined based on the version information and the legal version information list of the working node in the distributed system, so that the influence of the version information of the working node on the operation efficiency of the distributed system is avoided, and the operation efficiency of the distributed system is improved.
In this embodiment, if the master node determines that the working node is allowed to provide the service, the working node provides the service according to the determination result of the master node, otherwise, if the master node determines that the working node is not allowed to provide the service, the working node stops providing the service according to the determination result of the master node. The worker node may provide services under the control of the master node, e.g., the worker node may provide data query services under the control of the master node.
In step S202, the master node obtains version information of the working node in the distributed system, specifically: receiving heartbeat connection information sent by each working node, wherein the heartbeat connection information comprises version information of the corresponding working node, the heartbeat connection information is sent by the corresponding working node according to a preset heartbeat cycle, and the main node extracts the version information of the corresponding working node from the heartbeat connection information.
Specifically, the working node may send heartbeat connection information to the master node according to a preset heartbeat cycle, where the heartbeat connection information carries version information of the working node, and the version information of the working node includes, but is not limited to, a version identifier of software in the working node.
In an embodiment, the working node may also periodically send its own version information to the master node according to a preset reporting period, so that the master node obtains the version information of the working node. In another embodiment, the registration request sent by the working node to the master node when the working node is started carries the version information of the working node, so that the master node obtains the version information of the working node.
In step S204, the step of obtaining, by the master node, the legal version information list corresponding to the distributed system may be: the main node reads a legal version information list from the local; or the master node acquires the legal version information list from the operation and maintenance node.
The list of legitimate version information includes one or more version information of the worker nodes that are allowed to provide the service. In one embodiment, the operation and maintenance node periodically sends the legal version information list to the main node, and the main node stores the legal version information list locally and reads the legal version information list locally. In another embodiment, after receiving version information of a working node which is allowed to provide service and input by a user, the operation and maintenance node generates a legal version information list, and writes the legal version information list into the master node, so that the master node reads the legal version information list from the local. In another embodiment, the master node periodically reads the legal version information list from the storage space of the operation and maintenance node.
In step S206, the master node determines whether to allow the working node to provide the service according to the obtained version information of the working node and the legal version information list, which specifically includes: if the master node determines that the version of the working node is legal according to the version information of the working node and the legal version information list, the working node is allowed to provide the service, and if the master node determines that the version of the working node is illegal according to the version information of the working node and the legal version information list, the working node is not allowed to provide the service.
In one embodiment, the version information of the working node includes a version identifier of the working node, the legal version information list includes a version identifier of a legal version allowed to be used by the distributed system, if the master node determines that the version identifier of the working node is located in the legal version information list, the master node determines that the version of the working node is legal, and the working node can provide services, otherwise, if the master node determines that the version identifier of the working node is not located in the legal version information list, the master node determines that the version of the working node is illegal, and the working node does not provide services.
When the working node version is determined to be illegal, the working node is not allowed to provide the service, so that the problem that the service provided by each working node is incompatible due to the fact that the working node provides the service based on the illegal version can be prevented.
In a specific embodiment, a version identifier, such as "version 3", is recorded in the legal version information list, and when each working node is started, a registration request is sent to the master node, where the registration request carries the version identifier of the working node, for example, there are three working nodes a, b, and c, and the version identifiers are "version 1", "version 2", and "version 3", respectively. The master node determines that the version identifier 'version 3' of the working node c is located in the legal version information list through judgment, and the version identifiers of the working nodes a and b are not located in the legal version information list, the master node determines that the working node c is allowed to provide the service and controls the working node c to provide the service, and the master node determines that the working nodes a and b are not allowed to provide the service and controls the working nodes a and b to stop providing the service, so that the problems that the working nodes provide the service based on illegal versions, the service provided by each working node is incompatible and the operation efficiency of a distributed system is reduced are solved.
In another specific embodiment, a version identifier, for example, "version 3", is recorded in the legal version information list, and each working node sends heartbeat connection information to the master node according to a preset heartbeat cycle in the operation process, for example, the heartbeat connection information is sent every 20 seconds, and the heartbeat connection information includes the version identifiers of the working nodes, for example, three working nodes a, b, and c are included, and the version identifiers are "version 1", "version 2", and "version 3", respectively. The master node determines that the version identification of the working node c is located in the legal version information list through judgment, and the version identifications of the working nodes a and b are not located in the legal version information list, the master node determines that the working node c is allowed to provide the service and controls the working node c to provide the service, and the master node determines that the working nodes a and b are not allowed to provide the service and controls the working nodes a and b to stop providing the service, so that the problems that the working nodes provide the service based on illegal versions, the service provided by each working node is incompatible and the operation efficiency of a distributed system is reduced are avoided.
Therefore, by the method and the system in the embodiment, the service provided by the working node with the illegal version is not allowed, so that the problem that the service provided by each working node is incompatible easily because the working node provides the service based on the illegal version is avoided, and the operation efficiency of the distributed system is improved.
Further, in this embodiment, the master node may further obtain a list update instruction from the operation and maintenance node, and modify the legal version information list according to the list update instruction. Wherein the list updating instruction comprises a list expanding instruction and a list contracting instruction.
In one embodiment, after the operation and maintenance node obtains the upgrade request for upgrading the version information of the working node, the operation and maintenance node sends a list expansion instruction for expanding the legal version information list, so that the main node obtains the list expansion instruction from the operation and maintenance node. The master node determines first version information to be added in the legal version information list according to the list expansion instruction, wherein the version grade corresponding to the first version information is higher than the version grade corresponding to any version information in the legal version information list, and the master node also adds the first version information into the legal version information list so as to expand the legal version information list. Wherein the first version information includes, but is not limited to, a version identification.
Fig. 3 is a schematic diagram illustrating extension of a legal version information list according to an embodiment of the present application, as shown in fig. 3, when a software version in a working node needs to be upgraded, a user submits an upgrade request for upgrading the version information of the working node to an operation and maintenance node, for example, the upgrade request is used for upgrading version 1 to version 2, the operation and maintenance node sends a list extension instruction to a master node according to the upgrade request, the list extension instruction carries version identification "version 2" of version 2, the master node receives the list extension instruction, and adds version identification "version 2" to the legal version information list according to the list extension instruction, thereby implementing extension of the legal version information list.
In this embodiment, it is considered that the version upgrade is a process of upgrading from a low version to a high version, so that when the version is expanded, the version level corresponding to the first version information to be added in the legal version information list is higher than the version level corresponding to any version information in the legal version information list. In addition, considering that in the version upgrading process, it is necessary that some working nodes are upgraded first and some working nodes are upgraded later, so in the upgrading process, the existing version information and the newly added first version information in the legal version information list are both legal version information, for example, in fig. 3, the version identifier "version 1" and the version identifier "version 2" are both legal version information, and accordingly, the version 1 and the version 2 are both legal versions.
In other embodiments, there may be a plurality of pieces of first version information to be added, for example, in the above example, if the working node fails to upgrade to version 2, the working node continues to upgrade to version 3, and at this time, the legal version information list may be expanded from { version 1} to { version 1, version 2, version 3 }.
Correspondingly, in consideration of the situation that the version information before the upgrade is useless after the upgrade of the working nodes is completed, in this embodiment, the operation and maintenance node may further obtain the version upgrade result of each working node, and after the version upgrade result of each working node meets the preset condition, the operation and maintenance node sends out the list contraction instruction, so that the master node obtains the list contraction instruction from the operation and maintenance node. The master node may determine, according to the list contraction instruction, second version information to be deleted in the legal version information list, the second version information not being version information with the highest version rank in the legal version information list, and delete the second version information in the legal version information list, thereby contracting the legal version information list. Wherein the second version information includes, but is not limited to, a version identification.
Specifically, the operation and maintenance node can communicate with each working node, so as to obtain the version upgrading result of each working node. In one embodiment, the preset condition may be that the version information of each working node is upgraded to the version information with the highest version level in the expanded legal version information list, and the operation and maintenance node sends the list contraction instruction after the version information of each working node is upgraded to the version information with the highest version level in the expanded legal version information list. In other embodiments, the preset condition may also be that more than a predetermined number of working nodes are upgraded to version information with the highest version level in the expanded legal version information list, and the operation and maintenance node sends a list contraction instruction after determining that more than the predetermined number of working nodes are upgraded to version information with the highest version level in the expanded legal version information list.
In this embodiment, it is determined that the second version information to be deleted is not the version information with the highest version rank in the legal version information list, so that it is ensured that the version information with the low rank is deleted and the version information with the high rank is retained after the upgrade is completed.
Fig. 4 is a schematic diagram of shrinking a legal version information list provided in an embodiment of the present application, as shown in fig. 4, taking over the example in fig. 3, an operation and maintenance node may periodically check whether versions of working nodes are all upgraded to version 2, and if it is detected that the versions of the working nodes are all upgraded to version 2, the operation and maintenance node sends a list shrinking instruction to a master node, where the list shrinking instruction carries a version identifier to be deleted, such as an identifier "version 1" of version 1, the master node determines that second version information to be deleted in the legal version information list is "version 1" according to the list shrinking instruction, and deletes "version 1" in the legal version information list, thereby implementing shrinking of the legal version information list.
Through the expansion and contraction processes of the legal version information list, the legal version information list can be expanded when the version is upgraded, and new and old versions are allowed to provide services; and the information list of the legal version can be contracted after the version is upgraded, so that the old version before being upgraded is prevented from continuously providing services. Therefore, even if an abnormal node which misses the upgrade due to a short communication fault and then recovers communication exists (for example, a certain node cannot be upgraded due to the fact that a network cable falls off and then network cable connection is recovered), the version of the abnormal node can be determined to be illegal according to the legal version information list and the version information of the abnormal node, so that the abnormal node is not allowed to provide service, and the problem of compatibility caused by the fact that the version of each node is inconsistent due to the fact that the abnormal node provides service based on the old version before the upgrade is solved.
For example, in the example shown in fig. 3 and fig. 4, if a node is not successfully upgraded due to network cable dropping, and its version is still version 1, after the network cable of the node is recovered, because the legal version information list is changed from { version 1} to { version 2}, the master node determines that the version of the node is illegal, and does not allow the node to provide service, thereby avoiding the compatibility problem caused by inconsistency of versions of nodes due to the fact that an abnormal node provides service based on the old version before upgrading.
After the version of the abnormal node is manually upgraded, in the embodiment, the upgraded version is a legal version, and the abnormal node can continue to provide services.
In summary, the embodiments of the present application have at least the following advantages:
(1) based on the version information and the legal version information list of the working nodes in the distributed system, the working nodes are allowed or not allowed to provide services, so that the influence of the version information of the working nodes on the operation efficiency of the distributed system is avoided, and the operation efficiency of the distributed system is improved;
(2) service is not allowed to be provided by the working nodes with illegal versions, so that the problem that the service provided by each working node is incompatible due to the fact that the working nodes provide the service based on the illegal versions is avoided, and the operation efficiency of the distributed system is improved;
(3) in the process of upgrading the versions of the nodes, for abnormal nodes which have communication faults but are not upgraded, the version of the abnormal node after communication recovery can be determined to be illegal based on the expansion and contraction processes of the legal version information list, so that the recovered abnormal nodes are not allowed to provide services, the compatibility problem caused by inconsistent versions of working nodes is avoided, the operating efficiency of a distributed system is ensured, and the purpose of safely and efficiently upgrading the versions is achieved.
Corresponding to the node control method, this embodiment further provides a version control method for a distributed system, which may be executed by the operation and maintenance node, and fig. 5 is a flowchart of the version control method provided in this embodiment of the present application, as shown in fig. 5, where the method includes:
step S502, after an upgrade request for upgrading the version information of the working node is obtained, a list expansion instruction for expanding the legal version information list is sent, wherein the legal version information list comprises one or more version information of the working node which is allowed to provide service;
step S504, obtaining the version upgrading result of each working node;
step S506, after the version upgrade result of each working node meets the preset condition, sending a list contraction instruction for contracting the legal version information list.
Therefore, according to the embodiment of the application, the legal version information list can be adjusted, namely one or more version information of the working nodes which are allowed to provide services are adjusted according to the version information updating request and the version updating result of each working node, so that the influence of the version information of the working nodes on the operation efficiency of the distributed system is avoided, and the operation efficiency of the distributed system is improved.
In the step S502, when the software version in the working node needs to be updated, the user may submit an update request for updating the version information of the working node to the operation and maintenance node, and the operation and maintenance node sends the list expansion instruction after acquiring the update request, so that the master node expands the legal version information list.
In this embodiment, the operation and maintenance node may further obtain version upgrade results of the working nodes, and after the version upgrade results of the working nodes meet a preset condition, the operation and maintenance node sends a list contraction instruction, so that the master node obtains the list contraction instruction from the operation and maintenance node. For example, after the version information of each working node is upgraded to the version information with the highest version level in the expanded legal version information list, a list contraction instruction is sent.
According to the method in the embodiment of the application, for the working node with abnormal communication, the working node cannot communicate with the main node and the operation and maintenance node, so that the main node cannot upgrade the working node, after the operation and maintenance node sends the list contraction instruction according to the upgrading result of other working nodes with normal communication, if the working node with abnormal communication recovers normal communication, the main node can determine that the version information of the working node with abnormal communication is illegal according to the contracted legal version information list, so that the working node is not allowed to provide service, the compatibility problem caused by the fact that the versions of the working nodes are not consistent is avoided, the operation efficiency of a distributed system is guaranteed, and the purpose of safely and efficiently upgrading the versions is achieved.
Corresponding to the above node control method and version control method, this embodiment further provides a distributed system, as shown in fig. 1, including: a master node and a worker node; in the system, the master node can acquire the version information of each working node, store a legal version information list, determine whether the working node is allowed to provide service according to the acquired version information of the working node and the legal version information list, and the working node can provide service or stop providing service according to the determination result of the master node.
In the system, the working nodes can also send heartbeat connection information to the main node according to a preset heartbeat cycle, the heartbeat connection information comprises version information of corresponding working nodes, correspondingly, the main node can receive the heartbeat connection information sent by each working node, and the version information of the corresponding working nodes is extracted from the heartbeat connection information.
The system also comprises an operation and maintenance node, wherein the main node can locally read the legal version information list, or the legal version information list is obtained from the operation and maintenance node.
The system also comprises an operation and maintenance node, wherein the main node can acquire a list updating instruction from the operation and maintenance node and modify the legal version information list according to the list updating instruction.
In one embodiment, the list updating instruction includes a list expansion instruction, the master node determines first version information to be added in the legal version information list according to the list expansion instruction, the version level corresponding to the first version information is higher than the version level corresponding to any version information in the legal version information list, and the master node adds the first version information in the legal version information list. In this embodiment, the operation and maintenance node may obtain an upgrade request for upgrading the version information of the working node, and send a list expansion instruction according to the upgrade request, so that the master node obtains the list expansion instruction.
In another embodiment, the list updating instruction includes a list contraction instruction, the master node may determine, according to the list contraction instruction, second version information to be deleted in the legal version information list, where the second version information is not version information with the highest version rank in the legal version information list, and the master node deletes the second version information in the legal version information list. In this embodiment, the operation and maintenance node may obtain the version upgrade result of each working node, and send the list contraction instruction after the version upgrade result of each working node meets the preset condition, so that the master node obtains the list contraction instruction. For example, after the version information of each working node is upgraded to the version information with the highest version level in the expanded legal version information list, the operation and maintenance node sends a list contraction instruction.
The distributed system can realize the processes of the node control method and the version control method, and has the same effect, for example, the influence of the version information of the working node on the operation efficiency of the distributed system can be avoided, the operation efficiency of the distributed system is improved, and the processes are not repeated.
Corresponding to the above node control method, this embodiment further provides a node control device, fig. 6 is a schematic diagram of module compositions of the node control device provided in this embodiment of the present application, and as shown in fig. 6, the device includes an obtaining module 61 and a determining module 62. An obtaining module 61, configured to obtain version information of each working node, and obtain a legal version information list, where the legal version information list includes one or more version information of working nodes that are allowed to provide services, and a determining module 62, configured to determine whether to allow a working node to provide services according to the obtained version information of the working node and the legal version information list.
Optionally, the obtaining module 61 is specifically configured to: receiving heartbeat connection information sent by each working node, where the heartbeat connection information includes version information of a corresponding working node, the heartbeat connection information is sent by the corresponding working node according to a preset heartbeat cycle, and the obtaining module 61 extracts the version information of the corresponding working node from the heartbeat connection information.
Optionally, the distributed system further includes an operation and maintenance node, and the obtaining module 61 is specifically configured to: and reading the legal version information list from the local or acquiring the legal version information list from the operation and maintenance node.
Optionally, the distributed system further includes an operation and maintenance node, and the apparatus further includes a list modification module, configured to obtain a list update instruction from the operation and maintenance node, and modify the legal version information list according to the obtained list update instruction.
Optionally, the list updating instruction includes a list expanding instruction, and the list modifying module is specifically configured to: and determining first version information to be added in a legal version information list according to the list expansion instruction, wherein the version grade corresponding to the first version information is higher than the version grade corresponding to any version information in the legal version information list, and adding the first version information into the legal version information list.
Optionally, the list updating instruction includes a list contraction instruction, and the list modification module is specifically configured to: and determining second version information to be deleted in the legal version information list according to the list contraction instruction, wherein the second version information is not the version information with the highest version grade in the legal version information list, and deleting the second version information in the legal version information list.
Optionally, the list contraction instruction is sent by the operation and maintenance node after determining that the version upgrade result of each working node meets the preset condition.
The node control device can realize each process of the above node control method, and has the same effect, for example, whether the working node is allowed to provide service can be determined based on the version information and the legal version information list of the working node in the distributed system, so that the influence of the version information of the working node on the operation efficiency of the distributed system is avoided, the operation efficiency of the distributed system is improved, and the operation is not repeated.
Corresponding to the above version control method, this embodiment further provides a version control apparatus, fig. 7 is a schematic block diagram of the version control apparatus provided in this embodiment of the present application, and as shown in fig. 7, the apparatus includes a first sending module 71, a result obtaining module 72, and a second sending module 73. In fig. 7, a first sending module 71 is configured to send a list expansion instruction for expanding a legal version information list after an upgrade request for upgrading version information of a working node is obtained, where the legal version information list includes one or more pieces of version information of the working node that is allowed to provide a service, and a result obtaining module 72 is configured to obtain a version upgrade result of each working node; and a second sending module 73, configured to send a list contraction instruction for contracting the legal version information list after the version upgrade result of each working node meets a preset condition.
The second sending module 73 may send a list contraction instruction after the version information of each working node is upgraded to the version information with the highest version level in the expanded legal version information list.
The version control device can realize each process of the version control method and has the same effect, for example, one or more version information of the working nodes which are allowed to provide service can be adjusted according to the upgrading request of the version information and the version upgrading result of each working node, so that the influence of the version information of the working nodes on the operation efficiency of the distributed system is avoided, the operation efficiency of the distributed system is improved, and the process is not repeated.
Fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application, and as shown in fig. 8, the electronic device may generate a relatively large difference due to different configurations or performances, and may include one or more processors 901 and a memory 902, where the memory 902 may store one or more stored applications or data. Memory 902 may be, among other things, transient storage or persistent storage. The application program stored in memory 902 may include one or more modules (not shown), each of which may include a series of computer-executable instructions for the electronic device. Still further, the processor 901 may be configured to communicate with the memory 902 to execute a series of computer-executable instructions in the memory 902 on the electronic device. The electronic device may also include one or more power supplies 903, one or more wired or wireless network interfaces 904, one or more input-output interfaces 905, one or more keyboards 906, and the like.
In a particular embodiment, the electronic device is a node control device comprising a memory, and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may comprise one or more modules, and each module may comprise a series of computer-executable instructions for the node control device, and the one or more programs configured for execution by the one or more processors comprise computer-executable instructions for:
the method comprises the steps of obtaining version information of each working node and obtaining a legal version information list, wherein the legal version information list comprises one or more version information of the working nodes allowed to provide services, and determining whether the working nodes are allowed to provide the services or not according to the obtained version information of the working nodes and the legal version information list.
Optionally, when executed, the step of obtaining version information of each working node includes: and receiving heartbeat connection information sent by each working node, wherein the heartbeat connection information comprises version information of the corresponding working node, the heartbeat connection information is sent by the corresponding working node according to a preset heartbeat cycle, and the version information of the corresponding working node is extracted from the heartbeat connection information.
Optionally, the distributed system further includes an operation and maintenance node, and the step of obtaining the legal version information list when the computer executable instructions are executed includes: and reading the legal version information list from the local or acquiring the legal version information list from the operation and maintenance node.
Optionally, the distributed system further comprises an operation and maintenance node, and the computer executable instructions, when executed, may further: and acquiring a list updating instruction from the operation and maintenance node, and modifying the legal version information list according to the list updating instruction.
Optionally, when executed, the list updating instructions include list expanding instructions, and the step of modifying the legal version information list according to the list updating instructions includes: and determining first version information to be added in the legal version information list according to the list expansion instruction, wherein the version grade corresponding to the first version information is higher than the version grade corresponding to any version information in the legal version information list, and adding the first version information into the legal version information list.
Optionally, when executed, the list update instructions include list shrink instructions, and the step of modifying the legal version information list according to the list update instructions includes: and determining second version information to be deleted in the legal version information list according to the list contraction instruction, wherein the second version information is not the version information with the highest version grade in the legal version information list, and deleting the second version information in the legal version information list.
Optionally, the computer executable instructions, when executed, further comprise: the operation and maintenance node acquires the version upgrading result of each working node; and after the version upgrading result of each working node meets the preset condition, the operation and maintenance node sends a list contraction instruction.
The node control device can realize each process of the above node control method, and has the same effect, for example, whether the working node is allowed to provide service can be determined based on the version information and the legal version information list of the working node in the distributed system, so that the influence of the version information of the working node on the operation efficiency of the distributed system is avoided, the operation efficiency of the distributed system is improved, and the operation is not repeated.
In another specific embodiment, the electronic device is a version control device comprising a memory, and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may comprise one or more modules, and each module may comprise a series of computer-executable instructions for the node control device, and the one or more programs configured for execution by the one or more processors comprise computer-executable instructions for:
the method comprises the steps of sending a list expansion instruction for expanding a legal version information list after an upgrading request for upgrading version information of working nodes is obtained, wherein the legal version information list comprises one or more pieces of version information of the working nodes which are allowed to provide services, obtaining version upgrading results of the working nodes, and sending a list contraction instruction for contracting the legal version information list after the version upgrading results of the working nodes meet preset conditions.
The method comprises the following steps of sending a list contraction instruction for contracting a legal version information list after the version upgrading result of each working node meets a preset condition, wherein the step comprises the following steps: and after the version information of each working node is upgraded to the version information with the highest version grade in the expanded legal version information list, sending a list contraction instruction.
The version control device can realize each process of the version control method, and has the same effect, for example, one or more version information of the working node which is allowed to provide service can be adjusted according to the upgrade request of the version information and the version upgrade result of each working node, so that the influence of the version information of the working node on the operation efficiency of the distributed system is avoided, the operation efficiency of the distributed system is improved, and the process is not repeated.
Further, based on the above node control method, an embodiment of the present application further provides a storage medium for storing computer-executable instructions, and in a specific embodiment, the storage medium may be a usb disk, an optical disk, a hard disk, and the like, and when the computer-executable instructions stored in the storage medium are executed by a processor, the following process can be implemented:
the method comprises the steps of obtaining version information of each working node and obtaining a legal version information list, wherein the legal version information list comprises one or more version information of the working nodes allowed to provide services, and determining whether the working nodes are allowed to provide the services or not according to the obtained version information of the working nodes and the legal version information list.
Optionally, when executed, the step of obtaining version information of each working node includes: and receiving heartbeat connection information sent by each working node, wherein the heartbeat connection information comprises version information of the corresponding working node, the heartbeat connection information is sent by the corresponding working node according to a preset heartbeat cycle, and the version information of the corresponding working node is extracted from the heartbeat connection information.
Optionally, the distributed system further includes an operation and maintenance node, and the step of obtaining the legal version information list when the computer executable instructions are executed includes: and reading the legal version information list from the local or acquiring the legal version information list from the operation and maintenance node.
Optionally, the distributed system further comprises an operation and maintenance node, and the computer executable instructions, when executed, may further: and acquiring a list updating instruction from the operation and maintenance node, and modifying the legal version information list according to the list updating instruction.
Optionally, when executed, the list updating instructions include list expanding instructions, and the step of modifying the legal version information list according to the list updating instructions includes: and determining first version information to be added in the legal version information list according to the list expansion instruction, wherein the version grade corresponding to the first version information is higher than the version grade corresponding to any version information in the legal version information list, and adding the first version information into the legal version information list.
Optionally, when executed, the list update instructions include list shrink instructions, and the step of modifying the legal version information list according to the list update instructions includes: and determining second version information to be deleted in the legal version information list according to the list contraction instruction, wherein the second version information is not the version information with the highest version grade in the legal version information list, and deleting the second version information in the legal version information list.
Optionally, the computer executable instructions, when executed, further comprise: the operation and maintenance node acquires the version upgrading result of each working node; and after the version upgrading result of each working node meets the preset condition, the operation and maintenance node sends the list contraction instruction.
The storage medium can implement each process of the above node control method, and has the same effect, for example, whether the work node is allowed to provide a service can be determined based on the version information and the legal version information list of the work node in the distributed system, so that the influence of the version information of the work node on the operation efficiency of the distributed system is avoided, the operation efficiency of the distributed system is improved, and the operations are not repeated.
Further, based on the version control method, an embodiment of the present application further provides a storage medium for storing computer-executable instructions, and in a specific embodiment, the storage medium may be a usb disk, an optical disk, a hard disk, and the like, and when the computer-executable instructions stored in the storage medium are executed by a processor, the following process can be implemented:
the method comprises the steps of sending a list expansion instruction for expanding a legal version information list after an upgrading request for upgrading version information of working nodes is obtained, wherein the legal version information list comprises one or more pieces of version information of the working nodes which are allowed to provide services, obtaining version upgrading results of the working nodes, and sending a list contraction instruction for contracting the legal version information list after the version upgrading results of the working nodes meet preset conditions.
The method comprises the following steps of sending a list contraction instruction for contracting a legal version information list after the version upgrading result of each working node meets a preset condition, wherein the step comprises the following steps: and after the version information of each working node is upgraded to the version information with the highest version grade in the expanded legal version information list, sending a list contraction instruction.
The storage medium can implement each process of the above version control method, and has the same effect, for example, one or more version information of the working node that is allowed to provide the service can be adjusted according to the upgrade request of the version information and the version upgrade result of each working node, so that the influence of the version information of the working node on the operation efficiency of the distributed system is avoided, the operation efficiency of the distributed system is improved, and the process is not repeated here.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually making an integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as abel (advanced Boolean Expression Language), ahdl (alternate Language Description Language), traffic, pl (core unified Programming Language), HDCal, JHDL (Java Hardware Description Language), langue, Lola, HDL, laspam, hardsradware (Hardware Description Language), vhjhd (Hardware Description Language), and vhigh-Language, which are currently used in most common. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (31)

1. A node control method for a distributed system including a work node capable of providing a service, the method comprising:
the method comprises the steps of obtaining version information of each working node and obtaining a legal version information list, wherein the legal version information list comprises one or more version information of the working nodes which are allowed to provide services;
and determining whether the working node is allowed to provide service or not according to the acquired version information of the working node and the legal version information list.
2. The method of claim 1, wherein the step of obtaining version information of each worker node comprises:
receiving heartbeat connection information sent by each working node, wherein the heartbeat connection information comprises version information of the corresponding working node, and the heartbeat connection information is sent by the corresponding working node according to a preset heartbeat period;
and extracting version information of the corresponding working node from the heartbeat connection information.
3. The method of claim 1, wherein the distributed system further comprises an operation and maintenance node, and the step of obtaining the legal version information list comprises:
reading the legal version information list from the local;
alternatively, the first and second electrodes may be,
and acquiring the legal version information list from the operation and maintenance node.
4. The method of claim 1, wherein the distributed system further comprises an operation and maintenance node, the method further comprising:
obtaining a list update instruction from the operation and maintenance node;
and modifying the legal version information list according to the list updating instruction.
5. The method of claim 4, wherein the list update instruction comprises a list expansion instruction, and wherein the step of modifying the list of legitimate version information according to the list update instruction comprises:
determining first version information to be added in the legal version information list according to the list expansion instruction, wherein the version grade corresponding to the first version information is higher than the version grade corresponding to any version information in the legal version information list;
and adding the first version information into the legal version information list.
6. The method of claim 4, wherein the list update instruction comprises a list shrink instruction, and wherein modifying the list of legitimate version information according to the list update instruction comprises:
according to the list contraction instruction, determining second version information to be deleted in the legal version information list, wherein the second version information is not the version information with the highest version grade in the legal version information list;
and deleting the second version information in the legal version information list.
7. The method of claim 6, wherein the list shrink instruction is sent by the operation and maintenance node after determining that the version upgrade result of each working node meets a preset condition.
8. A version control method for a distributed system comprising work nodes capable of providing services, the method comprising:
after an upgrading request for upgrading the version information of the working node is obtained, a list expansion instruction for expanding a legal version information list is sent, wherein the legal version information list comprises one or more version information of the working node which is allowed to provide service;
acquiring version upgrading results of all the working nodes;
and sending a list contraction instruction for contracting the legal version information list after the version upgrading result of each working node meets a preset condition.
9. The method of claim 8, wherein the step of sending a list contraction instruction for contracting the legal version information list after the version upgrade result of each working node meets a preset condition comprises:
and after the version information of each working node is upgraded to the version information with the highest version grade in the expanded legal version information list, sending the list contraction instruction.
10. A distributed system, comprising: a master node and a worker node capable of providing a service;
the master node is used for acquiring the version information of each working node and storing a legal version information list; determining whether the working node is allowed to provide service according to the acquired version information of the working node and the legal version information list;
and the working node is used for providing service or stopping providing service according to the determination result of the main node.
11. The system according to claim 10, wherein the working node is further configured to send heartbeat connection information to the master node according to a preset heartbeat cycle, where the heartbeat connection information includes version information of a corresponding working node;
the master node is specifically configured to:
receiving the heartbeat connection information sent by each working node;
and extracting version information of the corresponding working node from the heartbeat connection information.
12. The system of claim 10, wherein the system further comprises an operation and maintenance node, and the master node is specifically configured to:
reading the legal version information list from the local;
alternatively, the first and second electrodes may be,
and acquiring the legal version information list from the operation and maintenance node.
13. The system of claim 10, wherein the system further comprises an operation and maintenance node, the master node further configured to:
obtaining a list update instruction from the operation and maintenance node;
and modifying the legal version information list according to the list updating instruction.
14. The system of claim 13, wherein the list update instruction comprises a list expansion instruction, the master node being specifically configured to:
determining first version information to be added in the legal version information list according to the list expansion instruction, wherein the version grade corresponding to the first version information is higher than the version grade corresponding to any version information in the legal version information list;
and adding the first version information into the legal version information list.
15. The system of claim 13, wherein the list update instruction comprises a list shrink instruction, the master node being further configured to:
according to the list contraction instruction, determining second version information to be deleted in the legal version information list, wherein the second version information is not the version information with the highest version grade in the legal version information list;
and deleting the second version information in the legal version information list.
16. The system of claim 14, wherein the operation and maintenance node is to:
acquiring an upgrading request for upgrading the version information of the working node;
and sending the list expansion instruction according to the upgrading request.
17. The system of claim 15, wherein the operation and maintenance node is to:
acquiring version upgrading results of all the working nodes;
and sending the list contraction instruction after the version upgrading result of each working node meets the preset condition.
18. The system of claim 17, wherein the operation and maintenance node is specifically configured to:
and after the version information of each working node is upgraded to the version information with the highest version grade in the expanded legal version information list, sending the list contraction instruction.
19. A node control apparatus for a distributed system including a work node capable of providing a service, the apparatus comprising:
the system comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring version information of each working node and acquiring a legal version information list, and the legal version information list comprises one or more version information of the working nodes which are allowed to provide services;
and the determining module is used for determining whether the working node is allowed to provide service according to the acquired version information of the working node and the legal version information list.
20. The apparatus of claim 19, wherein the acquisition module is specifically configured to:
receiving heartbeat connection information sent by each working node, wherein the heartbeat connection information comprises version information of the corresponding working node, and the heartbeat connection information is sent by the corresponding working node according to a preset heartbeat period;
and extracting version information of the corresponding working node from the heartbeat connection information.
21. The apparatus of claim 19, wherein the distributed system further comprises an operation and maintenance node, and the obtaining module is specifically configured to:
reading the legal version information list from the local;
alternatively, the first and second electrodes may be,
and acquiring the legal version information list from the operation and maintenance node.
22. The apparatus of claim 19, wherein the distributed system further comprises an operation and maintenance node, the apparatus further comprising a list modification module to:
acquiring a list updating instruction from the operation and maintenance node;
and modifying the legal version information list according to the list updating instruction.
23. The apparatus of claim 22, wherein the list update instructions comprise list expansion instructions, the list modification module being specifically configured to:
determining first version information to be added in the legal version information list according to the list expansion instruction, wherein the version grade corresponding to the first version information is higher than the version grade corresponding to any version information in the legal version information list;
and adding the first version information into the legal version information list.
24. The apparatus of claim 22, wherein the list update instruction comprises a list shrink instruction, the list modification module being further configured to:
according to the list contraction instruction, determining second version information to be deleted in the legal version information list, wherein the second version information is not the version information with the highest version grade in the legal version information list;
and deleting the second version information in the legal version information list.
25. The apparatus of claim 24, wherein the list shrink instruction is sent by the operation and maintenance node after determining that the version upgrade result of each working node meets a preset condition.
26. A version control apparatus for a distributed system including a work node capable of providing a service, the apparatus comprising:
the first sending module is used for sending a list expansion instruction for expanding a legal version information list after an upgrading request for upgrading the version information of the working node is obtained, wherein the legal version information list comprises one or more version information of the working node which is allowed to provide service;
the result acquisition module is used for acquiring the version upgrading result of each working node;
and the second sending module is used for sending a list contraction instruction for contracting the legal version information list after the version upgrading result of each working node meets the preset condition.
27. The apparatus of claim 26, wherein the second sending module is specifically configured to:
and after the version information of each working node is upgraded to the version information with the highest version grade in the expanded legal version information list, sending the list contraction instruction.
28. A node control apparatus for a distributed system, comprising:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to perform a node control method according to any one of claims 1 to 7.
29. A storage medium storing computer-executable instructions, wherein the computer-executable instructions, when executed, implement the node control method of any one of claims 1 to 7.
30. A version control device for a distributed system, comprising:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to perform a versioning method according to any one of claims 8 to 9.
31. A storage medium storing computer-executable instructions, wherein the computer-executable instructions, when executed, implement the versioning method of any of claims 8 to 9.
CN201810644099.7A 2018-06-21 2018-06-21 Node control method and device, version control method and device and distributed system Active CN110633096B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810644099.7A CN110633096B (en) 2018-06-21 2018-06-21 Node control method and device, version control method and device and distributed system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810644099.7A CN110633096B (en) 2018-06-21 2018-06-21 Node control method and device, version control method and device and distributed system

Publications (2)

Publication Number Publication Date
CN110633096A true CN110633096A (en) 2019-12-31
CN110633096B CN110633096B (en) 2023-09-15

Family

ID=68966476

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810644099.7A Active CN110633096B (en) 2018-06-21 2018-06-21 Node control method and device, version control method and device and distributed system

Country Status (1)

Country Link
CN (1) CN110633096B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112948382A (en) * 2021-02-26 2021-06-11 平安科技(深圳)有限公司 Information processing method and device based on big data and related equipment
CN115361428A (en) * 2022-10-21 2022-11-18 北京鼎轩科技有限责任公司 Remote control method and grading system
CN115373733A (en) * 2022-10-26 2022-11-22 小米汽车科技有限公司 Model version adjusting method and device of model service and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102546675A (en) * 2010-12-08 2012-07-04 鸿富锦精密工业(深圳)有限公司 Software upgrading system and method
US20140304697A1 (en) * 2011-12-01 2014-10-09 Tencent Technology (Shenzhen) Company Limited Method and system for upgrading software
CN104133715A (en) * 2014-08-13 2014-11-05 杭州华三通信技术有限公司 Ethernet power supply equipment firmware upgrade method and device
CN107391156A (en) * 2017-07-31 2017-11-24 成都华为技术有限公司 Method, management node and service node for distributed system transmission services
CN107515776A (en) * 2017-07-18 2017-12-26 深信服科技股份有限公司 The uninterrupted upgrade method of business, node to be upgraded and readable storage medium storing program for executing

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102546675A (en) * 2010-12-08 2012-07-04 鸿富锦精密工业(深圳)有限公司 Software upgrading system and method
US20140304697A1 (en) * 2011-12-01 2014-10-09 Tencent Technology (Shenzhen) Company Limited Method and system for upgrading software
CN104133715A (en) * 2014-08-13 2014-11-05 杭州华三通信技术有限公司 Ethernet power supply equipment firmware upgrade method and device
CN107515776A (en) * 2017-07-18 2017-12-26 深信服科技股份有限公司 The uninterrupted upgrade method of business, node to be upgraded and readable storage medium storing program for executing
CN107391156A (en) * 2017-07-31 2017-11-24 成都华为技术有限公司 Method, management node and service node for distributed system transmission services

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112948382A (en) * 2021-02-26 2021-06-11 平安科技(深圳)有限公司 Information processing method and device based on big data and related equipment
CN115361428A (en) * 2022-10-21 2022-11-18 北京鼎轩科技有限责任公司 Remote control method and grading system
CN115373733A (en) * 2022-10-26 2022-11-22 小米汽车科技有限公司 Model version adjusting method and device of model service and electronic equipment

Also Published As

Publication number Publication date
CN110633096B (en) 2023-09-15

Similar Documents

Publication Publication Date Title
CN106970873B (en) On-line mock testing method, device and system
JP6921206B2 (en) Database state determination method and device and consistency verification method and device
CN108959341B (en) Data synchronization method, device and equipment
CN108459898B (en) Resource recovery method and device
CN110633096A (en) Node control method and device, version control method and device and distributed system
CN109284066B (en) Data processing method, device, equipment and system
CN110377580B (en) Data migration method, device and equipment
CN113744064B (en) Method and apparatus for performing transactions in block link points
CN111752633A (en) Code loading method, device and equipment
CN110807013B (en) Data migration method and device for distributed data storage cluster
CN111459724A (en) Node switching method, device, equipment and computer readable storage medium
CN111273965B (en) Container application starting method, system and device and electronic equipment
CN110704090A (en) FPGA (field programmable Gate array) and upgrading method and upgrading system thereof
CN104461621A (en) Attribute information updating method and device
CN111866169A (en) Service updating method, device and system
CN115617799A (en) Data storage method, device, equipment and storage medium
CN110244964B (en) Operation and maintenance method, device and equipment based on operation and maintenance application
CN113254163B (en) Processing method and device of block chain data
CN113806139B (en) Operating system recovery method, operating system recovery device, storage medium and computer program product
CN112596780A (en) Service execution method and device
CN107291439B (en) Target incremental data construction method and device
CN115080538A (en) Block chain version verification method and device
CN106990944B (en) Code resource management method, device and system
CN114297734A (en) Data identifier generation method, device, equipment and medium
JP2020099061A (en) Circuit device, circuit rewriting method, and program

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