Repository navigation
atelet: Answer a retried Checkpoint from the snapshot it committed - #2849
Draft
Michelle Au (msau42) wants to merge 2 commits into
Draft
Michelle Au (msau42) wants to merge 2 commits into
Michelle Au (msau42) wants to merge 2 commits into
Conversation
Michelle Au (msau42)
requested review from
Dmitry Berkovich (dberkov) and
Zoe Zhao (zoez7)
October 18, 2026 22:44
Michelle Au (msau42)
marked this pull request as draft
October 19, 2026 05:09
Collaborator
Author
|
I'm exploring if there's ways to simplify this. It's getting a bit complex trying to keep tracking of ongoing RPCs and I'm exploring a few things:
|
Atelet now runs at most one lifecycle RPC per actor at a time. Run, Restore, Checkpoint, PromoteSnapshot, DetachActor, and Terminate wait their turn for the actor. Before, Terminate could forget an actor and delete its local snapshots and directories while a Checkpoint or Restore of the actor was still using them, and a Checkpoint that committed afterward recreated snapshot state for the terminated actor. Terminate waits for any in-flight RPC for that actor to finish before forgetting its snapshot state and removing its local snapshots and actor directories. With RPCs serialized at the atelet boundary, snapshottracker only coordinates background uploads, detaches, and reports against the active RPC.
When ateapi loses a Checkpoint's response, it retries with the same snapshot. atelet ran the retry from the start, so it checkpointed the worker again, which fails once the first attempt has deleted the workload. ateapi crashed the actor on that error, and the revert threw away the generation atelet had committed. A Checkpoint of a snapshot that atelet has already committed now returns the actor's state without checkpointing again. It still uploads the snapshot first if the retry asks for an immediate upload that the first attempt deferred, and, unless the actor has started again since, finishes any cleanup the first attempt left undone. If atelet has already uploaded and detached an async suspend's snapshot, ateapi records it without node locality.
Michelle Au (msau42)
force-pushed
the
checkpoint-retry-committed
branch
from
October 19, 2026 18:32
aef218a to
dc7da0b
Compare
Collaborator
Author
|
depends on #2890 |
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.
When ateapi loses a Checkpoint's response, it retries with the same snapshot. atelet ran the retry from the start, so it checkpointed the worker again, which fails once the first attempt has deleted the workload. ateapi crashed the actor on that error, and the revert threw away the generation atelet had committed.
A Checkpoint of a snapshot that atelet has already committed now returns the actor's state without checkpointing again. It still uploads the snapshot first if the retry asks for an immediate upload that the first attempt deferred, and, unless the actor has started again since, finishes any cleanup the first attempt left undone. A retry that arrives while the first attempt is still running waits for it, as do Run and Restore. If atelet has already uploaded and detached an async suspend's snapshot, ateapi records it without node locality.
Part of #2069 and #2571