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
UN-2901 [FIX] Prevent race conditions in distributed file processing causing status corruption and premature cleanup (#1609)
This commit implements multiple defensive fixes to prevent race conditions when duplicate
workers process the same file execution, which was causing:
1. COMPLETED/ERROR status being overwritten with PENDING→EXECUTING by late workers
2. Premature chord callback cleanup (FileExpired errors) while workers still processing
3. Missing FINALIZATION stage detection during grace period
4. Incorrect COMPLETED:SUCCESS status for failed executions
Fixes implemented:
- Pre-creation: Check FileExecutionStatusTracker (Redis) + DB before PENDING update
- Grace period: Extended duplicate detection to include FINALIZATION stage
- Destination: Wait for DESTINATION_PROCESSING lock release (prevents chord cleanup)
- Terminal states: Handle both COMPLETED and ERROR in processor.py
- Status tracking: Set COMPLETED:FAILED for failed executions (was SUCCESS)
- Refactoring: Consolidated completed_ttl to method initialization
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <noreply@anthropic.com>
0 commit comments