fix(queuefs): harden embedding tracker across worker loops#1024
Merged
MaojiaSheng merged 2 commits intomainfrom Mar 27, 2026
Merged
fix(queuefs): harden embedding tracker across worker loops#1024MaojiaSheng merged 2 commits intomainfrom
MaojiaSheng merged 2 commits intomainfrom
Conversation
Replace the global asyncio lock in EmbeddingTaskTracker with thread-safe coordination so semantic and embedding workers can share completion state without cross-event-loop failures. Add regression coverage for cross-loop completion dispatch and align semantic DAG test doubles with the current vectorize API.
|
Failed to generate code suggestions for PR |
Treat stopped semantic owner loops as unavailable before dispatching completion callbacks from embedding workers. Add regression coverage for the stop-before-close shutdown window so the final decrement path falls back to the current loop instead of hanging.
MaojiaSheng
approved these changes
Mar 27, 2026
zeattacker
pushed a commit
to zeattacker/OpenViking
that referenced
this pull request
Mar 27, 2026
…e#1024) * fix(queuefs): harden embedding tracker across worker loops Replace the global asyncio lock in EmbeddingTaskTracker with thread-safe coordination so semantic and embedding workers can share completion state without cross-event-loop failures. Add regression coverage for cross-loop completion dispatch and align semantic DAG test doubles with the current vectorize API. * fix(queuefs): avoid handing callbacks to stopped owner loops Treat stopped semantic owner loops as unavailable before dispatching completion callbacks from embedding workers. Add regression coverage for the stop-before-close shutdown window so the final decrement path falls back to the current loop instead of hanging.
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.
Description
Fix cross-event-loop completion tracking in
EmbeddingTaskTrackerso semantic and embedding queue workers can safely coordinate embedding completion without transient re-enqueue failures.Related Issue
Type of Change
Changes Made
asyncio.LockinEmbeddingTaskTrackerwith thread-safe coordination for cross-worker accessTesting
Checklist
Screenshots (if applicable)
Additional Notes
Validated with:
python -m pytest --override-ini addopts='' tests/storage/test_embedding_tracker.pypython -m pytest --override-ini addopts='' tests/storage/test_semantic_dag_stats.py tests/storage/test_semantic_dag_skip_files.py tests/storage/test_collection_schemas.py