-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
There was a problem hiding this 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..
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>
85f25a3
to
1aba6c3
Compare
rebased and added the related tests for this one, it is ready to merge now |
derekcollison
approved these changes
Aug 26, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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
added a commit
that referenced
this pull request
Aug 27, 2024
This was referenced Aug 27, 2024
cbrewster
reviewed
Aug 28, 2024
This was referenced Aug 28, 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>
derekcollison
added a commit
that referenced
this pull request
Oct 24, 2024
When we're being asked to provide data within a range during catchup, we should not extend that range and provide more data. Especially since that range was defined by a snapshot, which also specifies which RAFT entries should be sent after processing that snapshot. This would just result in duplicated work and possible desync for the follower, so these lines can safely be removed. **Timeline of these lines:** Previously when receiving a catchup request the `FirstSeq` could be moved up to match what the state says: [[IMPROVED] Catchup improvements #3348](https://github.com/nats-io/nats-server/pull/3348/files#diff-5cb252c37caef12e7027803018861c82724b120ddb62cfedc2f36addf57f6970R7132-R7138) (August, 2022) Afterward this was removed in favor of only extending the `LastSeq`: [[FIXED] KeyValue not found after server restarts #5054](https://github.com/nats-io/nats-server/pull/5054/files#diff-5cb252c37caef12e7027803018861c82724b120ddb62cfedc2f36addf57f6970R8579-R8588) (February, 2024) This was done to solve for KeyValue not found issues. However this change would have also fixed that case: [[FIXED] Do not bump clfs on seq mismatch when before stream LastSeq #5821](https://github.com/nats-io/nats-server/pull/5821/files#diff-2f4991438bb868a8587303cde9107f83127e88ad70bd19d5c6a31c238a20c299R4694-R4699) (August, 2024) Signed-off-by: Maurice van Veen <github@mauricevanveen.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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