From d14b7053556a8ae6e2d7051ceb68532ecb8ef9ca Mon Sep 17 00:00:00 2001 From: Jia Zhan Date: Thu, 26 Apr 2018 22:59:59 -0700 Subject: [PATCH] raft: fix a few comments --- raft/raft.go | 2 +- raft/raft_snap_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/raft/raft.go b/raft/raft.go index 92857beb1..a07b39ccb 100644 --- a/raft/raft.go +++ b/raft/raft.go @@ -192,7 +192,7 @@ type Config struct { // this feature would be in a situation where the Raft leader is used to // compute the data of a proposal, for example, adding a timestamp from a // hybrid logical clock to data in a monotonically increasing way. Forwarding - // should be disabled to prevent a follower with an innaccurate hybrid + // should be disabled to prevent a follower with an inaccurate hybrid // logical clock from assigning the timestamp and then forwarding the data // to the leader. DisableProposalForwarding bool diff --git a/raft/raft_snap_test.go b/raft/raft_snap_test.go index 3908d5812..de7f689d5 100644 --- a/raft/raft_snap_test.go +++ b/raft/raft_snap_test.go @@ -38,8 +38,8 @@ func TestSendingSnapshotSetPendingSnapshot(t *testing.T) { sm.becomeCandidate() sm.becomeLeader() - // force set the next of node 1, so that - // node 1 needs a snapshot + // force set the next of node 2, so that + // node 2 needs a snapshot sm.prs[2].Next = sm.raftLog.firstIndex() sm.Step(pb.Message{From: 2, To: 1, Type: pb.MsgAppResp, Index: sm.prs[2].Next - 1, Reject: true})