atelet: prune local pause snapshots - #705
Open
NekoPunch (orangeCatDeveloper) wants to merge 1 commit into
Open
Conversation
Pause snapshots accumulated until the node disk filled; the control plane only ever references the latest one. Pause now keeps just the snapshot it wrote, suspend removes them all. Snapshot prefixes are validated as single path segments at the RPC boundary: a nested prefix would nest on write but be pruned as its top-level directory, deleting the fresh snapshot.
This file contains hidden or 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
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.
Summary
atelet never deletes local pause snapshots, so they accumulate until the node disk fills (#668). The control plane only ever references the latest one (
LocalSnapshotInfois single-valued), so older directories are dead weight by design. Pause now prunes everything except the snapshot it just wrote; suspend removes them all, since the durable snapshot supersedes local state. Pruning is best-effort: a failed delete is logged and retried by the next prune, never failing the checkpoint.Snapshot prefixes are now validated as single path segments at the Checkpoint/Restore RPC boundary (shared
ValidateLocalSnapshotPrefix). Previously only checked non-empty: a nested prefix likepause/2would write nested but be pruned as its top-level directory, deleting the fresh snapshot;..could escape the actor's directory entirely.Fixes #668
Test plan