Skip to content

ResumeActor: optional expected-snapshot precondition #2832

Open

Description

@gambtho

A client restoring a recorded checkpoint can't ask ResumeActor to restore exactly that checkpoint. It can GetActor, compare actor UID and snapshot UUID/generation, then call ResumeActor — but another caller can resume and suspend in between, so resume picks a different checkpoint. Delete/recreate under the same name can also target a different actor. For a RUNNING actor, ResumeActor returns resumed: false and restores nothing.

Proposal: ExpectedSnapshot expected = 2; on ResumeActorRequest, with actor_uid, snapshot_uuid and generation. It's a condition on the current restore source, not a way to pick an older checkpoint:

  • Checked under the actor lifecycle lease, before the RUNNING no-op or any restore work.
  • Requires that checkpoint to be the latest, completed and durable, with the actor SUSPENDED (or retryable RESUMING). A newer pending checkpoint is rejected, never resolved to an older completed one.
  • FAILED_PRECONDITION on mismatch or wrong state; UNAVAILABLE when the matching upload isn't complete yet.
  • Without expected, behaviour is unchanged, including the router's RUNNING no-op.

Fidelity is left to #2818; this only covers which checkpoint gets restored. Related: #1773 and #2551 (general revision guards).

I can send a PR if this makes sense?

Activity

  1. added
    kind/feature
    area/api
    on Oct 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/apiarea/api-machinerykind/feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions