mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
raft/doc: clarify the case of out of date term
Clarify the doc. Fixes #10491
This commit is contained in:
committed by
Sam Batschelet
parent
7a5acb4a43
commit
56f1bce161
@@ -947,9 +947,9 @@ func (r *raft) Step(m pb.Message) error {
|
||||
r.logger.Infof("%x [logterm: %d, index: %d, vote: %x] cast %s for %x [logterm: %d, index: %d] at term %d",
|
||||
r.id, r.raftLog.lastTerm(), r.raftLog.lastIndex(), r.Vote, m.Type, m.From, m.LogTerm, m.Index, r.Term)
|
||||
// When responding to Msg{Pre,}Vote messages we include the term
|
||||
// from the message, not the local term. To see why consider the
|
||||
// from the message, not the local term. To see why, consider the
|
||||
// case where a single node was previously partitioned away and
|
||||
// it's local term is now of date. If we include the local term
|
||||
// it's local term is now out of date. If we include the local term
|
||||
// (recall that for pre-votes we don't update the local term), the
|
||||
// (pre-)campaigning node on the other end will proceed to ignore
|
||||
// the message (it ignores all out of date messages).
|
||||
|
||||
Reference in New Issue
Block a user