Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 Raft 算法中,项总是在增加。有什么好的办法可以解决这个问题,防止以后期限达到极限吗?因为我用的是tinyint类型的term,又不想修改类型,一分钟就会有一轮选举,所以term会快速增长。
d.Log.Term(d.Log.Term() + 1) d.Log.State(BeCandidate)
我想在follower收到心跳后修改term=0,但是这样不行。
max(uint64) = 18446744073709551615 one year =525600 (minute) so : max(uint64) / one year = 35096545041304.32(year) i should worry about it