فهرست منبع

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