Commit 2c0667f
committed
Add support for managing a fixed number of retained snapshots
With this change, Restate can be configured to retain a set of recent
snapshots, and automatically delete older snapshots that are no longer
needed. Previously, older snapshots were no longer managed by Retate.
This saves users from having to implement an external lifecycle policy.
When explicit snapshot retention is specified, the reported Archived LSN
will be that of the earliest retained snapshot. Together with the
durability setting, this influences the automatic log trim behavior.
When auto trim respects the Archived LSN, the latest partition snapshot
reference can be (manually) updated to any snapshot within the retention
window, e.g. to deal with snapshot corruption.1 parent 00de3b0 commit 2c0667f
File tree
8 files changed
+873
-97
lines changed- crates
- partition-store
- src
- snapshots
- types/src/config
- worker/src
- partition/leadership
8 files changed
+873
-97
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| 71 | + | |
71 | 72 | | |
72 | 73 | | |
73 | 74 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
98 | 103 | | |
99 | 104 | | |
100 | 105 | | |
| |||
0 commit comments