Repository navigation
Preserve committed local snapshots when reverting actors - #3041
Luomu (cloudonly) wants to merge 4 commits into
Conversation
c6d02a1 to
4e392b0
Compare
c3f0873 to
e9c5962
Compare
|
I think #3079 is doing the same fix for #2983 but in a different way. Zoe Zhao (@zoez7) could you take a look? |
|
Heads-up for the rebase: #2797, merged after this PR's base, added another That breaks the case this PR's api-guide change covers. Say an actor resumes from a local snapshot whose upload is still pending, and then its worker pod goes away. The reclaim deletes that snapshot before the user can revert, and Setting |
Async snapshot uploads can remain PENDING after a local checkpoint commits. Preserve that checkpoint through workload teardown and snapshot cleanup. Reject Revert on SUSPENDED actors regardless of snapshot locality.
e9c5962 to
8678da7
Compare
DeleteWorker sent a full Terminate for each actor on a deleted worker, which forgot the actor's committed local snapshot and pruned its checkpoint. A later Revert could not account for that snapshot and failed on every retry. Send preserve_snapshots, as Revert does, so the snapshot and its pending upload survive until the revert.
|
Thanks, confirmed. Pushed 40dc5fc, without a rebase. It sets One cost: with preserve, atelet empties the actor directory but keeps the snapshot directory until the detach delay passes, so this frees less disk right away than #2797 did. I checked the request with a store-free test and read the code. The Postgres-backed test didn't run on my machine, so CI is its first run. |
|
Thanks for the pointer. The two PRs overlap but fix different cases. This one keeps a committed local snapshot and its pending upload when the actor is terminated for a revert. #3079 records an upload that atelet finished but ateapi had not yet recorded. Both change Zoe Zhao (@zoez7), since #3079 is back in draft, could we agree on which lands first? |
Revert deletes committed local checkpoints while their async uploads are still PENDING. It can restore an older snapshot or cold-start instead. SUSPENDED admission also changes with snapshot locality.
Fixes #2983.
moveLocalCheckpointimplementation now comes from main.Rebased onto the latest main.
Validation on the rebased branch:
-race -count=3 -shuffle=on: 1,551 passing test and subtest entries, without skips. Tests ran as a regular Linux user. Functional tests used PostgreSQL, envtest, and a fake atelet.-race -count=3 -shuffle=on: 42 passing test and subtest entries.go build ./cmd/atelet,hack/verify/gofmt.sh, andgit diff --checkpassed.Before this rebase, cross-filesystem snapshot GC and Terminate retention and cleanup tests passed inside an isolated kind node with
-race -count=3 -shuffle=on: 48 passing entries, without skips.An earlier broader atelet and snapshottracker run found a data race in the unchanged
fakeJWTMintertest fixture. The same isolated test reproduced it on main2864a31fin a 500-run comparison. The related regression run above passed. The earlier broader run is not a clean pass.Earlier validation on
1ffedeba: full package race tests passed with 11,240 test and subtest entries, using-vet=offand an external Linux 5.14 OverlayFS compatibility overlay. Filecache ran separately without DAC overrides. Fifteen skips matched the parent; nine permission cases passed separately as a regular user.go build ./cmd/...and allhack/verify/scripts passed. These full checks have not been repeated on the rebased head.microVM E2E was not run because the validation host has no KVM. The kernel compatibility overlay stays outside this PR.
AI was used for conflict resolution, review, the cleanup fix, and test validation.
The rebase also handles failed cross-node restores: Revert clears locality only for confirmed deleted snapshot nodes, preserves live-node copies, and retains PENDING metadata until normal cleanup. Snapshot-node lookup errors stop cleanup; Actor version conflicts remain protected. Six regression cases cover these boundaries.
Latest rebase (2026-10-23): rebased onto main
4ebd668dat8678da7e. Focused race regressions passed three shuffled runs; affected binaries and test packages compiled. Earlier validation entries describe prior revisions. Cluster E2E was not rerun. Codex assisted with this rebase and validation.