CN104767794B - Node electoral machinery and node in a kind of distributed system - Google Patents
Node electoral machinery and node in a kind of distributed system Download PDFInfo
- Publication number
- CN104767794B CN104767794B CN201510113095.2A CN201510113095A CN104767794B CN 104767794 B CN104767794 B CN 104767794B CN 201510113095 A CN201510113095 A CN 201510113095A CN 104767794 B CN104767794 B CN 104767794B
- Authority
- CN
- China
- Prior art keywords
- node
- identification information
- target data
- control node
- database
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses the node electoral machinery and node in a kind of distributed system.This method includes:Each node that the node election is participated in distributed system is connected with Database first, and each node passes through the target data in database described in first connected reference;Successful access to the target data node as control node, perform corresponding operating in the distributed system;Wherein, the control node is the node that the database is elected using concurrent transaction processing strategy.Since the number of nodes that database is supported to access is far longer than the number of nodes in distributed system, when the node for needing to participate in electing in distributed system accesses database, database can also elect control node, so as to ensure that system worked well.
Description
Technical field
The present invention relates to the node electoral machinery and section in distributed technical field, more particularly to a kind of distributed system
Point.
Background technology
The developing direction of distributed computing technology is decentralization, i.e., will not predefine the main section of distributed system (such as cluster)
Point needs to complete the execution node of some task, but dynamic election host node or the execution node of task are (below by main section
Point and execution node are referred to as control node).
At present, the election of control node can be realized by shared storage mode in distributed system.
Shared storage mode election control node refers to that sharing in multiple nodes access system of distributed system is divided
Area, wherein successful access to the shared partition (file lock for obtaining shared partition) node as control node.Control section
After point exits distributed system, its file lock possessed can discharge, and the election of a new round can be initiated after remaining node perceived.
Wherein, the number of nodes that shared partition is supported is limited.When the number of nodes for needing to participate in electing in distributed system surpasses
When crossing the number of nodes of shared partition support, the number of nodes of shared partition support can be exceeded due to accessing the number of nodes of shared partition,
Cause shared partition not work normally, and then the election of control node can not be completed, distributed system can not work normally.
The content of the invention
The object of the present invention is to provide the node electoral machinery and node in a kind of distributed system, to solve to deposit with shared
It is limited because being limited to the supported number of nodes of shared partition when storage mode carries out node election, caused by distributed system not
The problem of working normally.
The purpose of the present invention is what is be achieved through the following technical solutions:
A kind of node electoral machinery in distributed system, including:
Each node that the node election is participated in distributed system is connected with Database first, and each section
Point passes through the target data in database described in first connected reference;
Successful access to the target data node as control node, corresponding behaviour is performed in the distributed system
Make;
Wherein, the control node is the node that the database is elected using concurrent transaction processing strategy.
Wherein, the successful access to the node of the target data as control node, in the distributed system
Corresponding operating is performed to include at least:The node of the successful access to the target data keeps first connection.
Based on above-mentioned any means embodiment, optionally, the node of successful access to the target data is saved as control
Point, execution corresponding operating further includes in the distributed system:By being connected with the second of the Database, to described
A record is inserted into the control node table of database, the record includes the identification information of the control node and the mark
The timestamp of information, and update the record periodically through the described second connection.
Correspondingly, the node for having access to the target data not successfully obtains the control section from the control node table
The identification information of point, and established and connected with the control node according to the identification information of acquisition.
Optionally, the node for having access to the target data not successfully obtains the control section from the control node table
The identification information of point, including:
The node for having access to the target data not successfully determines current time;
The node for having access to the target data not successfully searches the time from the control node table at least once
The time of stamp mark is later than the identification information of the control node of the definite current time;
The node for having access to the target data not successfully obtains what is found, and the time of timestamp mark is the latest
Control node identification information.
Wherein, time of the identification information of control node described in the node checks for having access to the target data not successfully
Number is no more than pre-determined number;The cycle recorded described in the successful access to the node updates of the target data is according to
Have access to what the time interval of the identification information of control node described in the node checks of the target data determined not successfully.
Based on above-mentioned any means embodiment, optionally, the target data in the database is the distributed system
Identification information, or the identification information for the corresponding task of node election.
Based on the inventive concept identical with method, the node in a kind of distributed system is also provided, including:
Connection establishment unit, for being connected with Database first;
Elect unit, for by with the target data in database described in first connected reference;
First processing units, after successful access to the target data, as control node in the distributed system
Corresponding operating is performed in system;
Wherein, the control node is the node that the database is elected using concurrent transaction processing strategy.
Wherein, the first processing units are used for:
Keep first connection.
Optionally, the connection establishment unit is additionally operable to:It is connected with the Database second.
Correspondingly, the first processing units are additionally operable to:The control node to the database is connected by described second
A record is inserted into table, the record includes the timestamp of the identification information and the identification information of the control node, and
The record is updated periodically through the described second connection;
Correspondingly, the node further includes second processing unit, it is used for:The control is obtained from the control node table
The identification information of node, and established and connected with the control node according to the identification information of acquisition.
Optionally, when obtaining the identification information of the control node from the control node table, the second processing list
Member is used for:
Determine current time;
The time for searching timestamp mark from the control node table at least once is later than the definite current time
Control node identification information;
Obtain what is found, and the identification information of the control node of the time of timestamp mark the latest.
Wherein, time of the identification information of control node described in the node checks for having access to the target data not successfully
Number is no more than pre-determined number;The cycle recorded described in the successful access to the node updates of the target data is according to
Have access to what the time interval of the identification information of control node described in the node checks of the target data determined not successfully
Based on above-mentioned arbitrary node embodiment, optionally, the target data in the database is the distributed system
Identification information, or the identification information for the corresponding task of node election.
Technical solution provided in an embodiment of the present invention, each node that election is participated in distributed system access the database
In target data, utilize database concurrent transaction disposal ability carry out decision-making, it is allowed to one of node successful access mesh
Data are marked, so as to elect control node.Different configuration of database can support more than 10,000 node to connect, and advise greatly
The number of nodes of mould distributed system is usually 1,000 or so.Since the number of nodes that database is supported to access is far longer than distributed system
Number of nodes in system, when the node for therefore, in distributed system needing to participate in electing accesses database, database can also select
Control node is enumerated, so as to ensure that system worked well.
Brief description of the drawings
Fig. 1 is a kind of method flow diagram provided in an embodiment of the present invention;
Fig. 2 is control node process chart provided in an embodiment of the present invention;
Fig. 3 is provided in an embodiment of the present invention from node processing flow chart;
Fig. 4 is node schematic diagram provided in an embodiment of the present invention.
Embodiment
Below in conjunction with attached drawing, technical solution provided in an embodiment of the present invention is described in detail.
As shown in Figure 1, the node electoral machinery in distributed system provided in an embodiment of the present invention specifically includes following behaviour
Make:
Each node that the node election is participated in step 100, distributed system is connected with Database first.
Step 110, above-mentioned each node pass through the target data in the above-mentioned above-mentioned database of first connected reference.
Existing database is provided with the ability of concurrent transaction disposal ability, detection and handling dead connection.
Since database has concurrent transaction disposal ability, when multiple nodes pass through with Database
During one connected reference target data, database can allow one of node successful access target data by decision-making, then
The node of successful access target data node in order to control.And other nodes can receive the feedback for accessing failure.
Step 120, the node of successful access to above-mentioned target data perform phase in a distributed system as control node
It should operate.
Wherein, the node of successful access to above-mentioned target data is that database is elected using concurrent transaction processing strategy
One node.
Technical solution provided in an embodiment of the present invention, each node that election is participated in distributed system access the database
In target data, utilize database concurrent transaction disposal ability carry out decision-making, it is allowed to one of node successful access mesh
Data are marked, so as to elect control node.Different configuration of database can support more than 10,000 node to connect, and advise greatly
The number of nodes of mould distributed system is usually 1,000 or so.Since the number of nodes that database is supported to access is far longer than distributed system
Number of nodes in system, when the node for therefore, in distributed system needing to participate in electing accesses database, database can also select
Control node is enumerated, so as to ensure that system worked well.
In addition, the ability connected using the detection of database and handling dead, additionally it is possible to after control node failure, release in time
Access rights of the control node after failure to target data are bled off, so that other nodes re-initiate election.
In the embodiment of the present invention, if the host node of election distributed system, target data in above-mentioned database can be with
The identification information of distributed system where node.If electing the execution node of some task, the target in above-mentioned database
Data can be the identification information of the corresponding task of node election.
Wherein it is possible to multiple and different target datas is preserved in the database.For example, preserve the mark of different distributions formula system
Know information, preserve the identification information of different task.Correspondingly, database can support the host node of multiple distributed systems at the same time
Election, and the execution node election of multiple tasks.
In the embodiment of the present invention, the operation of above-mentioned steps 120 includes at least:Keep above-mentioned first connection.
In addition, the operation of above-mentioned steps 120 is further included provides host node service as host node, or as execution node
Perform certain task.
Wherein, when performing certain task during providing host node service as host node or as execution node,
Above-mentioned first connection is kept, until not continuing to as host node or up to tasks carrying completion, then need not continue in holding
State the first connection.
Wherein, the control node that elects keeps the implementation of above-mentioned first connection can be specifically:Do not submit first
Connected affairs, and continue (periodically or non-periodically) to interact with database by the first connection.For example, connect using first
Execution SQL statement is connect, to keep the first connection active, avoids the first connection from disconnecting.Wherein, by first connection with database into
The time interval of row interaction is no more than database and judges the cycle (also referred to as time limit) that the first connection disconnects.
Wherein, the control node elected is periodically no more than data by the first connection with the cycle that database interacts
Storehouse judges the cycle that the first connection disconnects.Preferably less than database judges the cycle that the first connection disconnects.
In the embodiment of the present invention, the control node elected can also be by being connected to data with the second of Database
Be inserted into a record in the control node table in storehouse, the identification information of the record including above-mentioned control node and the identification information when
Between stab, and be connected the above-mentioned record of renewal periodically through second with Database.
Wherein, if periodically interacted by the first connection with database, then by the first connection and database into
In the cycle of above-mentioned record in the cycle of row interaction, and renewal control node table, it may be the same or different.
Wherein, the timestamp in above-mentioned record is either control node generates or control node triggering number
According to storehouse generation.
Wherein, it can be the timestamp for updating identification information to update above-mentioned record.For example, one new record of insertion, should
Record includes the timestamp after the identification information of above-mentioned control node and the renewal of the identification information;In another example in above-mentioned note
Timestamp in record after increase renewal;In another example the timestamp in above-mentioned record is replaced with into the timestamp after renewal.Etc..
Correspondingly, the node for having access to target data not successfully obtains above-mentioned control node from above-mentioned control node table
Identification information, establishes according to the identification information of acquisition and control node and connects.
After connection is established with control node, the node (at this time be used as from node) for having access to above-mentioned target not successfully will be with
Control node keeps heartbeat.
Wherein, the node for having access to target data not successfully obtains the mark of above-mentioned control node from above-mentioned control node table
Know information, its implementation can be:
The failed node for having access to target data determines current time;
The node for having access to target data not successfully searches timestamp mark from above-mentioned control node table at least once
Time be later than above-mentioned definite current time control node identification information;
The node for having access to target data not successfully obtains what is found, and the control of the time of timestamp mark the latest
The identification information of node.
Wherein, search every time, the time for being to look for timestamp mark in control node table is later than definite for the first time work as
The identification information of the control node of preceding time.
Wherein, the number for searching the identification information of control node is no more than pre-determined number, which can be according to reality
Border operation demand configuration.
It should be pointed out that the node of target data is had access to not successfully except obtaining above-mentioned control according to above-mentioned implementation
The identification information of node processed, can also use other implementations to obtain the identification information of control node.For example, by intercepting control
The identification information for the control node that node processed is sent.
On this basis, the node (i.e. control node) of successful access to target data updates the cycle of above-mentioned record, is
What the time interval of the identification information of the failed above-mentioned control node of node checks for having access to target data determined.
Specifically, the node (i.e. control node) of successful access to target data updates the cycle of above-mentioned record, it is no more than
The time interval of the identification information of (or less than) failed above-mentioned control node of node checks for having access to target data.
The time that node checks due to once having access to target data not successfully are identified to timestamp is later than definite work as
The identification information of the control node of preceding time, you can corresponding node is determined as control node, and using its identification information as
The identification information of control node.Therefore, find timestamp mark time be later than definite current time node mark
The time interval of information, that is, search the time interval of the identification information of control node.
Wherein, single election flow need to be re-started if there is following any situation, node.Need to re-start once
The situation of election flow includes:The failed node for having access to target data does not get the mark letter of above-mentioned control node
Breath, either the failed node for having access to target data does not succeed establishes connection or failed visit with above-mentioned control node
Ask the node of target data and above-mentioned control node and keep heartbeat failure, or the of above-mentioned control node and above-mentioned database
One connection disconnects, in the control node table that either above-mentioned control node fails into above-mentioned database insertion record or
In control node table of the above-mentioned control node success into above-mentioned database after insertion record, fail and update the record.
Based on above-mentioned any means embodiment, node can also mark the state of this node.Correspondingly, the embodiment of the present invention
Three kinds of node states are defined, are respectively:
Master states, node is as control node, there is provided control node service;
Slave states, node are used as from node, there is provided from node serve;
Unknown states, node do not know the role of this section point, do not know the state of distributed system yet, do not provide externally
Service.
Node is bound to belong to certain state during operation.
Specifically, after the os starting of node or after re-starting single election flow, this node state is updated
For Unknown states.For node after successful access target data, it is Master states to update this node state.Node is saved with control
After point establishes connection, it is Slave states to update this node state.
Exemplified by electing host node in cluster in a distributed manner below, method provided in an embodiment of the present invention is carried out specifically
It is bright.
Distributed type assemblies interior joint elects host node by accessing the target data in database.The database can portion
Administration can also be deployed on some node in distributed type assemblies on the server outside each node of distributed type assemblies.
To carry out host node election using method provided in an embodiment of the present invention, node and database have following preset bar
Part:
1st, each node of cluster is synchronous by NTP or other modes retention time.
2nd, all nodes of cluster to database (hereinafter referred to as center DB) network and cluster each node between network can
It is consistent with property.
3rd, center DB supports the ACID attributes of common RDBMS.
4th, center DB possesses the ability of detection and handling dead connection.
5th, center DB can ensure availability in itself.
In addition, file lock table and control node table (in group system, being also referred to as host node table) are included at least in the DB of center.
Wherein, file lock table is as shown in table 1, wherein the data stored (are specially in the present embodiment for the identification information of distributed system
The identification information of cluster).Host node table is as shown in table 2, wherein storage control node data, the mark for specifically including cluster is believed
Breath, and the time of the identification information of the identification information of host node corresponding to identification information of each cluster and every host node
Stamp.
Table 1
Table 2
This programme, which is realized, is broadly divided into following two parts:
Part I:Election and Master flows
As shown in Fig. 2, process flow is:
All nodes are Unknown states before starting election.
All nodes establish a first connection C1 to database, and this in the file lock table for passing through C1 access databases
The identification information of cluster.Specifically send similar " Select*from cluster_lock where cluster_name='
The identification information of cluster ' for update " sentence.
Such as the identification information of successful access this cluster into file lock table, then illustrate to have taken the file for representing Master
Lock, does not submit the affairs on C1.Then using the timestamp registration Master data of current time, i.e., one is in addition created in
The second connection C2 of heart DB, record corresponding to the identification information of this cluster, the record are inserted into using C2 in host node table
It is the identification information of this node and the timestamp of current time, then submits the affairs on C2.
The Status Change of this node is also by the node of successful access identification information of this cluster into file lock table
Master states, start externally to provide the service of Master.
Master stabs information on backstage by individual threads renewal time.This renewal includes 2 step contents:
SQL statement is performed using C1, to keep C1 enlivening to center DB, avoids C1 from breaking.
A record is inserted into host node table using C2, node_name uses the identification information of this node,
Timestamp uses current time information, submits affairs.
The time interval of background update need to consider that DB judges that the time limit that Client connections disconnect, and Slave retry interval.
(being such as updated once every second)
Failure is such as updated, then stops Master services.
The identification information of this cluster in the file table obtained on release C1, that is, discharge the target data of locking, accordingly
, center DB detects Master exceptions using the ability that its detection and handling dead connect, and disconnects C1, it is not complete that Master is fallen in rollback
Into affairs.
Into Master failure handling flows, will this node state be set to Unknown states, and by accessing file lock table
The identification information of middle cluster reenters node election flow.
Failure is such as locked, then into Slave flows.
Part II:Slave flows
As shown in figure 3, process flow is as follows:
It is failed to access in file lock table after the identification information of this cluster, into Slave flows.Obtain current time when
Between stab T1.
According to T1, the information of Master is obtained:
The identification information of Select*from cluster_master where cluster_name=' clusters ' and
(select max (timestamp) from cluster_master where cluster_name=' collect timestamp=
The identification information of group ' and timestamp>T1)
Up to arriving, timestamp field is bigger than T1, and that Master data of timestamp field maximum.
Such as failure, retry n times, retry interval and take 1 second, fail, into Master failure procedures.Consider Master renewals
The time delay of information, n>5.
Such as success, then Master is connected, confirm the availability of Master.Availability includes 2 parts:Master nodes can connect
Connect;Show it oneself is Master in the return information of Master nodes.
Such as connection failure, retry n times, fail, into Master failure procedures.
After verifying Master, this node state is changed to Slave states, Slave services are externally provided.
With Master keep heartbeat, as heartbeat fail, into Master failure procedures.
Slave needs to keep heartbeat to need to include to detect whether Master can use, in heartbeat message with Master
The role of Master, to confirm whether Master can provide service.
Based on the inventive concept same with method, the embodiment of the present invention also provides the node in a kind of distributed system, such as
Shown in Fig. 4, including:
Connection establishment unit 401, for being connected with Database first;
Elect unit 402, for by with the target data in database described in first connected reference;
First processing units 403, after successful access to the target data, as control node in the distribution
Corresponding operating is performed in system.
Wherein, the control node is the node that the database is elected using concurrent transaction processing strategy.
Technical solution provided in an embodiment of the present invention, each node that election is participated in distributed system access the database
In target data, utilize database concurrent transaction disposal ability carry out decision-making, it is allowed to one of node successful access mesh
Data are marked, so as to elect control node.Different configuration of database can support more than 10,000 node to connect, and advise greatly
The number of nodes of mould distributed system is usually 1,000 or so.Since the number of nodes that database is supported to access is far longer than distributed system
Number of nodes in system, when the node for therefore, in distributed system needing to participate in electing accesses database, database can also select
Control node is enumerated, so as to ensure that system worked well.
In addition, the ability connected using the detection of database and handling dead, additionally it is possible to after control node failure, release in time
The access rights to target data are bled off, so that other nodes re-initiate election.
Wherein, the first processing units can be used for:Keep first connection.
Based on above-mentioned arbitrary node embodiment, the first processing units are additionally operable to:Connected by described second to described
A record is inserted into the control node table of database, the record includes the identification information of the control node and the mark
The timestamp of information, and update the record periodically through the described second connection;
The node further includes second processing unit, is used for:The control node is obtained from the control node table
Identification information, and established and connected with the control node according to the identification information of acquisition.
Wherein, when the identification information of control node is obtained from the control node table, the second processing unit is used for:
Determine current time;
The time for searching timestamp mark from the control node table at least once is later than the definite current time
Control node identification information;
Obtain what is found, and the identification information of the control node of the time of timestamp mark the latest;
Wherein, time of the identification information of control node described in the node checks for having access to the target data not successfully
Number is no more than pre-determined number;The cycle recorded described in the successful access to the node updates of the target data is according to
Have access to what the time interval of the identification information of control node described in the node checks of the target data determined not successfully.
Based on above-mentioned arbitrary node embodiment, the target data in the database can be the mark of the distributed system
Know information, or the identification information of the corresponding task of node election.
It should be understood by those skilled in the art that, the embodiment of the present invention can be provided as method, system or computer program
Product.Therefore, the present invention can use the reality in terms of complete hardware embodiment, complete software embodiment or combination software and hardware
Apply the form of example.Moreover, the present invention can use the computer for wherein including computer usable program code in one or more
The computer program production that usable storage medium is implemented on (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.)
The form of product.
The present invention be with reference to according to the method for the embodiment of the present invention, the flow of equipment (system) and computer program product
Figure and/or block diagram describe.It should be understood that it can be realized by computer program instructions every first-class in flowchart and/or the block diagram
The combination of flow and/or square frame in journey and/or square frame and flowchart and/or the block diagram.These computer programs can be provided
The processors of all-purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices is instructed to produce
A raw machine so that the instruction performed by computer or the processor of other programmable data processing devices, which produces, to be used in fact
The device for the function of being specified in present one flow of flow chart or one square frame of multiple flows and/or block diagram or multiple square frames.
These computer program instructions, which may also be stored in, can guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works so that the instruction being stored in the computer-readable memory, which produces, to be included referring to
Make the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one square frame of block diagram or
The function of being specified in multiple square frames.
These computer program instructions can be also loaded into computer or other programmable data processing devices so that counted
Series of operation steps is performed on calculation machine or other programmable devices to produce computer implemented processing, thus in computer or
The instruction performed on other programmable devices is provided and is used for realization in one flow of flow chart or multiple flows and/or block diagram one
The step of function of being specified in a square frame or multiple square frames.
Although preferred embodiments of the present invention have been described, but those skilled in the art once know basic creation
Property concept, then can make these embodiments other change and modification.So appended claims be intended to be construed to include it is excellent
Select embodiment and fall into all change and modification of the scope of the invention.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art
God and scope.In this way, if these modifications and changes of the present invention belongs to the scope of the claims in the present invention and its equivalent technologies
Within, then the present invention is also intended to comprising including these modification and variations.
Claims (6)
- A kind of 1. node electoral machinery in distributed system, it is characterised in that including:Each node that the node election is participated in distributed system is connected with Database first, and each node leads to Cross the target data in database described in first connected reference;Successful access to the target data node as control node, perform corresponding operating in the distributed system;Wherein, the control node is the node that the database is elected using concurrent transaction processing strategy;The successful access to the target data node as control node, corresponding behaviour is performed in the distributed system Further include:By being connected with the second of the Database, a record, institute are inserted into the control node table of the database Stating record includes the identification information of the control node and the timestamp of the identification information, and connects periodically through described second Connect the renewal record;The method further includes:The node for having access to the target data not successfully obtains the control from the control node table The identification information of node processed, and established and connected with the control node according to the identification information of acquisition;The node for having access to the target data not successfully obtains the mark letter of control node from the control node table Breath, including:The node for having access to the target data not successfully determines current time;The node for having access to the target data not successfully searches timestamp mark from the control node table at least once The time of knowledge is later than the identification information of the control node of the definite current time;The node for having access to the target data not successfully obtains what is found, and the control of the time of timestamp mark the latest The identification information of node processed;Wherein, the number of the identification information of control node described in the node checks for having access to the target data not successfully is not More than pre-determined number;The cycle recorded described in the successful access to the node updates of the target data be according to described in not into What the time interval that work(has access to the identification information of control node described in the node checks of the target data determined.
- 2. according to the method described in claim 1, it is characterized in that, the successful access to the target data node conduct Control node, execution corresponding operating includes in the distributed system:Node of the successful access to the target data Keep first connection.
- 3. method according to claim 1 or 2, it is characterised in that the target data in the database is the distribution The identification information of formula system, or the identification information for the corresponding task of node election.
- A kind of 4. node in distributed system, it is characterised in that including:Connection establishment unit, for being connected with Database first;Unit is elected, for passing through the target data in database described in first connected reference;First processing units, after successful access to the target data, as control node in the distributed system Perform corresponding operating;Wherein, the control node is the node that the database is elected using concurrent transaction processing strategy;The connection establishment unit is additionally operable to:It is connected with the Database second;The first processing units are additionally operable to:Connected by described second and one is inserted into the control node table of the database Record, the timestamp for recording the identification information and the identification information that include the control node, and periodically through institute State the second connection and update the record;The node further includes second processing unit, is used for:When having access to the target data not successfully, from the control node The identification information of the control node is obtained in table, and is established and connected with the control node according to the identification information of acquisition;When obtaining the identification information of the control node from the control node table, the second processing unit is used for:Determine current time;The time for searching timestamp mark from the control node table at least once is later than the control of the definite current time The identification information of node processed;Obtain what is found, and the identification information of the control node of the time of timestamp mark the latest;Wherein, the number of the identification information of control node described in the node checks for having access to the target data not successfully is not More than pre-determined number;The cycle recorded described in the successful access to the node updates of the target data be according to described in not into What the time interval that work(has access to the identification information of control node described in the node checks of the target data determined.
- 5. node according to claim 4, it is characterised in that the first processing units are used for:Keep first connection.
- 6. node according to claim 4 or 5, it is characterised in that the target data in the database is the distribution The identification information of formula system, or the identification information for the corresponding task of node election.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510113095.2A CN104767794B (en) | 2015-03-13 | 2015-03-13 | Node electoral machinery and node in a kind of distributed system |
CN201810124907.7A CN108183971B (en) | 2015-03-13 | 2015-03-13 | Node election method in distributed system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510113095.2A CN104767794B (en) | 2015-03-13 | 2015-03-13 | Node electoral machinery and node in a kind of distributed system |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810124907.7A Division CN108183971B (en) | 2015-03-13 | 2015-03-13 | Node election method in distributed system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104767794A CN104767794A (en) | 2015-07-08 |
CN104767794B true CN104767794B (en) | 2018-05-01 |
Family
ID=53649393
Family Applications (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510113095.2A Active CN104767794B (en) | 2015-03-13 | 2015-03-13 | Node electoral machinery and node in a kind of distributed system |
CN201810124907.7A Active CN108183971B (en) | 2015-03-13 | 2015-03-13 | Node election method in distributed system |
Family Applications After (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810124907.7A Active CN108183971B (en) | 2015-03-13 | 2015-03-13 | Node election method in distributed system |
Country Status (1)
Country | Link |
---|---|
CN (2) | CN104767794B (en) |
Families Citing this family (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107203420A (en) * | 2016-03-18 | 2017-09-26 | 北京京东尚科信息技术有限公司 | The master-slave switching method and device of task scheduling example |
CN107800733B (en) * | 2016-08-31 | 2021-01-15 | 阿里巴巴集团控股有限公司 | Method and equipment for generating session identifier in distributed system |
WO2019061384A1 (en) * | 2017-09-30 | 2019-04-04 | 麦格创科技(深圳)有限公司 | Method and system for electing task manager in distributed crawler system |
CN110708177B (en) * | 2018-07-09 | 2022-08-09 | 阿里巴巴集团控股有限公司 | Exception handling method, system and device in distributed system |
CN110764690B (en) * | 2018-07-28 | 2023-04-14 | 阿里云计算有限公司 | Distributed storage system and leader node election method and device thereof |
CN108881489A (en) * | 2018-08-03 | 2018-11-23 | 高新兴科技集团股份有限公司 | A kind of coordination system and method for Distributed Services |
CN110321199B (en) * | 2019-07-09 | 2022-04-12 | 成都卫士通信息产业股份有限公司 | Method and device for notifying common data change, electronic equipment and medium |
CN113742417B (en) * | 2020-05-29 | 2024-06-07 | 同方威视技术股份有限公司 | Multistage distributed consensus method and system, electronic equipment and computer readable medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102904752A (en) * | 2012-09-25 | 2013-01-30 | 新浪网技术(中国)有限公司 | Node selection method, node equipment and node system |
CN103118084A (en) * | 2013-01-21 | 2013-05-22 | 浪潮(北京)电子信息产业有限公司 | Host node election method and node |
CN103491168A (en) * | 2013-09-24 | 2014-01-01 | 浪潮电子信息产业股份有限公司 | Cluster election design method |
CN103607297A (en) * | 2013-11-07 | 2014-02-26 | 上海爱数软件有限公司 | Fault processing method of computer cluster system |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101267345B (en) * | 2008-03-10 | 2010-12-08 | 中兴通讯股份有限公司 | Service node backup method and distributed system |
CN101854373B (en) * | 2009-04-01 | 2013-10-09 | 华为技术有限公司 | Target switching method, server node and colony system |
US8271537B2 (en) * | 2010-11-15 | 2012-09-18 | Sas Institute Inc. | Grid computing system alongside a distributed database architecture |
CN102929696B (en) * | 2012-09-28 | 2015-09-09 | 北京搜狐新媒体信息技术有限公司 | A kind of distributed system Centroid structure, submission, method for supervising and device |
CN103902617B (en) * | 2012-12-28 | 2017-06-09 | 华为技术有限公司 | Distributed data base synchronous method and system |
-
2015
- 2015-03-13 CN CN201510113095.2A patent/CN104767794B/en active Active
- 2015-03-13 CN CN201810124907.7A patent/CN108183971B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102904752A (en) * | 2012-09-25 | 2013-01-30 | 新浪网技术(中国)有限公司 | Node selection method, node equipment and node system |
CN103118084A (en) * | 2013-01-21 | 2013-05-22 | 浪潮(北京)电子信息产业有限公司 | Host node election method and node |
CN103491168A (en) * | 2013-09-24 | 2014-01-01 | 浪潮电子信息产业股份有限公司 | Cluster election design method |
CN103607297A (en) * | 2013-11-07 | 2014-02-26 | 上海爱数软件有限公司 | Fault processing method of computer cluster system |
Also Published As
Publication number | Publication date |
---|---|
CN108183971A (en) | 2018-06-19 |
CN108183971B (en) | 2021-08-10 |
CN104767794A (en) | 2015-07-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104767794B (en) | Node electoral machinery and node in a kind of distributed system | |
US9984140B1 (en) | Lease based leader election system | |
US9201742B2 (en) | Method and system of self-managing nodes of a distributed database cluster with a consensus algorithm | |
US20180365235A1 (en) | Scalable distributed data store | |
KR101042908B1 (en) | Method, system, and computer-readable recording medium for determining major group under split-brain network problem | |
US8055735B2 (en) | Method and system for forming a cluster of networked nodes | |
EP3224746B1 (en) | System and method for massively parallel processing database | |
KR101993432B1 (en) | Systems and methods for supporting transaction recovery based on a strict ordering of two-phase commit calls | |
CN103647668A (en) | Host group decision system in high availability cluster and switching method for host group decision system | |
CN105930498A (en) | Distributed database management method and system | |
CN103036717A (en) | Consistency maintenance system and methods for distributed-type data | |
CN109753511B (en) | Cross-region real-time synchronization method and system for big data platform | |
KR101296778B1 (en) | Method of eventual transaction processing on nosql database | |
WO2022170938A1 (en) | Distributed database remote backup | |
CN110635941A (en) | Database node cluster fault migration method and device | |
KR100953098B1 (en) | Cluster system and method for operating thereof | |
CN110830582B (en) | Cluster owner selection method and device based on server | |
US20170017680A1 (en) | Method for handling writes in database clusters with temporarily disjoint nodes | |
CN111400097A (en) | Data backup method, device, system and computer readable storage medium | |
CN113901047A (en) | Simple cluster master-slave election method based on memory database | |
CN105323271B (en) | Cloud computing system and processing method and device thereof | |
CN113190620A (en) | Method, device, equipment and storage medium for synchronizing data between Redis clusters | |
CN117271227A (en) | Database cluster master node switching method, system and management and control platform | |
CA2619778C (en) | Method and apparatus for sequencing transactions globally in a distributed database cluster with collision monitoring | |
CN107181608A (en) | A kind of method and operation management system for recovering service and performance boost |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
EXSB | Decision made by sipo to initiate substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C41 | Transfer of patent application or patent right or utility model | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20170109 Address after: 266000 Shandong Province, Qingdao city Laoshan District Songling Road No. 399 Applicant after: Poly Polytron Technologies Inc Address before: 266061 Laoshan, Qingdao province Hongkong District No. East Road, room 248, room 131 Applicant before: Hisense Media Networks Co., Ltd. |
|
GR01 | Patent grant | ||
GR01 | Patent grant |