-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIXED] JetStream catchup may return/delete too much (#6213)
JetStream catchup could have a follower delete too much because it could send too large delete ranges. This was due to `LoadNextMsg` being used and not checking if the requested `last` sequence was exceeded. This could happen if `LoadNextMsg` was used AND `last < state.LastSeq` AND there's at least one deleted message at sequence `last+1`. Given you have a stream with a message at sequence 1 and 100, with a gap in the middle, there were two issues when requesting only to receive what message is stored at sequence 5 (for example): - A delete range would be sent with sequence 5 and number of deletes of 95, this should be 1 delete. - If the message at sequence 100 was deleted it would also return the same as above, this should also be only 1 delete. Signed-off-by: Maurice van Veen <github@mauricevanveen.com>
- Loading branch information
Showing
2 changed files
with
99 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters