|
|
@@ -472,6 +472,12 @@ func (r *raft) handleSnapshot(m pb.Message) {
|
|
|
func (r *raft) resetPendingConf() { r.pendingConf = false }
|
|
|
|
|
|
func (r *raft) addNode(id uint64) {
|
|
|
+ if _, ok := r.prs[id]; ok {
|
|
|
+ // Ignore any redundant addNode calls (which can happen because the
|
|
|
+ // initial bootstrapping entries are applied twice).
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
r.setProgress(id, 0, r.raftLog.lastIndex()+1)
|
|
|
r.pendingConf = false
|
|
|
}
|