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

[Backport stable/8.0] fix(broker): do not log error if follower fails to take snapshot when log is not uptodate #9636

Merged
merged 1 commit into from
Jun 29, 2022

Conversation

backport-action
Copy link
Collaborator

Description

Backport of #9624 to stable/8.0.

relates to #7911

… log is not up-to-date

Alternative options where to prevent taking snapshot in such cases. But it is very difficult to identify this case. All options prevented taking snapshots in scenarios where we want to take snapshot.
1. One option was to return -1 as processed position in ReplayStateMachine when no events after snapshot position is replayed. But this also prevents taking snapshot when there are no new records, but the exporter position increases.
2. Another options was to skip snapshot in StateController, when the determined snapshot position <= position in latest snapshot. This would not fix the bug, because if the exporter position has changed, it will still try to take snapshot and enter the same situation where it cannot find the indexed entry. Other options were attempted, but all failed one or the other edge case.

So, the easiest solution is to treat it as a special case in AsyncSnapshotDirector.

(cherry picked from commit 372367d)
Copy link
Contributor

@deepthidevaki deepthidevaki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bors merge

zeebe-bors-camunda bot added a commit that referenced this pull request Jun 28, 2022
9636: [Backport stable/8.0] fix(broker): do not log error if follower fails to take snapshot when log is not uptodate r=deepthidevaki a=backport-action

# Description
Backport of #9624 to `stable/8.0`.

relates to #7911

Co-authored-by: Deepthi Devaki Akkoorath <deepthidevaki@gmail.com>
@zeebe-bors-camunda
Copy link
Contributor

Build failed:

@deepthidevaki
Copy link
Contributor

bors merge

@zeebe-bors-camunda
Copy link
Contributor

@zeebe-bors-camunda zeebe-bors-camunda bot merged commit ffce81a into stable/8.0 Jun 29, 2022
@zeebe-bors-camunda zeebe-bors-camunda bot deleted the backport-9624-to-stable/8.0 branch June 29, 2022 07:09
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