Skip to content

[FIXED] Panic when selectMsgBlock returns nil#7072

Merged
neilalexander merged 1 commit intomainfrom
maurice/fs-ttl-panic
Jul 17, 2025
Merged

[FIXED] Panic when selectMsgBlock returns nil#7072
neilalexander merged 1 commit intomainfrom
maurice/fs-ttl-panic

Conversation

@MauriceVanVeen
Copy link
Copy Markdown
Member

We would panic on if mb.ttls == 0 after goto retry if fs.selectMsgBlock(seq) returned a nil message block.

This shouldn't happen normally, since fs.selectMsgBlock(seq) selects either the message block that contains the seq, 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

Signed-off-by: Maurice van Veen <github@mauricevanveen.com>
@MauriceVanVeen MauriceVanVeen requested a review from a team as a code owner July 16, 2025 16:08
Copy link
Copy Markdown
Member

@neilalexander neilalexander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@neilalexander neilalexander merged commit aea1381 into main Jul 17, 2025
89 of 92 checks passed
@neilalexander neilalexander deleted the maurice/fs-ttl-panic branch July 17, 2025 10:11
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants