setRaftElectionTick

Syntax

setRaftElectionTick(groupId, tickCount)

Arguments

groupId is a positive integer indicating the raft group ID. Currently it can only be 1, referring to the ID of the raft group composed of controllers.

tickCount is an integer no less than 800 (in 10ms).

Details

Use this command to dynamically set the configuration parameter raftElectionTick. tickCount specifies a time interval: [tickCount, 2*tickCount]. After receiving the last heartbeat from the leader, if a follower does not receive the next heartbeat after a random waiting time within the specified interval, it will send a request for leader election.

Note:

1.The command must be executed by the admin on all controllers within a raft group, please make sure that they all share the same raftElectionTick value.

2.The command will not modify the configuration parameter raftElectionTick. It will restore to the default or specified value after the server restarts.

First Release

1.30.16/2.00.4

Related Functions: getRaftElectionTick, getControllerElectionTick