Skip to content
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

Merged
merged 1 commit into from
Oct 4, 2024

Conversation

rkuo-danswer
Copy link
Contributor

@rkuo-danswer rkuo-danswer commented Oct 3, 2024

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:

  • All of the automated tests pass
  • All PR comments are addressed and marked resolved
  • If there are migrations, they have been rebased to latest main
  • If there are new dependencies, they are added to the requirements
  • If there are new environment variables, they are added to all of the deployment methods
  • If there are new APIs that don't require auth, they are added to PUBLIC_ENDPOINT_SPECS
  • Docker images build and basic functionalities work
  • Author has done a final read through of the PR right before merge

Copy link

vercel bot commented Oct 3, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
internal-search ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 3, 2024 4:25pm

@rkuo-danswer rkuo-danswer marked this pull request as ready for review October 3, 2024 16:53
Copy link

@greptile-apps greptile-apps bot left a 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 in VespaIndex class for more efficient single document updates
  • Introduced VespaDocumentFields dataclass for better structuring of document update data
  • Modified Updatable interface in interfaces.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:
Copy link
Contributor

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

Copy link
Contributor Author

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.

@Weves Weves added this pull request to the merge queue Oct 4, 2024
Merged via the queue into main with commit 63655cf Oct 4, 2024
7 checks passed
@rkuo-danswer rkuo-danswer deleted the bugfix/vespa-update-performance branch October 16, 2024 05:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants