Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion server/jetstream_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -3490,6 +3490,14 @@ func (js *jetStream) applyStreamEntries(mset *stream, ce *CommittedEntry, isReco
return 0, err
}
} else {
// Older v1 version with deleted as a sorted []uint64.
// For a stream with millions or billions of interior deletes, this will be huge.
// Now that all server versions 2.10.+ support binary snapshots, we should never fall back.
assert.Unreachable("Legacy JSON stream snapshot unmarshalled", map[string]any{
"stream": mset.cfg.Name,
"account": mset.acc.Name,
})

var snap streamSnapshot
if err := json.Unmarshal(e.Data, &snap); err != nil {
onBadState(err)
Expand Down Expand Up @@ -8751,7 +8759,8 @@ func (mset *stream) supportsBinarySnapshotLocked() bool {
}

// StreamSnapshot is used for snapshotting and out of band catch up in clustered mode.
// Legacy, replace with binary stream snapshots.
//
// Deprecated: replaced with binary stream snapshots.
type streamSnapshot struct {
Msgs uint64 `json:"messages"`
Bytes uint64 `json:"bytes"`
Expand Down
Loading