[FIXED] Panic when selectMsgBlock returns nil#7072
Merged
neilalexander merged 1 commit intomainfrom Jul 17, 2025
Merged
Conversation
Signed-off-by: Maurice van Veen <github@mauricevanveen.com>
neilalexander
added a commit
that referenced
this pull request
Jul 25, 2025
Includes the following: - #7031 - #7033 - #7034 - #7035 - #7036 - #7040 - #7043 - #7045 - #7047 - #7046 - #7050 - #7051 - #7052 - #7053 - #7061 - #7063 - #7064 - #7065 - #7066 - #7070 - #7072 - #7080 - #7026 - #6728 - #7074 - #7089 - #7095 - #7087 - #7094 - #7096 - #7099 Signed-off-by: Neil Twigg <neil@nats.io>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We would panic on
if mb.ttls == 0aftergoto retryiffs.selectMsgBlock(seq)returned anilmessage block.This shouldn't happen normally, since
fs.selectMsgBlock(seq)selects either the message block that contains theseq, or the block after the one that should have contained it. Returning no block at all would likely mean the storage has been corrupted in some way.Signed-off-by: Maurice van Veen github@mauricevanveen.com