Skip to content

Commit

Permalink
raft: fix a few comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Jia Zhan authored and gyuho committed Apr 27, 2018
1 parent 7582a28 commit d14b705
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion raft/raft.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions raft/raft_snap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down

0 comments on commit d14b705

Please sign in to comment.