Skip to content

atelet: Wait for superseded uploads to stop - #2833

Draft
Michelle Au (msau42) wants to merge 1 commit into
agent-substrate:mainfrom
msau42:wait-superseded-uploads
Draft

Michelle Au (msau42) wants to merge 1 commit into
agent-substrate:mainfrom
msau42:wait-superseded-uploads

Conversation

@msau42

@msau42 Michelle Au (msau42) commented Oct 18, 2026 •

Copy link
Copy Markdown
Collaborator

When a Checkpoint with an immediate upload, or a PromoteSnapshot, makes a snapshot durable, atelet now cancels any upload of an older snapshot still in progress and waits for it to stop before returning. Terminate likewise waits for the actor's upload or detach in progress to stop.

Once the control plane learns that a newer snapshot is durable, or has terminated the actor, nothing on the node is still writing an older snapshot's objects, so the control plane can delete them.

Part of #2069 and #2571

  • Tests pass
  • Appropriate changes to documentation are included in the PR

@msau42

Copy link
Copy Markdown
Collaborator Author

Moving to draft as it currently depends on #2890

When a Checkpoint with an immediate upload, or a PromoteSnapshot, makes
a snapshot durable, atelet now cancels any upload of an older snapshot
still in progress and waits for it to stop before returning. Terminate
likewise waits for the actor's upload or detach in progress to stop, and
keeps new ones from starting while it runs. A PromoteSnapshot or
Terminate retried meanwhile waits too. As during a PromoteSnapshot, no
background upload starts while a Checkpoint with an immediate upload
runs.

Once the control plane learns that a newer snapshot is durable, or has
terminated the actor, atelet is no longer uploading an older snapshot in
the background, so the control plane can delete its objects.

The canceled upload now deletes the older snapshot's local copy even
while that Checkpoint or PromoteSnapshot is in progress. Only a Run or
Restore in progress, which may read any local snapshot, keeps it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants