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] Do not bump clfs on seq mismatch when before stream LastSeq #5821

Merged
merged 5 commits into from
Aug 26, 2024

Conversation

wallyqs
Copy link
Member

@wallyqs wallyqs commented Aug 23, 2024

Sometimes during a stream catchup after a restart, when applying entries the clfs could have been bumped due to msg not found errors from likely deleted messages, causing a stream replica to remain out of sync.

Fixes #5205

@wallyqs wallyqs requested a review from a team as a code owner August 23, 2024 04:01
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.

I think this can cause false negatives..

wallyqs and others added 5 commits August 26, 2024 01:14
Signed-off-by: Waldemar Quevedo <wally@nats.io>
Signed-off-by: Waldemar Quevedo <wally@nats.io>
Signed-off-by: Waldemar Quevedo <wally@nats.io>
Signed-off-by: Derek Collison <derek@nats.io>
Signed-off-by: Waldemar Quevedo <wally@nats.io>
@wallyqs
Copy link
Member Author

wallyqs commented Aug 26, 2024

rebased and added the related tests for this one, it is ready to merge now

@derekcollison derekcollison self-requested a review August 26, 2024 14:38
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 52edb12 into main Aug 26, 2024
5 checks passed
@derekcollison derekcollison deleted the kv-seq-mismatch branch August 26, 2024 14:39
wallyqs added a commit that referenced this pull request Aug 26, 2024
Sometimes during a stream catchup after a restart, when applying entries
the clfs could have been bumped due to msg not found errors from likely
deleted messages, causing a stream replica to remain out of sync.

Fixes #5205

---------

Signed-off-by: Waldemar Quevedo <wally@nats.io>
Signed-off-by: Derek Collison <derek@nats.io>
Co-authored-by: Derek Collison <derek@nats.io>
@wallyqs wallyqs changed the title Do not bump clfs on seq mismatch when before stream LastSeq [FIXED] Do not bump clfs on seq mismatch when before stream LastSeq Aug 26, 2024
wallyqs added a commit that referenced this pull request Aug 27, 2024
derekcollison pushed a commit that referenced this pull request Aug 28, 2024
A regression was introduced in
#5821 where CAS operations on
a R1 stream would succeed even if they should be rejected. Whereas on
R3/clustered they would be rejected.

Resolves: #5840

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

---------

Signed-off-by: Waldemar Quevedo <wally@nats.io>
Signed-off-by: Maurice van Veen <github@mauricevanveen.com>
Co-authored-by: Waldemar Quevedo <wally@nats.io>
wallyqs added a commit that referenced this pull request Aug 28, 2024
A regression was introduced in
#5821 where CAS operations on
a R1 stream would succeed even if they should be rejected. Whereas on
R3/clustered they would be rejected.

Resolves: #5840

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

---------

Signed-off-by: Waldemar Quevedo <wally@nats.io>
Signed-off-by: Maurice van Veen <github@mauricevanveen.com>
Co-authored-by: Waldemar Quevedo <wally@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.

Nats server pod gets stuck in KV stream catchup after restart
4 participants