0

In the Raft algorithm, the term is always increasing. Is there any good way to solve this problem and prevent the term from reaching the limit in the future? Because I use a term of type tinyint and I don't want to modify the type, there will be a round of elections in a minute, so the term will grow rapidly.

d.Log.Term(d.Log.Term() + 1)
d.Log.State(BeCandidate)

I want to modify term=0 after the follower receives the heartbeat, but this does not work.

faker
  • 309
  • 2
  • 14

1 Answers1

0
max(uint64) = 18446744073709551615
one year  =525600 (minute)
so :
max(uint64) / one year = 35096545041304.32(year)
i should worry about it 
faker
  • 309
  • 2
  • 14