-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
update_single should be optimized for a single call now #2671
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
PR Summary
This pull request optimizes Vespa update performance, particularly for single document updates, and includes several minor improvements and fixes. Key changes include:
- Refactored
update_single
method inVespaIndex
class for more efficient single document updates - Introduced
VespaDocumentFields
dataclass for better structuring of document update data - Modified
Updatable
interface ininterfaces.py
to accommodate the new update approach - Improved error handling and logging in the indexing and update processes
- Enhanced logic for determining when to create new indexing jobs in
update.py
- Optimized connector instantiation failure handling in
run_indexing.py
These changes should result in improved performance and reliability for Vespa updates and the overall indexing process.
6 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings
@@ -55,6 +55,21 @@ class DocumentMetadata: | |||
from_ingestion_api: bool = False | |||
|
|||
|
|||
@dataclass | |||
class VespaDocumentFields: |
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.
shoudl we also update UpdateRequest
to take in one of these? That way there's only one source of truth for what can be updated
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.
This definitely makes sense! Let me add it as a TODO to one of my linear issues because when the pruning PR is in, I believe this can probably be refactored away completely.
Description
Improves vespa update performance.
backports some small fixes for issues that were fixed in a larger pending PR
How Has This Been Tested?
[Describe the tests you ran to verify your changes]
Accepted Risk
[Any know risks or failure modes to point out to reviewers]
Related Issue(s)
[If applicable, link to the issue(s) this PR addresses]
Checklist: