You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/book/replication/repl_leader_elect.rst
+8-3Lines changed: 8 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -74,12 +74,17 @@ All the non-leader nodes are called *followers*. The nodes that start a new
74
74
election round are called *candidates*. The elected leader sends heartbeats to
75
75
the non-leader nodes to let them know it is alive.
76
76
77
-
In case there are no heartbeats for a period set by the :ref:`replication_timeout <cfg_replication-replication_timeout>` option,
77
+
In case there are no heartbeats for the period of :ref:`replication_timeout <cfg_replication-replication_timeout>` * 4,
78
78
a non-leader node starts a new election if the following conditions are met:
79
79
80
-
* It has a quorum of connections to other cluster members.
80
+
* The node has a quorum of connections to other cluster members.
81
81
* None of these cluster members can see the leader node.
82
82
83
+
.. note::
84
+
85
+
A cluster member considers the leader node to be alive if the member received heartbeats from the leader at least once during the period of ``replication_timeout * 4`,
86
+
and there are no replication errors (the connection is not broken due to timeout or due to an error).
87
+
83
88
Terms and votes are persisted by each instance to preserve certain Raft guarantees.
84
89
85
90
During the election, the nodes prefer to vote for those ones that have the
@@ -127,7 +132,7 @@ Configuration
127
132
Heartbeats sent by an active leader have a timeout after which a new election
128
133
starts. Heartbeats are sent once per <replication_timeout> seconds.
129
134
Default value is ``1``. The leader is considered dead if it hasn't sent any
130
-
heartbeats for the period of ``<replication_timeout> * 4``.
135
+
heartbeats for the period of ``replication_timeout * 4``.
131
136
* ``replication_synchro_quorum`` -- reuse of the :ref:`replication_synchro_quorum <cfg_replication-replication_synchro_quorum>`
132
137
option for the purpose of configuring the election quorum. The default value is ``1``,
133
138
meaning that each node becomes a leader immediately after voting for itself.
Copy file name to clipboardExpand all lines: doc/reference/reference_lua/box_info/election.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ box.info.election
20
20
21
21
* ``term`` -- current election term.
22
22
23
-
* ``vote`` -- ID of a node the current node votes for. If the value is ``0``, it means the node doesn't vote in the current term.
23
+
* ``vote`` -- ID of a node the current node votes for. If the value is ``0``, it means the node hasn't voted in the current term yet.
24
24
25
25
* ``leader`` -- leader node ID in the current term. If the value is ``0``, it means the node doesn't know which node is the leader in the current term.
0 commit comments