Fix data integrity: ensure FINISHED status only after successful score upload#2424
Open
hanane-ca wants to merge 1 commit into
Open
Fix data integrity: ensure FINISHED status only after successful score upload#2424hanane-ca wants to merge 1 commit into
hanane-ca wants to merge 1 commit into
Conversation
487fb00 to
24b3ce0
Compare
…e upload The compute_worker must upload scores before marking submission as FINISHED. Previously, status was updated first, creating a race condition where the leaderboard could read FINISHED submissions without scores. Changes: - Reorder run_wrapper: call push_scores() and push_output() before _update_status(FINISHED) - Add retry logic in push_scores() with exponential backoff (3 attempts) - Increase timeout to 30s for score uploads
24b3ce0 to
1eec178
Compare
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.
Reviewers
@codalab/maintainers
Description
Fixes a data integrity bug where submissions were marked as
FINISHEDbefore their scores were successfully uploaded to the server, resulting inFINISHEDsubmissions with no scores.Problem: The compute worker set submission status to
FINISHEDbefore uploading scores to the Django server. If the score upload failed (network error, server timeout, etc.), the submission would be markedFINISHEDbut have no scores in the database.Root cause:
Solution:
Code changes:
compute_worker/compute_worker.py:push_scores()before_update_status(FINISHED)inrun_wrapper()push_scores()Issues this PR resolves
Fixes #2423
Background
This bug was discovered during the EEG Foundation Challenge incident analysis (8,328 submissions, 51% failure rate). Analysis showed submissions stuck in
FINISHEDstate with no scores in the database.Checklist for hand testing
FINISHEDstatusChecklist