mirror of
https://github.com/vercel/workflow.git
synced 2026-09-14 19:59:43 +08:00
92dc82608a
Concurrent invocations producing identical correlationIds (as the snapshot runtime does by design across replays) previously both succeeded and persisted duplicate events. step_created had no guard at all; wait_created used a TOCTOU read-then-check that allowed both writers through under concurrency. Both now claim a per-(runId, correlationId) constraint file with O_CREAT|O_EXCL before writing, so the loser surfaces as EntityConflictError — which the runtime's dedup catch path already handles.
225 B
225 B
@workflow/world-local
| @workflow/world-local |
|---|
| patch |
Fix race in events.create() where concurrent step_created / wait_created writes with the same correlationId would both succeed instead of one losing with EntityConflictError.