Full stream state with interior delete details not needed by recipient of snapshot

Signed-off-by: Derek Collison <derek@nats.io>
This commit is contained in:
Derek Collison
2021-12-20 17:37:07 -08:00
parent 4d71296cd7
commit 490acf5f29

View File

@@ -4868,8 +4868,9 @@ func (mset *stream) processSnapshot(snap *streamSnapshot) error {
mset.processSnapshotDeletes(snap)
mset.mu.Lock()
var state StreamState
mset.clfs = snap.Failed
state := mset.store.State()
mset.store.FastState(&state)
sreq := mset.calculateSyncRequest(&state, snap)
s, js, subject, n := mset.srv, mset.js, mset.sa.Sync, mset.node
mset.mu.Unlock()
@@ -4931,7 +4932,8 @@ RETRY:
// Grab sync request again on failures.
if sreq == nil {
mset.mu.Lock()
state := mset.store.State()
var state StreamState
mset.store.FastState(&state)
sreq = mset.calculateSyncRequest(&state, snap)
mset.mu.Unlock()
if sreq == nil {