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
{{ message }}
Repository navigation
In-memory backend does not enforce entity locks #368
The in-memory test backend grants entity locks but does not prevent other operations from running while a lock is held. In GetWorkItems, queued entity operations are drained and dispatched whenever the entity is not already in flight; locked_by is not checked. As a result, signals and calls from other orchestrations or clients can execute inside another orchestration's critical section, unlike a real backend, so tests using entity locks can pass despite violating the lock's purpose.
There also appears to be a related orphan-lock cleanup issue: CleanEntityStorage compares ent.locked_by against _instances keys, but locked_by is populated with the lock's criticalSectionId, not the parent orchestration instance ID. This can classify a live lock as orphaned and release it during cleanup.
Could lock ownership/gating be aligned with the real backend semantics, including queueing non-owner operations until unlock? The JavaScript in-memory backend provides a useful reference for lock-owner checks and deferred operations.
Activity