Eval dup embeddings#181
Merged
kenforthewin merged 2 commits intomainfrom May 1, 2026
Merged
Conversation
Two bugs caused atoms to be embedded twice on every scheduler tick: 1. pipeline_task.rs called both process_pending_embeddings_due and process_pending_tagging_due in the same tick. Both functions call enqueue_pipeline_jobs_from_statuses_sync followed by process_queued_pipeline_jobs. The second call's ON CONFLICT reset jobs already claimed by the first call back to state='pending', causing them to be claimed and processed a second time. process_pending_embeddings_due already covers atoms with (embedding_status='complete' AND tagging_status='pending'), so process_pending_tagging_due was purely redundant. 2. enqueue_pipeline_jobs_from_statuses_sync used ON CONFLICT ... DO UPDATE SET state='pending', lease_until=NULL unconditionally. Any concurrent or racing enqueue call could interrupt an actively-leased processing job, regardless of cause. Fixes: - Remove the redundant process_pending_tagging_due call from the scheduler tick - Preserve state='processing' and lease_until in the ON CONFLICT clause when the existing job has an active (non-expired) lease
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.
No description provided.