box.info.election
-
box.info.
election
¶ Since: 2.6.1
The current state of this replica set node in regard to leader election. The following information is provided:
state
– the election state (mode) of the node. Possible values areleader
,follower
, orcandidate
. For more details, refer to description of the leader election process. When replication.failover is set toelection
, the node is writable only in theleader
state.term
– the current election term.vote
– the ID of a node the current node votes for. If the value is0
, it means the node hasn’t voted in the current term yet.leader
– a leader node ID in the current term. If the value is0
, it means the node doesn’t know which node is the leader in the current term.leader_name
– a leader name. Returnsnil
if there is no leader in a cluster or box.NULL if a leader does not have a name. Since version 3.0.0.leader_idle
– time in seconds since the last interaction with the known leader. Since version 2.10.0.
Примечание
IDs in the
box.info.election
output are the replica IDs visible in thebox.info.id
output on each node and in the_cluster
space.Пример:
auto_leader:instance001> box.info.election --- - leader_idle: 0 leader_name: instance001 state: leader vote: 2 term: 3 leader: 2 ...
See also: Master-replica: automated failover.