mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
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.
This commit is contained in:
parent
f34fe6e4ae
commit
551a56fb98
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user