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] Fix 0 expected last seq per subject for clustered stream #5794

Merged
merged 1 commit into from
Aug 16, 2024

Conversation

MauriceVanVeen
Copy link
Member

The getExpectedLastSeqPerSubject check in processJetStreamMsg would take into account that we could get a create/seq=0 for last seq per subject.

However, the processClusteredInboundMsg would NOT take this into account. This would result in sending the message to all replicas. If any replica would store instead of reject the message, it would desync.

The reproducible example from below issue doesn't reproduce anymore after this fix.

Resolves #5644

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

The `getExpectedLastSeqPerSubject` check in `processJetStreamMsg` would take into account that we could get a create/seq=0 for last seq per subject.
However, the `processClusteredInboundMsg` would NOT take this into account. This would result in sending the message to all replicas. If any replica would store instead of reject the message, it would desync.

Signed-off-by: Maurice van Veen <github@mauricevanveen.com>
@MauriceVanVeen MauriceVanVeen requested a review from a team as a code owner August 16, 2024 08:39
Copy link
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.

Looks reasonable to me

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 60589da into main Aug 16, 2024
5 checks passed
@derekcollison derekcollison deleted the maurice/fix-clustered-last-seq-per-subject-0 branch August 16, 2024 14:00
MauriceVanVeen added a commit that referenced this pull request Aug 16, 2024
@wallyqs wallyqs changed the title Fix 0 expected last seq per subject for clustered stream [FIXED] Fix 0 expected last seq per subject for clustered stream Aug 23, 2024
wallyqs added a commit that referenced this pull request Aug 23, 2024
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.

NATS KeyValue Corruption
3 participants