Conversation
|
I would rather not add a parallel The mutate callback and the extra SELECT in Instead of adding a second method, could we change |
Resume and suspend already read the Actor before setting it to RUNNING or SUSPENDING. Reuse that copy for the UID- and version-guarded update to save a PostgreSQL round trip. Signed-off-by: Luomu <enrondg@gmail.com>
f465ea0 to
87f2a25
Compare
Signed-off-by: cloudonly <enrondg@gmail.com>
|
Agreed, thanks for the suggestion. In d37b05b I removed |
Part of #3976.
Resume and suspend already read the Actor before updating its state. The store's
UpdateActornow takes that revision and its replacement and issues one PostgreSQLUPDATEguarded by UID and version. If no row matches, it checks whether the Actor was deleted, recreated under the same name, or updated concurrently.The public
UpdateActorRPC checks the client's UID and version and preserves server-owned status and metadata when applying the replacement.Validation on Linux for
d37b05b3:ateapiand ran the fullatepg,controlapi, andfunctionaltestpackages with-race -shuffle=on.-race -shuffle=on. The PostgreSQL regression test observed a singleUPDATEon success and checked stale versions, deletion, and same-name recreation.AI use: AI-assisted, I reviewed and tested it.