Modify comments of electionElapsed (#228)

This commit is contained in:
何卓然 2020-12-30 11:46:42 +08:00 committed by GitHub
parent 9c3a38a059
commit d70b4d2560
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -138,7 +138,9 @@ type Raft struct {
// number of ticks since it reached last heartbeatTimeout.
// only leader keeps heartbeatElapsed.
heartbeatElapsed int
// number of ticks since it reached last electionTimeout
// Ticks since it reached last electionTimeout when it is leader or candidate.
// Number of ticks since it reached last electionTimeout or received a
// valid message from current leader when it is a follower.
electionElapsed int
// leadTransferee is id of the leader transfer target when its value is not zero.