mirror of
https://github.com/agent-substrate/substrate.git
synced 2026-11-10 10:13:50 +08:00
FinalizeSuspended deleted the external snapshot a suspend replaced before committing SUSPENDED. By then the new checkpoint is uploaded and the worker's assignment row is released, so a transient object-store error (429/503) on that delete aborted the workflow with the actor stuck in SUSPENDING: ResumeActor rejects that state with FailedPrecondition, and a retried suspend re-sends Checkpoint to the already-released worker, which most likely crashes the actor despite a good snapshot in storage. Commit SUSPENDED first, then release the replaced snapshot best-effort, logging a failure instead of returning it. A failed release now leaves the old snapshot's objects in storage until the actor is deleted, which removes its whole prefix, rather than stranding the actor. A commit lost to a concurrent update releases nothing, since the record still names the old snapshot. > It's a good idea to open an issue first for discussion. - [x] Tests pass - [x] Appropriate changes to documentation are included in the PR