CN110633096B - 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
CN110633096B
CN110633096B CN201810644099.7A CN201810644099A CN110633096B CN 110633096 B CN110633096 B CN 110633096B CN 201810644099 A CN201810644099 A CN 201810644099A CN 110633096 B CN110633096 B CN 110633096B
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.)
Active
Application number
CN201810644099.7A
Other languages
Chinese (zh)
Other versions
CN110633096A (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

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

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, 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 determining whether the working nodes are allowed to provide service 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
Distributed systems are typically composed of a plurality of nodes, each running a software program, to provide services externally, such as providing data query services. In the distributed system, the nodes have corresponding version information, and the version information can be the version information of the software program in the nodes, and in the running process of the distributed system, version upgrading needs to be carried out on each node, so that each node can provide internet service more efficiently.
Considering that the version information of the nodes in the distributed system has a certain influence on the operation efficiency of the distributed system, for example, when the version information of the nodes of the distributed system is not completely consistent, the problem of incompatibility of data processing may be caused, and the data processing efficiency of the distributed system is reduced. Therefore, it is necessary to provide a technical solution to control the node based on the version information of the node, so as to avoid the influence of the version information of the node on the operation efficiency of the distributed system and improve the operation efficiency of the distributed system.
Disclosure of Invention
The embodiment of the application aims to provide a node control method and device, a version control method and device and a distributed system, which can determine whether to allow a working node to provide service or not based on version information and legal version information lists 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.
To solve the above-mentioned object, the embodiments of the present application are realized 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:
Acquiring version information of each working node, and acquiring 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 to allow the working node 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 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 version information of the working node is obtained, a list expanding instruction for expanding a legal version information list is sent; wherein the legal version information list includes one or more version information of a work node that is allowed to provide a service;
the method comprises the steps of obtaining version upgrading results of all working nodes;
and after the version upgrading result of each working node meets the preset condition, a list shrinkage instruction for shrinking the legal version information list is sent.
An embodiment of the present application provides a distributed system, including: a master node and a working node capable of providing services;
the master node is used for acquiring the version information of each working node and storing a legal version information list; determining whether to allow the working node 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 the service according to the determination result of the master node or stopping providing the service.
An embodiment of the present application provides a node control apparatus for a distributed system including a working node capable of providing a service, the apparatus including:
the system comprises an acquisition module, a storage module and a storage module, wherein the acquisition module is used for acquiring version information of each working node and acquiring a legal version information list, wherein the legal version information list comprises one or more version information of the working node which is allowed to provide service;
and the determining module is used for 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 device for a distributed system, wherein the distributed system comprises a working node capable of providing service, and the device comprises:
the first sending module is used for sending a list expansion instruction for expanding a legal version information list after obtaining an upgrading request for upgrading the version information of the working node, 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.
The embodiment of the application provides node control equipment, which comprises the following components: 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 which when executed implement the node control method.
The embodiment of the application provides version control equipment, which comprises the following components: a processor; and a memory arranged to store computer executable instructions that, when executed, cause the processor to perform the version control method described above.
The embodiment of the application provides a storage medium for storing computer executable instructions which when executed implement the version control method described above.
By means of the technical scheme, whether the working node is allowed to provide service or not can be determined based on the version information and 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 that are required in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a distributed system according to an embodiment of the present application;
fig. 2 is a flow chart of a node control method according to an embodiment of the present application;
FIG. 3 is a schematic diagram illustrating legal version information list expansion according to an embodiment of the present application;
FIG. 4 is a schematic diagram illustrating legal version information list contraction 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 device according to an embodiment of the present application;
FIG. 7 is a schematic diagram illustrating a module configuration of a version control device 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 the technical solution of the present application better understood by those skilled in the art, the technical solution of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, shall fall within the scope of the 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 to allow a working node to provide service or not based on version information and legal version information lists 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 describes the embodiments in detail.
Fig. 1 is a schematic structural diagram of a distributed system according to an embodiment of the present application, as shown in fig. 1, where the distributed system includes a master node 100, a working node 200, and an operation and maintenance node 300, where the working node 200 may be multiple, each working 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 control of the distributed system, and the master node 100 is used for storing metadata. When each working node 200 is started, a registration request needs to be sent to the master node 100, 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 and provide services, such as providing data query service, according to the notification information of successful registration. On the contrary, if the master node 100 refuses the registration of the working node 200 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 the service according to the notification information of registration failure.
In fig. 1, the master node 100, the working node 200, and the operation and maintenance node 300 may each be composed of one or more servers.
Fig. 2 is a flowchart of a node control method for the distributed system according to an embodiment of the present application, where the method can be performed by the master node 100 in fig. 1, and as shown in fig. 2, 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 services;
step S204, determining whether to allow the working node 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 service can be determined based on the version information and 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 service is allowed to be provided by the working node, the working node provides the service according to the determination result of the master node, otherwise, if the master node determines that the service is not allowed to be provided by the working node, the working node stops providing the service according to the determination result of the master node. The working node may provide a service according to the control of the master node, for example, the working node may provide a data query service according to the control of the master node.
In the step S202, the master node obtains version information of the working node in the distributed system, specifically: 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 period, and the master 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, where the version information of the working node includes, but is not limited to, a version identifier of software in the working node, and correspondingly, the master node receives the heartbeat connection information sent by the working node, and extracts the version information of the working node from the heartbeat connection information.
In one 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 at the time of starting carries version information of the working node, so that the master node obtains the version information of the working node.
In the step S204, the master node obtains a legal version information list corresponding to the distributed system, which may be: the master 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 legal version information includes one or more version information of the worker node that is allowed to provide the service. In one embodiment, the operation and maintenance node periodically transmits the legal version information list to the master node, and the master node stores the legal version information list locally and reads the legal version information list from the local. In another embodiment, after receiving the version information of the working node which is input by the user and is allowed to provide the service, the operation and maintenance node generates a legal version information list, and writes the legal version information list in the master node, so that the master node reads the legal version information list locally. In yet another embodiment, the master node periodically reads the legal version information list from the storage space of the operation and maintenance node.
In the step S206, the master node determines whether to allow the working node to provide services according to the obtained version information and legal version information list of the working node, specifically: and 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, allowing the working node to provide 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, not allowing the working node to provide 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 version of the working node is determined to be illegal, the working node is not allowed to provide services, so that the problem that the services provided by all the working nodes are not compatible because the working node provides services 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 identifiers of the working nodes, for example, three working nodes a, b and c are all used, and the version identifiers are "version 1", "version 2" and "version 3" respectively. The master node determines that the version identification 'version 3' 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, so that the master node determines that the working node c is allowed to provide services and controls the working node c to provide the services, and the master node determines that the working nodes a and b are not allowed to provide the services and controls the working nodes a and b to stop providing the services, thereby avoiding the problems that the working nodes provide the services based on illegal versions, the services provided by the working nodes are easily incompatible, and the running efficiency of the distributed system is reduced.
In another specific embodiment, a version identifier, such as "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, heartbeat connection information is sent once every 20 seconds, where the heartbeat connection information includes version identifiers of the working nodes, for example, three working nodes a, b and c in total, and the version identifiers are "version 1", "version 2" and "version 3" respectively. The master node determines that the version identifiers of the working node c are 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, so that the master node determines that the working node c is allowed to provide services and controls the working node c to provide the services, and the master node determines that the working nodes a and b are not allowed to provide the services and controls the working nodes a and b to stop providing the services, thereby avoiding the problems that the services provided by the working nodes are not compatible and the running efficiency of the distributed system is reduced because the working nodes provide the services based on the illegal version.
Therefore, by the method and the system in the embodiment, the working node with the illegal version is not allowed to provide the service, so that the problem that the service provided by each working node is not compatible because the working node provides the service based on the illegal version is avoided, and the running 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. The list updating instruction comprises a list expanding instruction and a list contracting instruction.
In one embodiment, after acquiring the upgrade request for upgrading the version information of the working node, the operation and maintenance node transmits a list expansion instruction for expanding the legal version information list, so that the master node acquires the list expansion instruction from the operation and maintenance node. The master node determines first version information to be added in a legal version information list according to a 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 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 of valid version information list expansion provided in 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 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, then the operation and maintenance node sends a list expansion instruction to a master node according to the upgrade request, the list expansion instruction carries a version identifier "version 2" of version 2, the master node receives the list expansion instruction, and adds a version identifier "version 2" into a valid version information list according to the list expansion instruction, thereby realizing expansion of the valid version information list.
In this embodiment, considering that the version upgrade is a process of upgrading from a low version to a high version, 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 upgrade process, there is a need to upgrade part of the working nodes first and upgrade part of the working nodes later, so in the upgrade process, both the existing version information and the newly added first version information in the legal version information list are legal version information, for example, in fig. 3, the version identifier "version 1" and the version identifier "version 2" are legal version information, and accordingly, both the version 1 and the version 2 are legal versions.
In other embodiments, the first version information to be added may be multiple, 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 extended from { version 1} to { version 1, version 2, version 3}.
Accordingly, considering that version information before upgrading is useless version information after upgrading of the working nodes is completed, in this embodiment, the operation and maintenance node may also obtain version upgrading results of each working node, and after the version upgrading results of each working node meet preset conditions, the operation and maintenance node sends out a 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, where the second version information is not version information with the highest version level in the legal version information list, and delete the second version information in the legal version information list, so as to contract 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 version information of each working node is updated to version information with highest version level in the expanded legal version information list, and after version information of each working node is updated to version information with highest version level in the expanded legal version information list, the operation and maintenance node sends a list contraction instruction. In other embodiments, the preset condition may be that more than a predetermined number of working nodes are upgraded to version information with highest version level in the expanded legal version information list, and the operation and maintenance node sends the list contraction instruction after determining that more than the predetermined number of working nodes are upgraded to version information with 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 level in the legal version information list, so that it is ensured that after the upgrade is completed, the version information with the low level is deleted, and the version information with the high level is reserved.
Fig. 4 is a schematic diagram of legal version information list contraction provided in an embodiment of the present application, as shown in fig. 4, by adapting the example in fig. 3, an operation and maintenance node may periodically check whether versions of working nodes are all upgraded to version 2, if it is detected that versions of all working nodes are upgraded to version 2, the operation and maintenance node sends a list contraction instruction to a master node, where the list contraction instruction carries a version identifier to be deleted, such as "version 1" of version 1, and the master node determines that second version information to be deleted in the legal version information list is "version 1" according to the list contraction instruction, and the master node deletes "version 1" in the legal version information list, thereby implementing contraction of the legal version information list.
Through the expansion and contraction process of the legal version information list, the legal version information list can be expanded when the version is upgraded, and the new version and the old version are allowed to provide services; legal version information list shrinkage can be performed after version upgrading is completed, so that old versions before upgrading are prevented from continuously providing services. Thus, even if an abnormal node (such as a certain node cannot be upgraded due to network cable drop and then network cable connection is restored) which is updated and is recovered due to short-term communication faults exists, 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 inconsistent versions of all nodes due to the fact that the abnormal node provides service based on an old version before updating is avoided.
For example, in the example shown in fig. 3 and fig. 4, if a node is not successfully upgraded due to the dropped network cable, its version is still version 1, after the network cable of the node is recovered, since 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 services, so that the problem of compatibility caused by inconsistent versions of each node due to the fact that an abnormal node provides services based on the old version before upgrading is avoided.
After manually upgrading the version of the abnormal node, in the embodiment, the upgraded version is legal, so that the abnormal node can continue to provide service.
In summary, embodiments of the present application have at least the following advantages:
(1) Based on the version information and legal version information list of the working nodes in the distributed system, allowing or not allowing the working nodes to provide service, thereby avoiding the influence of the version information of the working nodes on the operation efficiency of the distributed system and improving the operation efficiency of the distributed system;
(2) The illegal version of the working node is not allowed to provide the service, so that the problem that the service provided by each working node is not compatible because the working node provides the service based on the illegal version is avoided, and the running efficiency of the distributed system is improved;
(3) In the process of upgrading the version of the node, for the abnormal node which is in communication failure but not in upgrading, the illegal version of the abnormal node after communication recovery can be determined based on the expansion and contraction processes of the legal version information list, so that the recovered abnormal node is not allowed to provide service, the problem of compatibility caused by inconsistent versions of the working node is avoided, the running efficiency of the distributed system is ensured, and the purpose of safely and efficiently upgrading the version is achieved.
Corresponding to the above-mentioned node control method, the present embodiment further provides a version control method for a distributed system, where the method may be executed by the above-mentioned operation and maintenance node, and fig. 5 is a schematic flow chart of the version control method provided by an embodiment of the present application, and as shown in fig. 5, the method includes:
step S502, after obtaining the upgrade request for upgrading the version information of the working node, transmitting a list expansion instruction for expanding the legal version information list, 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 version upgrading results of all working nodes;
step S506, after the version upgrading result of each working node meets the preset condition, a list shrinking instruction for shrinking the legal version information list is sent.
Therefore, according to the embodiment of the application, the legal version information list, namely one or more version information of the working nodes which are allowed to provide service, can be adjusted according to the version information upgrading request 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, 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 upgraded, the user may submit an upgrade request for upgrading version information of the working node to the operation and maintenance node, and after obtaining the upgrade request, the operation and maintenance node sends the list expansion instruction, so that the master node expands the list of legal version information.
In this embodiment, the operation and maintenance node may further obtain a version upgrade result of each working node, and after the version upgrade result of each working node meets a preset condition, the operation and maintenance node sends out 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.
By the method in the embodiment of the application, for the working node with abnormal communication, the working node cannot communicate with the master node and the operation and maintenance node, so that the master node cannot upgrade the working node, after the operation and maintenance node sends out a list shrinkage instruction according to the upgrade result of other working nodes with normal communication, if the working node with abnormal communication resumes normal communication, the master node can determine that the version information of the working node with abnormal communication is illegal according to the contracted legal version information list, thereby not allowing the working node to provide service, avoiding the compatibility problem caused by inconsistent versions of the working node, ensuring the operation efficiency of a distributed system, and achieving the purpose of safely and efficiently upgrading the version.
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 working node; in the system, the master node can acquire the version information of each working node, store a legal version information list, determine whether to allow the working node 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 node can also send heartbeat connection information to the master node according to a preset heartbeat period, the heartbeat connection information comprises version information of the corresponding working node, and correspondingly, the master node can receive the heartbeat connection information sent by each working node and extract the version information of the corresponding working node from the heartbeat connection information.
The system also comprises an operation and maintenance node, and the master node can read the legal version information list locally or acquire the legal version information list 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 update instruction includes a list expansion instruction, and the master node determines, according to the list expansion instruction, first version information to be added in the legal version information list, where a version level corresponding to the first version information is higher than a version level corresponding to any version information in the legal version information list, and adds the first version information in the legal version information list. In this embodiment, the operation and maintenance node may acquire an upgrade request for upgrading version information of the working node, and issue a list expansion instruction according to the upgrade request, so that the master node acquires the list expansion instruction.
In another embodiment, the list update instruction includes a list shrink instruction, and the master node may determine, according to the list shrink instruction, second version information to be deleted in the legal version information list, where the second version information is not version information with a highest version level in the legal version information list, and delete 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 out the list shrink instruction after the version upgrade result of each working node meets the preset condition, so that the master node obtains the list shrink 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, has the same effects, for example, can avoid the influence of the version information of the working node on the operation efficiency of the distributed system, improves the operation efficiency of the distributed system, and is not repeated here.
Corresponding to the above-mentioned node control method, the present embodiment further provides a node control device, and fig. 6 is a schematic diagram of module components of the node control device according to an embodiment of the present application, as shown in fig. 6, where the device includes an obtaining module 61 and a determining module 62. The obtaining module 61 is 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 the working node that is allowed to provide the service, and the determining module 62 is configured to determine 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.
Optionally, the obtaining module 61 is specifically configured to: 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 acquisition 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 device 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 update instruction includes a list expansion instruction, and the list modification module is specifically configured to: and determining first version information to be added in the legal version information list according to the list expansion instruction, wherein 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 adding the first version information into the legal version information list.
Optionally, the list update instruction includes a list shrink 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 level in the legal version information list, and deleting the second version information in the legal version information list.
Optionally, the list shrink 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 the processes of the node control method and has the same effects, for example, whether the working node is allowed to provide service or not can be determined based on the version information and 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 efficiency of the distributed system is not repeated here.
Corresponding to the version control method described above, the present embodiment further provides a version control device, and fig. 7 is a schematic diagram of module composition of the version control device according to an embodiment of the present application, as shown in fig. 7, where the device 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, after acquiring an upgrade request for upgrading version information of a working node, a list expansion instruction for expanding a legal version information list, where the legal version information list includes one or more version information of the working node that is allowed to provide a service, and a result acquiring module 72 is configured to acquire a version upgrade result of each working node; the second sending module 73 is 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 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.
The version control device can realize the various processes of the version control method and has the same effects, for example, one or more version information of the working nodes which are allowed to provide services 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 operation efficiency of the distributed system is not repeated here.
In this embodiment, an electronic device is further provided, and fig. 8 is a schematic structural diagram of the electronic device provided in an embodiment of the present application, as shown in fig. 8, the electronic device may have 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 storage applications or data. Wherein the memory 902 may be transient storage or persistent storage. The application programs stored in the memory 902 may include one or more modules (not shown), each of which may include a series of computer-executable instructions for use in an electronic device. Still further, the processor 901 may be arranged to communicate with the memory 902 and execute a series of computer executable instructions in the memory 902 on an 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 specific 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 configured to be executed by the one or more processors, the one or more programs comprising computer-executable instructions for:
the method comprises the steps of obtaining version information of each working node, 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 determining whether the working nodes are allowed to provide service or not according to the obtained version information of the working nodes and the legal version information list.
Optionally, the step of obtaining version information of each working node when the computer executable instructions are executed comprises: 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 period, and the version information of the corresponding working node is extracted from the heartbeat connection information.
Optionally, the distributed system further includes an operation 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, the computer executable instructions, when executed, the list update instructions include list expansion instructions, and the step of modifying the legal version information list according to the list update 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 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 adding the first version information into the legal version information list.
Optionally, the computer executable instructions, when executed, the list update instructions comprise list shrink instructions, and the step of modifying the legal version information list according to the list update instructions comprises: 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 level 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 obtains 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 out a list contraction instruction.
The node control device can realize the processes of the node control method and has the same effects, for example, whether the working node is allowed to provide service or not can be determined based on the version information and 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 efficiency of the distributed system is not repeated here.
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 in the node control device, and configured to be executed by the one or more processors, the one or more programs comprising computer-executable instructions for:
After an upgrade request for upgrading version information of the working node is obtained, a list expansion instruction for expanding a legal version information list is sent, the legal version information list comprises one or more version information of the working node which is allowed to provide service, a version upgrade result of each working node is obtained, and after the version upgrade result of each working node meets a preset condition, a list contraction instruction for contracting the legal version information list is sent.
After the version upgrading result of each working node meets the preset condition, a list shrinking instruction for shrinking the legal version information list is sent, and the method comprises the following steps: and 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, sending a list contraction instruction.
The version control device can realize the various processes of the version control method and has the same effects, for example, one or more version information of the working nodes which are allowed to provide services 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 operation efficiency of the distributed system is not repeated here.
Further, based on the above node control method, the embodiment of the present application further provides a storage medium, which is configured to store computer executable instructions, in a specific embodiment, the storage medium may be a U disc, an optical disc, a hard disc, etc., where the computer executable instructions stored in the storage medium when executed by a processor can implement the following procedures:
the method comprises the steps of obtaining version information of each working node, 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 determining whether the working nodes are allowed to provide service or not according to the obtained version information of the working nodes and the legal version information list.
Optionally, the step of obtaining version information of each working node when the computer executable instructions are executed comprises: 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 period, and the version information of the corresponding working node is extracted from the heartbeat connection information.
Optionally, the distributed system further includes an operation 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, the computer executable instructions, when executed, the list update instructions include list expansion instructions, and the step of modifying the legal version information list according to the list update 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 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 adding the first version information into the legal version information list.
Optionally, the computer executable instructions, when executed, the list update instructions comprise list shrink instructions, and the step of modifying the legal version information list according to the list update instructions comprises: 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 level 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 obtains 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 out the list contraction instruction.
The storage medium can realize the processes of the node control method and has the same effects, for example, whether the working node is allowed to provide service can be determined based on the version information and 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 efficiency of the distributed system is not repeated here.
Further, based on the above version control method, the embodiment of the present application further provides a storage medium, which is used for storing computer executable instructions, in a specific embodiment, the storage medium may be a usb disk, an optical disc, a hard disk, etc., where the computer executable instructions stored in the storage medium can implement the following flow when executed by a processor:
after an upgrade request for upgrading version information of the working node is obtained, a list expansion instruction for expanding a legal version information list is sent, the legal version information list comprises one or more version information of the working node which is allowed to provide service, a version upgrade result of each working node is obtained, and after the version upgrade result of each working node meets a preset condition, a list contraction instruction for contracting the legal version information list is sent.
After the version upgrading result of each working node meets the preset condition, a list shrinking instruction for shrinking the legal version information list is sent, and the method comprises the following steps: and 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, sending a list contraction instruction.
The storage medium can realize the various processes of the version control method and has the same effects, for example, one or more version information of the working nodes which are allowed to provide services can be adjusted according to the version information upgrading request 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 operation efficiency of the distributed system is not repeated here.
In the 90 s of the 20 th century, improvements to one technology could clearly be distinguished as improvements in hardware (e.g., improvements to circuit structures such as diodes, transistors, switches, etc.) or software (improvements to the process flow). However, with the development of technology, many improvements of the current method flows can be regarded as direct improvements of hardware circuit structures. Designers almost always obtain corresponding hardware circuit structures by programming improved method flows into hardware circuits. Therefore, an improvement of a method flow cannot be said to be realized by a hardware entity module. For example, a programmable logic device (Programmable Logic Device, PLD) (e.g., field programmable gate array (Field Programmable Gate Array, FPGA)) is an integrated circuit whose logic function is determined by the programming of the device by a user. A designer programs to "integrate" a digital system onto a PLD without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Moreover, nowadays, instead of manually manufacturing integrated circuit chips, such programming is mostly implemented by using "logic compiler" software, which is similar to the software compiler used in program development and writing, and the original code before the compiling is also written in a specific programming language, which is called hardware description language (Hardware Description Language, HDL), but not just one of the hdds, but a plurality of kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), lava, lola, myHDL, PALASM, RHDL (Ruby Hardware Description Language), etc., VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog are currently most commonly used. It will also be apparent to those skilled in the art that a hardware circuit implementing the logic method flow can be readily obtained by merely slightly programming the method flow into an integrated circuit using several of 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, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable logic controllers, and embedded microcontrollers, 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 of the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller in a pure computer readable program code, it is well possible to implement the same functionality by logically programming the method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers, etc. Such a controller may thus be regarded as a kind of hardware component, and means for performing various functions included therein may also be regarded as structures within the hardware component. Or even means for achieving the various functions may be regarded as either software modules implementing the methods or structures within hardware components.
The system, apparatus, module or unit set forth in the above embodiments may be implemented in particular by a computer chip or entity, or by a product having a certain function. One typical implementation is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smart phone, 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 functionally divided into various units, respectively. Of course, the functions of each element may be implemented in the same piece or pieces of software and/or hardware when implementing the present application.
It will be appreciated by those skilled in the art that 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 flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations 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 one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
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 storage media for a computer 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, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
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 one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
It will be appreciated by those skilled in the art that 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.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and variations of the present application will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. which come within the spirit and principles of the application are to 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 working node capable of providing a service, the method comprising:
acquiring version information of each working node, and acquiring 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;
if the obtained version information of the working node is determined to be positioned in the legal version information list, determining that the version of the working node is legal, and determining that the working node is allowed to provide service;
If the obtained version information of the working node is not located in the legal version information list, the version of the working node is determined to be illegal, and the working node is determined to be not allowed to provide service.
2. The method of claim 1, wherein the step of obtaining version information of each working 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;
or alternatively, the process may be performed,
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:
acquiring a list updating 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 the step of modifying the legitimate version information list 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 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 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 the step of modifying the legitimate version information list according to the list update instruction comprises:
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 version information with highest version level 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 including a master node and a working node capable of providing a service, the method comprising:
after an upgrade request for upgrading version information of the working node is acquired, 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; the legal version information list is used for determining that the version of the working node is legal when the master node judges that the version information of the working node acquired by the master node is positioned in the legal version information list, and determining that the working node is allowed to provide service; when the version information of the working node acquired by the master node is not located in the legal version information list, determining that the version of the working node is illegal, and determining that the working node is not allowed to provide service;
the method comprises the steps of obtaining version upgrading results of all working nodes;
and after the version upgrading result of each working node meets the preset condition, a list shrinkage instruction for shrinking the legal version information list is sent.
9. The method of claim 8, wherein the step of transmitting a list shrink instruction for shrinking the legal version information list after the version upgrade result of each working node satisfies a preset condition comprises:
And 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, sending the list contraction instruction.
10. A distributed system, comprising: a master node and a working node capable of providing services;
the master node is used for acquiring the version information of each working node and storing a legal version information list;
if the obtained version information of the working node is determined to be positioned in the legal version information list, determining that the version of the working node is legal, and determining that the working node is allowed to provide service;
if the obtained version information of the working node is not located in the legal version information list, determining that the version of the working node is illegal, and determining that the working node is not allowed to provide service;
and the working node is used for providing the service according to the determination result of the master node or stopping providing the service.
11. The system of 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, the master node being specifically configured to:
reading the legal version information list from the local;
or alternatively, the process may be performed,
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:
acquiring a list updating 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 expand 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 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 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 specifically configured to:
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 version information with highest version level 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 upgrade request for upgrading version information of the working node;
and according to the upgrading request, the list expansion instruction is sent out.
17. The system of claim 15, wherein the operation and maintenance node is to:
the method comprises the steps of obtaining version upgrading results of all working nodes;
and after the version upgrading result of each working node meets the preset condition, sending out the list contraction instruction.
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 level in the expanded legal version information list, sending the list contraction instruction.
19. A node control apparatus for a distributed system including a working node capable of providing a service, the apparatus comprising:
the system comprises an acquisition module, a storage module and a storage module, wherein the acquisition module is used for acquiring version information of each working node and acquiring a legal version information list, wherein the legal version information list comprises one or more version information of the working node which is allowed to provide service;
the determining module is used for determining that the version of the working node is legal if the obtained version information of the working node is located in the legal version information list, and determining that the working node is allowed to provide service;
if the obtained version information of the working node is not located in the legal version information list, the version of the working node is determined to be illegal, and the working node is determined to be not allowed to provide service.
20. The apparatus of claim 19, wherein the obtaining 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 acquisition module is specifically configured to:
reading the legal version information list from the local;
or alternatively, the process may be performed,
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 instruction comprises a list expand instruction, 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 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 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 specifically configured to:
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 version information with highest version level 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 a version upgrade result of each working node meets a preset condition.
26. A version control apparatus for a distributed system comprising a master node and a working node capable of providing services, the apparatus comprising:
the first sending module is used for sending a list expansion instruction for expanding a legal version information list after obtaining an upgrading request for upgrading the version information of the working node, wherein the legal version information list comprises one or more version information of the working node which is allowed to provide service; the legal version information list is used for determining that the version of the working node is legal when the master node judges that the version information of the working node acquired by the master node is positioned in the legal version information list, and determining that the working node is allowed to provide service; when the version information of the working node acquired by the master node is not located in the legal version information list, determining that the version of the working node is illegal, and determining that the working node is not 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 transmitting module is specifically configured to:
and 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, 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 which, when executed, cause the processor to perform the node control method according to any one of claims 1 to 7.
29. A storage medium storing computer executable instructions which when executed implement the node control method according to 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 which, when executed, cause the processor to perform the version control method according to any one of claims 8 to 9.
31. A storage medium storing computer executable instructions which, when executed, implement the version control method of any one 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 CN110633096A (en) 2019-12-31
CN110633096B true 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)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113296937A (en) * 2021-02-10 2021-08-24 阿里巴巴集团控股有限公司 Distributed system memory recovery method and device and distributed system
CN112948382A (en) * 2021-02-26 2021-06-11 平安科技(深圳)有限公司 Information processing method and device based on big data and related equipment
CN115361428B (en) * 2022-10-21 2022-12-16 北京鼎轩科技有限责任公司 Remote control method and grading system
CN115373733B (en) * 2022-10-26 2023-01-24 小米汽车科技有限公司 Model version adjusting method and device of model service and electronic equipment

