-
Notifications
You must be signed in to change notification settings - Fork 554
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: take snapshot if nothing was exported since last snapshot
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.
- Loading branch information
1 parent
42ee7c6
commit 52bef12
Showing
2 changed files
with
58 additions
and
39 deletions.
There are no files selected for viewing
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
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