Skip to content

Commit

Permalink
Snapshots of no length can hold state as well
Browse files Browse the repository at this point in the history
Signed-off-by: Derek Collison <derek@nats.io>
  • Loading branch information
derekcollison committed Mar 29, 2023
1 parent c4da37e commit 35d1a77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/raft.go
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,7 @@ func (n *raft) InstallSnapshot(data []byte) error {
var state StreamState
n.wal.FastState(&state)

if n.applied == 0 || len(data) == 0 {
if n.applied == 0 {
n.Unlock()
return errNoSnapAvailable
}
Expand Down

0 comments on commit 35d1a77

Please sign in to comment.