Family Cites Families (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
RU2580065C2 (en) * 2011-12-01 2016-04-10 Тенсент Текнолоджи (Шэньчжэнь) Компани Лимитед Method and system for software update
CN104133715B (en) * 2014-08-13 2018-05-11 新华三技术有限公司 A kind of power over Ethernet device firmware upgrade method and device
CN107515776B (en) * 2017-07-18 2021-04-09 深信服科技股份有限公司 Method for upgrading service continuously, node to be upgraded and readable storage medium
CN107391156B (en) * 2017-07-31 2021-01-08 成都华为技术有限公司 Method, management node and service node for distributed system transmission service

Also Published As

Publication number Publication date
CN110633096A (en) 2019-12-31

Similar Documents

Publication Publication Date Title
CN110633096B (en) Node control method and device, version control method and device and distributed system
CN108959341B (en) Data synchronization method, device and equipment
CN110298194B (en) File processing method, device, equipment and storage medium based on block chain
CN108268289B (en) Parameter configuration method, device and system for web application
CN109284066B (en) Data processing method, device, equipment and system
CN113744064B (en) Method and apparatus for performing transactions in block link points
CN111459724B (en) Node switching method, device, equipment and computer readable storage medium
CN110162573B (en) Distributed sequence generation method, device and system
TWI690187B (en) Service updating method, device and system
CN113254163B (en) Processing method and device of block chain data
CN115374117A (en) Data processing method and device, readable storage medium and electronic equipment
CN113852498B (en) Method and device for deploying, managing and calling components
CN114115016A (en) Data processing method, device, equipment and medium
CN110244964B (en) Operation and maintenance method, device and equipment based on operation and maintenance application
CN110275782B (en) Data processing method and device
CN109582388B (en) Parameter configuration method, device and equipment
CN109901914B (en) Transaction processing method, device and equipment
CN116166614A (en) Log archiving method and device, storage medium and electronic equipment
CN111339117B (en) Data processing method, device and equipment
CN115080538A (en) Block chain version verification method and device
CN112596780A (en) Service execution method and device
CN110908792B (en) Data processing method and device
CN110175020B (en) Frame attribute information expansion method and device, and frame loading method and device
CN115269562B (en) Database management method and device, storage medium and electronic equipment
CN110659328B (en) Data query method, device, equipment and computer readable storage medium

Legal Events

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