Workflow Database Concurrency
Summary
No row-version property, concurrency token, optimistic concurrency configuration or explicit locking exists.
Implemented protection
Task commands require Pending status in a Running instance, which prevents sequential duplicate decisions. Unique constraints protect tenant/key, definition/version and event identifiers.
Race conditions
Concurrent requests can load the same Pending task before either save completes. Without a concurrency token or lock, application guards alone do not establish a verified single-winner database guarantee.
Other boundaries
Outbox event uniqueness can reject duplicate event identifiers. No command-level idempotency key or start-instance uniqueness exists.
Classification
Sequential duplicate protection is implemented. Database concurrency control is Not implemented.
Requires Confirmation
Expected contention, retry/error behavior and the chosen optimistic or pessimistic strategy require confirmation.
Source References
microservices/src/workflow-service/Domain/Workflow/WorkflowInstance.csmicroservices/src/workflow-service/Application/Commands/WorkflowInstanceCommands.csmicroservices/src/workflow-service/Infrastructure/WorkflowDbContext.cs
Related Articles
See Also
Keywords
Workflow database, EF Core, Workflow schema.
Revision Information
- Status: Draft
- Last reviewed: 2026-07-20
- Next review: 2026-10-20