nats-io / nats-server

High-Performance server for NATS.io, the cloud and edge native messaging system.
https://nats.io
Apache License 2.0
16k stars 1.41k forks source link

[FIXED] Don't remove snapshot if truncate to applied #6055

Closed MauriceVanVeen closed 3 weeks ago

MauriceVanVeen commented 3 weeks ago

After installing a snapshot for n.applied=5, and then truncating back to its pterm and the same pindex as applied it would remove the snapshot as well, even though it should be kept.

Signed-off-by: Maurice van Veen github@mauricevanveen.com