fix: call _mark_completed on successful task execution - #2614
Closed
handnewb wants to merge 1 commit into
Closed
Conversation
In _execute_task_inner(), the _mark_completed() method (line 506) is defined but never called in the success path. Only _mark_failed() is called (in the except Exception block). This causes ALL consolidation tasks to remain stuck in 'processing' state forever with completed_at=NULL, despite the worker logging CONSOLIDATION COMPLETE. The fix adds a single line after terminal_success = True to call _mark_completed(), which updates the async_operations row to status='completed' with completed_at=NOW(). Verified in production on v0.8.4: tasks now flow pending → processing → completed automatically. pending_consolidation dropped from 3368 → 0 within hours of applying this fix. Zero zombie worker stalls since. Closes vectorize-io#2601
Contributor
Author
Contributor
Author
Member
|
Superseded by #2608 (merged), which fixes the same missing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
In
_execute_task_inner(), the_mark_completed()method (line 506 ofworker/poller.py) is defined but never called in the success path. Only_mark_failed()is called (in theexcept Exceptionblock). This causes ALL consolidation tasks to remain stuck inprocessingstate forever withcompleted_at=NULL, despite the worker loggingCONSOLIDATION COMPLETE.The Fix
One line added after
terminal_success = True:Impact
processingforevercompleted_atwas weeks/months ago despite consolidation runningmy_active: none+claimable=1but refuses to claimVerification
Applied to production instance running v0.8.4:
Related
Closes #2601
Checklist