Преглед изворни кода

raft: not call stableTo for restored snapshot

Stable has been set when restoring the snapshot in raftlog, so we don't need
to set it after advance.
Yicheng Qin пре 11 година
родитељ
комит
551a56fb98
1 измењених фајлова са 0 додато и 4 уклоњено
  1. 0 4
      raft/node.go

+ 0 - 4
raft/node.go

@@ -292,10 +292,6 @@ func (n *node) run(r *raft) {
 				prevHardSt = rd.HardState
 			}
 			if !IsEmptySnap(rd.Snapshot) {
-				if rd.Snapshot.Metadata.Index > prevLastUnstablei {
-					prevLastUnstablei = rd.Snapshot.Metadata.Index
-					havePrevLastUnstablei = true
-				}
 				prevSnapi = rd.Snapshot.Metadata.Index
 			}
 			r.msgs = nil