akka-raft
akka-raft copied to clipboard
DeclineCandidate from Candidate includes wrong term
When a candidate responds to a RequestVote
with DeclineCandidate
, it should include its own term in the response instead of the request's term. This allows the candidate that sent the request to update its own term.
This got flipped in the VoteCandidate response in Candidate: the current implementation responds with the current term, whereas it should update its term with the one from the request and send that back instead.