Skip to content

Commit

Permalink
Merge pull request #10807 from tbg/extract-prs
Browse files Browse the repository at this point in the history
raft: extract 'tracker' package
  • Loading branch information
tbg authored Jun 21, 2019
2 parents 6953ccc + f9c2d00 commit 948e276
Show file tree
Hide file tree
Showing 17 changed files with 1,065 additions and 919 deletions.
1 change: 0 additions & 1 deletion etcdserver/raft.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import (
"go.etcd.io/etcd/raft/raftpb"
"go.etcd.io/etcd/wal"
"go.etcd.io/etcd/wal/walpb"

"go.uber.org/zap"
)

Expand Down
10 changes: 5 additions & 5 deletions raft/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -353,15 +353,15 @@ func (n *node) run(r *raft) {
}
case m := <-n.recvc:
// filter out response message from unknown From.
if pr := r.prs.getProgress(m.From); pr != nil || !IsResponseMsg(m.Type) {
if pr := r.prs.Progress[m.From]; pr != nil || !IsResponseMsg(m.Type) {
r.Step(m)
}
case cc := <-n.confc:
if cc.NodeID == None {
select {
case n.confstatec <- pb.ConfState{
Nodes: r.prs.voterNodes(),
Learners: r.prs.learnerNodes()}:
Nodes: r.prs.VoterNodes(),
Learners: r.prs.LearnerNodes()}:
case <-n.done:
}
break
Expand All @@ -384,8 +384,8 @@ func (n *node) run(r *raft) {
}
select {
case n.confstatec <- pb.ConfState{
Nodes: r.prs.voterNodes(),
Learners: r.prs.learnerNodes()}:
Nodes: r.prs.VoterNodes(),
Learners: r.prs.LearnerNodes()}:
case <-n.done:
}
case <-n.tickc:
Expand Down
Loading

0 comments on commit 948e276

Please sign in to comment.