Skip to content

atelet: serialize node-local operations per actor - #1137

Open
Troy Chiu (troychiu) wants to merge 1 commit into
agent-substrate:mainfrom
troychiu:split/3-atelet-actor-locks
Open

atelet: serialize node-local operations per actor#1137
Troy Chiu (troychiu) wants to merge 1 commit into
agent-substrate:mainfrom
troychiu:split/3-atelet-actor-locks

Conversation

@troychiu

@troychiu Troy Chiu (troychiu) commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Towards #372

Serializes node-local operations (Run, Checkpoint, UploadPausedCheckpoint, Restore, Terminate) on a per-actor basis in atelet to prevent concurrent operations from interfering with each other's on-disk state (e.g. reading or wiping checkpoint directories concurrently).

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

@google-cla

google-cla Bot commented Aug 21, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@troychiu
Troy Chiu (troychiu) force-pushed the split/3-atelet-actor-locks branch from 5f06808 to afad210 Compare August 25, 2026 20:55
Comment thread cmd/atelet/actorlocks.go
"google.golang.org/grpc/status"
)

// actorLocks serializes concurrent node-local operations for the same actor.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this given that the ate apiserver already holds a global lock per actor before each Actor operation?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's still needed.

If an ateapi request cancels or times out, ateapi exits and releases the distributed lock. However, the in-flight gRPC call on atelet may still be running or unwinding. If a retry arrives immediately, ateapi re-acquires the lock and issues a second RPC to atelet, resulting in concurrent operations interfering with the actor's local state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants