You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Worker and actor assignment is bi-directional. They each have an assignment field pointing to the other object. The update operations only mutate a single object (actor or worker) at a time, which results in race conditions and leaking one side of the assignment.
We should investigate whether it makes sense to update both sides of the assignment in a single transaction to make this operation atomic. Will this simplify some of the edge cases and special handling we have to prevent race conditions?
Activity
BenTheElder commentedon Sep 14, 2026
cc Tim Hockin (@thockin) Julian Gutierrez Oschmann (@juli4n) Eitan Yarmush (@EItanya) Jet Chiang (@supreme-gg-gg)
There's been some debate about how much we want to use postgres / SQL vs treating the database as sort of "key/value" that can be swapped out.
I think we should lean into postgres and push a little bit more down into the transactions, FWIW.
Update the actor and its worker assignment in one transaction (agent-…
Update the actor and its worker assignment in one transaction (#3223)