Skip to content

[FIXED] Reset clustered state on msg delete EOF#7348

Merged
neilalexander merged 1 commit intomainfrom
maurice/rm-eof
Sep 24, 2025
Merged

[FIXED] Reset clustered state on msg delete EOF#7348
neilalexander merged 1 commit intomainfrom
maurice/rm-eof

Conversation

@MauriceVanVeen
Copy link
Copy Markdown
Member

Deleting a non-existent sequence on a stream results in clustered state being reset, which triggers a leader election.

Resolves #7308

Signed-off-by: Maurice van Veen github@mauricevanveen.com

@MauriceVanVeen MauriceVanVeen requested a review from a team as a code owner September 23, 2025 14:59
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


// Cluster reset error.
js.mu.RLock()
isLeader := cc.isStreamLeader(md.Client.serviceAccount(), md.Stream)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This seems expensive for the hotpath IMO..

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done, now using node := mset.raftNode(); node != nil && node.Leader()

Signed-off-by: Maurice van Veen <github@mauricevanveen.com>
@neilalexander neilalexander merged commit fd40cf5 into main Sep 24, 2025
68 of 70 checks passed
@neilalexander neilalexander deleted the maurice/rm-eof branch September 24, 2025 12:40
neilalexander added a commit that referenced this pull request Sep 29, 2025
Includes the following:

- #7290
- #7295
- #7291
- #7287
- #7299
- #7300
- #7297
- #7303
- #7304
- #7305
- #7309
- #7307
- #7320
- #7337
- #7344
- #7345
- #7348
- #7349
- #7350
- #7357
- #7356
- #7358
- #7367
- #7293

Signed-off-by: Neil Twigg <neil@nats.io>
neilalexander added a commit that referenced this pull request Sep 29, 2025
Includes the following:

- #7337
- #7342
- #7344
- #7345
- #7347
- #7346
- #7348
- #7349
- #7350
- #7357
- #7356
- #7358
- #7359
- #7366
- #7367
- #7293
- #7368

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.

When trying to delete a nonexistent message from stream, it becomes inaccessible

3 participants