Repository navigation
UpdateActor fails with Aborted while another operation on the actor is in progress - #3131
Open
Zoe Zhao (zoez7) wants to merge 1 commit into
Open
Zoe Zhao (zoez7) wants to merge 1 commit into
Zoe Zhao (zoez7) wants to merge 1 commit into
Conversation
Zoe Zhao (zoez7)
force-pushed
the
updateactor-lease
branch
from
October 22, 2026 21:05
2aab9f0 to
d8084c5
Compare
Zoe Zhao (zoez7)
marked this pull request as ready for review
October 22, 2026 21:26
Zoe Zhao (zoez7)
requested review from
Dmitry Berkovich (dberkov) and
Julian Gutierrez Oschmann (juli4n)
October 22, 2026 21:26
2 tasks
Zoe Zhao (zoez7)
force-pushed
the
updateactor-lease
branch
from
October 23, 2026 16:07
d8084c5 to
f5bf36d
Compare
UpdateActor relied only on the uid/version precondition, so it could interleave with a workflow that holds the actor lease. It now takes the lease like suspend, resume, revert, delete and tag do.
Zoe Zhao (zoez7)
force-pushed
the
updateactor-lease
branch
from
October 24, 2026 14:27
f5bf36d to
487d7d4
Compare
| setSpanActorRefAttributes(ctx, actorRef) | ||
|
|
||
| storedActor, err := s.impl.UpdateActor(ctx, actorRef, store.PreconditionFrom(inActor), func(toUpdate *ateapi.Actor) error { | ||
| leaseCtx, lease, err := acquireLease(ctx, s.impl, actorLeaseKey(actorRef), "actor") |
Collaborator
There was a problem hiding this comment.
🤖 should-fix 🟡 – ABORTED from UpdateActor now has a second cause, but the API guide still lists only the guard mismatch. Please add the in-progress case to the error line at docs/api-guide.md:663 (worker_selector "in any state" is still true, but not mid-operation). The ReportActorSnapshotState comment in ateapi.proto has the house wording: "Returns ABORTED while another operation is changing the Actor; retry."
| return nil, err | ||
| } | ||
|
|
||
| setSpanActorAttributes(ctx, storedActor) |
Collaborator
There was a problem hiding this comment.
Should this use leaseCtx instead of ctx? It might be worth just reassigning ctx = leaseCtx right after acquiring it to prevent mismatches like this."
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.
Fixes #3129
UpdateActornow takes the actor lease, like suspend, resume, revert, delete and tag. A caller that races one of them gets Aborted and can retry.This is to prevent an actor's workerSelector or actorTemplate from getting updated during other operations such as suspend/resume.
AI use: AI-assisted with Claude Code, which drafted the code, test, and this description. I reviewed them.