-
Notifications
You must be signed in to change notification settings - Fork 0
Fix atomic reindex repair metadata after PR 86 #89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1542,6 +1542,10 @@ async function processJob(job: JobRow) { | |
| index_quality_issues: initialQuality.issues, | ||
| index_quality_metrics: initialQuality.metrics, | ||
| optional_index_write_issues: optionalIndexWriteIssues, | ||
| indexing_v3_agent_status: "pending", | ||
| indexing_v3_agent_last_error: coreAgentMessage, | ||
| indexing_v3_agent_repair_reason: "core_index_committed", | ||
| indexing_v3_agent_updated_at: indexedAt, | ||
|
Comment on lines
+1545
to
+1548
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When the cron claims this document after Useful? React with 👍 / 👎. |
||
| embedding_model: env.OPENAI_EMBEDDING_MODEL, | ||
| ...metrics, | ||
| }; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When atomically reindexing a document whose existing metadata has an exhausted
indexing_v3_agent_attempt_count/indexing_v3_agent_max_attemptspair or a futureindexing_v3_agent_next_run_at, this new pending marker still inherits those stale fields fromjob.documents.metadata;claim_indexing_v3_agent_jobsfilters onattempt_count < max_attemptsandnext_run_at <= now, so if the worker stops after the core-generation commit, the fresh generation remains unclaimable despite being marked pending. Clear/reset the retry and schedule fields alongside the fresh pending status.Useful? React with 👍 / 👎.