Part of #141
Goal
Let an orchestrator acquire locks on one or more entities for the duration of a critical section, so it can read then write across entities without interleaving.
Scope
- Add a lock entities method on the orchestration context that acquires an ordered lock set and returns a handle that releases the locks when closed.
- Track critical section state on the orchestration, block disallowed transitions while locks are held, and release on exit.
- Backend support for the lock protocol, ordered acquisition and release messages, and orphaned lock detection.
Reference
durabletask-dotnet TaskOrchestrationEntityFeature.LockEntitiesAsync, which returns a disposable handle, InCriticalSection, and the EntityLockRequestedEvent in the protos. The lock set is acquired in a fixed order to avoid deadlock.
Depends on
Call and signal from an orchestration, and the backend lock machinery from the foundational entity runtime.
Part of #141
Goal
Let an orchestrator acquire locks on one or more entities for the duration of a critical section, so it can read then write across entities without interleaving.
Scope
Reference
durabletask-dotnet
TaskOrchestrationEntityFeature.LockEntitiesAsync, which returns a disposable handle,InCriticalSection, and theEntityLockRequestedEventin the protos. The lock set is acquired in a fixed order to avoid deadlock.Depends on
Call and signal from an orchestration, and the backend lock machinery from the foundational entity runtime.