raft: follow golint notice to replace +=1 with ++
parent
42b5bc021a
commit
194607812c
|
@ -220,7 +220,7 @@ func (in *inflights) freeTo(to uint64) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// increase index and maybe rotate
|
// increase index and maybe rotate
|
||||||
if idx += 1; idx >= in.size {
|
if idx++; idx >= in.size {
|
||||||
idx -= in.size
|
idx -= in.size
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -868,12 +868,12 @@ func (r *raft) checkQuorumActive() bool {
|
||||||
|
|
||||||
for id := range r.prs {
|
for id := range r.prs {
|
||||||
if id == r.id { // self is always active
|
if id == r.id { // self is always active
|
||||||
act += 1
|
act++
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
if r.prs[id].RecentActive {
|
if r.prs[id].RecentActive {
|
||||||
act += 1
|
act++
|
||||||
}
|
}
|
||||||
|
|
||||||
r.prs[id].RecentActive = false
|
r.prs[id].RecentActive = false
|
||||||
|
|
Loading…
Reference in New Issue