ktoso / akka-raft

A toy project implementing RAFT on top of Akka Cluster (not prod ready)
http://blog.project13.pl
Apache License 2.0
280 stars 42 forks source link

All nodes should transition to Follower if term > currentTerm #52

Open colin-scott opened 9 years ago

colin-scott commented 9 years ago

From the raft paper:

• If RPC request or response contains term T > currentTerm: set currentTerm = T, convert to follower (§5.1)

This is not implemented in all of the akka-raft states for all messages. It does seem to be implemented for AppendEntries (Follower, Leader, Candidate) but there are still three remaining issues:

colin-scott commented 9 years ago

This issue is distinct from #46. #46 is the opposite condition:

if term < currentTerm: 
  ignore