mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
raft: prev should be set only when we sucessfully send out rd to the channel
This commit is contained in:
parent
57ea72d3c4
commit
0060c0749a
@ -106,7 +106,6 @@ func (n *Node) run(r *raft) {
|
||||
|
||||
if rd.containsUpdates(prev) {
|
||||
readyc = n.readyc
|
||||
prev = rd
|
||||
} else {
|
||||
readyc = nil
|
||||
}
|
||||
@ -122,6 +121,7 @@ func (n *Node) run(r *raft) {
|
||||
case readyc <- rd:
|
||||
r.raftLog.resetNextEnts()
|
||||
r.raftLog.resetUnstable()
|
||||
prev = rd
|
||||
r.msgs = nil
|
||||
case <-n.done:
|
||||
return
|
||||
|
Loading…
x
Reference in New Issue
Block a user