fix(raft): fix BC-1333, the leader node cannot be selected

This commit is contained in:
Lizen0512 2020-12-16 15:01:15 +08:00
parent 9c9078c8e5
commit 3212c66f60
1 changed files with 3 additions and 3 deletions

View File

@ -355,10 +355,10 @@ func (n *Node) run() {
msgInflight := n.ramLastIndex() > n.appliedIndex+1
if msgInflight {
n.logger.Debugf("There are in flight blocks, new leader should not serve requests")
continue
} else {
n.justElected = false
n.mempool.UpdateLeader(n.leader)
}
n.justElected = false
n.mempool.UpdateLeader(n.leader)
}
// 3: AsyncSend all Messages to the nodes named in the To field.