-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIXED] Fix for panic from a bug in selecting a filestore block in ne…
…w fs code. (#4520) When num blocks > 32 and we used new binary search in NumPending() we could return -1, nil. If sequence is inclusive this should always return valid index and mb. The reason we could return -1 would be that we were not accounting for gaps as mb.first.seq can move ahead as first is removed. The panic could orphan held locks for filestore, consumer and possibly stream which would lock up a system, leading to memory growth and unstable behaviors. Signed-off-by: Derek Collison <derek@nats.io>
- Loading branch information
Showing
2 changed files
with
71 additions
and
1 deletion.
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