push
github
deleteBlocks merges gaps incorrectly (#7757) This commit reverts the changes to `deleteBlocks` in commit 0cb363b66. The above commit introduced the ability for `deleteBlocks` to extend a `DeleteRange` to cover two gaps. This worked when the two gaps were separated by empty blocks. However, the same logic could extend distinct gaps that were separated by non-empty blocks. Causing `DeleteRange`s to potentially cover non-deleted messages. To fix this, `deleteBlocks` now keeps track of the number of messages between gaps, so that it extends the previous `DeleteRange` only if there are no messages between gaps. Signed-off-by: Daniele Sciascia <daniele@nats.io>
74291 of 87831 relevant lines covered (84.58%)
361669.89 hits per line
The file "src/github.com/nats-io/nats-server/server/jetstream_errors_generated.go" isn't available on github. Either it's been removed, or the repo root directory needs to be updated.