#615 CRITICAL: Duplicate task execution in parallel branches due to thundering herd
Description
EditUltimate correctness test found that parallel branch completion events cause multiple workers to pick up and execute the same workflow simultaneously, leading to duplicate task execution.
Evidence:
- Same workflow run updated to 'running' 3 times within 2 seconds
- Tasks like B4_OP2 executed before B4_OP1 (order violation)
- Same task IDs appear multiple times in audit log (B2_OP2, B5_OP2, etc.)
Root cause: When parallel branches complete, each emits a completion event. These events trigger NOTIFY which wakes up multiple workers. Without proper locking, multiple workers pick up and execute the workflow, causing race conditions and duplicate execution.
This violates the exactly-once execution guarantee that is critical for workflow engines.
Affected: Parallel branch execution with 5+ concurrent branches
Test: demo/ultimate_correctness.py
Comments
Loading comments...
Context
Loading context...
Audit History
View AllLoading audit history...