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

Shouldn't necessarily initialize matchIndex to -1 #60

Open colin-scott opened 9 years ago

colin-scott commented 9 years ago

At the point where a candidate becomes elected and initializes its matchIndex, it may already have entries in its log. If so, it should set its own matchIndex to a non-zero value, otherwise it will never count itself in the quorum for those entries.

colin-scott commented 9 years ago

Well, arguably a bug: it decreases the fault-tolerance of the cluster by 1 for all terms where that leader is elected, i.e. progress won't be made if f-1 nodes fail

ktoso commented 9 years ago

Thanks for clarifying, classifying as bug;