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] KeyValue not found after server restarts #5054

Merged
merged 2 commits into from Feb 9, 2024
Merged

Conversation

derekcollison
Copy link
Member

Do not force sequence mismatches and possible dataloss on first sequence move past a catchup request.

When a server restarts and does a stream catchup where the snapshot from the leader is for messages it no longer has, we would create a sequence mismatch reset on the follower.

Also on a catchup if the stream state has moved past the updated request range from a follower, meaning first for the new state is past the last of the request, extend and continue catchup.

Signed-off-by: Derek Collison derek@nats.io

…nce move past a catchup request.

When a server restarts and does a stream catchup where the snapshot from the leader is for messages it no longer has, we would create a sequence mismatch reset on the follower.
Also on a catchup if the stream state has moved past the updated request range from a follower, meaning first for the new state is past the last of the request, extend and continue catchup.

Signed-off-by: Derek Collison <derek@nats.io>
Signed-off-by: Derek Collison <derek@nats.io>
@derekcollison derekcollison requested a review from a team as a code owner February 9, 2024 20:01
Copy link
Member

@wallyqs wallyqs 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 eadab32 into main Feb 9, 2024
4 checks passed
@derekcollison derekcollison deleted the kv-not-found branch February 9, 2024 23:37
derekcollison added a commit that referenced this pull request Feb 10, 2024
Do not force sequence mismatches and possible dataloss on first sequence
move past a catchup request.

When a server restarts and does a stream catchup where the snapshot from
the leader is for messages it no longer has, we would create a sequence
mismatch reset on the follower.
    
Also on a catchup if the stream state has moved past the updated request
range from a follower, meaning first for the new state is past the last
of the request, extend and continue catchup.

Signed-off-by: Derek Collison <derek@nats.io>

---------

Signed-off-by: Derek Collison <derek@nats.io>
wallyqs pushed a commit that referenced this pull request Feb 13, 2024
Do not force sequence mismatches and possible dataloss on first sequence
move past a catchup request.

When a server restarts and does a stream catchup where the snapshot from
the leader is for messages it no longer has, we would create a sequence
mismatch reset on the follower.
    
Also on a catchup if the stream state has moved past the updated request
range from a follower, meaning first for the new state is past the last
of the request, extend and continue catchup.

Signed-off-by: Derek Collison <derek@nats.io>

---------

Signed-off-by: Derek Collison <derek@nats.io>
wallyqs added a commit that referenced this pull request Feb 14, 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.

None yet

2 participants