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] DeleteRange deletes one message too much #6111

Closed MauriceVanVeen closed 1 week ago

MauriceVanVeen commented 1 week ago

When a DeleteRange was used to mark deletes, when looping over it with dr.Range(..) it would delete one message too much.

Compared with a DeleteSlice the DeleteRange also didn't return the correct last for dr.State(). Also being +1 what it should be.

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