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

Allow retaining more than one snapshot #10206

Open
Tracked by #9606 ...
deepthidevaki opened this issue Aug 29, 2022 · 2 comments
Open
Tracked by #9606 ...

Allow retaining more than one snapshot #10206

deepthidevaki opened this issue Aug 29, 2022 · 2 comments
Labels
component/snapshot component/zeebe Related to the Zeebe component/team kind/toil Categorizes an issue or PR as general maintenance, i.e. cleanup, refactoring, etc.

Comments

@deepthidevaki
Copy link
Contributor

Only specific snapshots are valid to be included in the backup. Specifically a snapshot can be included in the backup if snapshot position < lastWrittenPosition < checkpoint position. Otherwise, if we recover from the backup, the state will be inconsistent.
Before taking a backup, BackupManager finds a snapshot that satisfies the above condition. If there is no suitable snapshot, backup will fail. Since snapshots are taken quite frequently, this can increase the chance of not taking a backup. To prevent the backup from failing, it would be better if we retain more than one snapshot. So if the latest snapshot cannot be included in the backup, it can choose a previous one.

To achieve this:

  • Find a solution for Multiple snapshots are incompatible with Raft "catch-up" implementation #3573 This is a blocker.
  • On startup, SnapshotStore should not delete all snapshots older that the latest one
  • After taking a snapshot, delete older snapshot based on the allowed number of snapshots.
  • Compaction based on oldest snapshot. (This is already done.)
  • The maximum number of retained snapshots can be configured.
@deepthidevaki deepthidevaki added the kind/toil Categorizes an issue or PR as general maintenance, i.e. cleanup, refactoring, etc. label Aug 29, 2022
@deepthidevaki deepthidevaki self-assigned this Dec 9, 2022
@megglos
Copy link
Contributor

megglos commented Dec 9, 2022

Planning:
worth investigating till 8.2 release, putting into backlog right now to be picked up in next planning

@megglos
Copy link
Contributor

megglos commented Jan 20, 2023

Decided to keep it in backlog for now as we have more urgent work and right now we don't consider this to be an issue.

@romansmirnov romansmirnov added the component/zeebe Related to the Zeebe component/team label Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/snapshot component/zeebe Related to the Zeebe component/team kind/toil Categorizes an issue or PR as general maintenance, i.e. cleanup, refactoring, etc.
Projects
None yet
Development

No branches or pull requests

4 participants