-
Notifications
You must be signed in to change notification settings - Fork 555
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
[Backport stable/8.0] fix: take snapshot if nothing was exported since last snapshot #10624
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
In cases where the log contains no entry at the snapshot position but a previous snapshot exists and taking a new snapshot is desirable because the processed position changed, verify that a new snapshot is taken that has the same term and index as the previous snapshot but a higher processed position. (cherry picked from commit 42ee7c6)
When figuring out where to take the next snapshot, we determine the snapshot position as the minimum of processing and exporter positions. There was an edge case where a leader could process but no export. In that case it'd use the exporter position as snapshot position and try and find a log entry at that position. If the log starts with the exporter position, for example because the same broker previously received a snapshot and compacted the log, no entry could be found which led to a failed snapshot. We now try and use the latest snapshot's term and index if the log entry could not be found. This ensures that new snapshots can be taken even if nothing was exported since the last snapshot. (cherry picked from commit ef090ab)
oleschoenburg
approved these changes
Oct 6, 2022
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.
bors r+
Build failed: |
bors merge |
zeebe-bors-camunda bot
added a commit
that referenced
this pull request
Oct 7, 2022
10493: [Backport stable/8.0] fix(raft): handle exceptions on partition server init r=oleschoenburg a=megglos # Description Backport of #10450 to `stable/8.0`. 10566: [Backport stable/8.0] fix(helm): rename podSecurityContext to containerSecurityContext r=oleschoenburg a=backport-action # Description Backport of #10556 to `stable/8.0`. relates to camunda/camunda-platform-helm#374 10624: [Backport stable/8.0] fix: take snapshot if nothing was exported since last snapshot r=oleschoenburg a=backport-action # Description Backport of #10611 to `stable/8.0`. relates to #9761 10638: [Backport stable/8.0] test: fix unfinished stubbing of command response writer r=oleschoenburg a=backport-action # Description Backport of #10605 to `stable/8.0`. relates to #10604 Co-authored-by: Meggle (Sebastian Bathke) <sebastian.bathke@camunda.com> Co-authored-by: Ole Schönburg <ole.schoenburg@gmail.com>
This PR was included in a batch that was canceled, it will be automatically retried |
Canceled. |
bors merge |
Build succeeded: |
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.
Description
Backport of #10611 to
stable/8.0
.relates to #9761