Closed xiang90 closed 10 years ago
If the peer return a high term, we should not update its previous index. The previous index might larger than the index of this "leader" (it is not leader any more), since the new leader might have successfully append logs to that peer.
If we update the index, panic will happen: https://github.com/goraft/raft/blob/master/log.go#L254
I think the panic is correct.
@xiangli-cmu It looks like the build is failing now:
https://drone.io/github.com/goraft/raft/15
Can you fix that?
@benbjohnson sure.
If the peer return a high term, we should not update its previous index. The previous index might larger than the index of this "leader" (it is not leader any more), since the new leader might have successfully append logs to that peer.
If we update the index, panic will happen: https://github.com/goraft/raft/blob/master/log.go#L254
I think the panic is correct.