Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIXED] SkipMsg left in mb.dmap after recovery #6521

Merged
merged 1 commit into from
Feb 18, 2025

Conversation

MauriceVanVeen
Copy link
Member

If the filestore recovers based on just the .blk files and not based on index.db, and it would start with an erased message it would be left in the mb.dmap even though it would be below the mb.first.seq.

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 February 18, 2025 15:10
@@ -7425,11 +7424,7 @@ func (fs *fileStore) State() StreamState {
}
// Add in deleted.
mb.dmap.Range(func(seq uint64) bool {
if seq < fseq {
mb.dmap.Delete(seq)
Copy link
Member Author

Choose a reason for hiding this comment

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

This would fix and hide if the mb.dmap was bugged. But only if fs.State() was called.

Copy link
Member

@derekcollison derekcollison left a comment

Choose a reason for hiding this comment

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

LGTM

@derekcollison derekcollison merged commit 82d899a into main Feb 18, 2025
5 checks passed
@derekcollison derekcollison deleted the maurice/ebit-dmap-empty-mb branch February 18, 2025 15:40
neilalexander added a commit that referenced this pull request Feb 18, 2025
Includes the following:

- #6507
- #6497
- #6476
- #6511
- #6513
- #6517
- #6515
- #6519
- #6521

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