Skip to content

Remove direct accessor call in diskann-garnet#1098

Merged
hildebrandmw merged 1 commit into
mainfrom
mhildebr/remove-accessor-call-in-garnet
May 21, 2026
Merged

Remove direct accessor call in diskann-garnet#1098
hildebrandmw merged 1 commit into
mainfrom
mhildebr/remove-accessor-call-in-garnet

Conversation

@hildebrandmw
Copy link
Copy Markdown
Contributor

In preparation for #1067, switch the implementation of DynIndex::search_element from using the Accessor trait to an inherent method on the underlying provider.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates diskann-garnet to avoid using the Accessor trait (and a per-call Tokio runtime) when implementing DynIndex::search_element, in preparation for the trait simplification work described in #1067. Instead, it centralizes the “read one vector by internal id” logic as an inherent method on GarnetProvider.

Changes:

  • Added GarnetProvider::get_vector(...) as a crate-visible helper for reading a single vector (including the start-point fast path).
  • Switched DynIndex::search_element to use provider.get_vector(...) directly, removing the Tokio runtime + Accessor usage.
  • Refactored FullAccessor::get_element to delegate to GarnetProvider::get_vector(...) to avoid duplicated logic.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
diskann-garnet/src/provider.rs Introduces get_vector and reuses it in the Accessor implementation.
diskann-garnet/src/dyn_index.rs Removes the Accessor/Tokio runtime path and calls GarnetProvider::get_vector directly.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 86.36364% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.49%. Comparing base (c667a3c) to head (b4b197a).

Files with missing lines Patch % Lines
diskann-garnet/src/provider.rs 90.47% 2 Missing ⚠️
diskann-garnet/src/dyn_index.rs 0.00% 1 Missing ⚠️

❌ Your patch status has failed because the patch coverage (86.36%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1098      +/-   ##
==========================================
+ Coverage   89.48%   89.49%   +0.01%     
==========================================
  Files         474      474              
  Lines       89740    89737       -3     
==========================================
+ Hits        80301    80312      +11     
+ Misses       9439     9425      -14     
Flag Coverage Δ
miri 89.49% <86.36%> (+0.01%) ⬆️
unittests 89.14% <86.36%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
diskann-garnet/src/dyn_index.rs 74.19% <0.00%> (+9.40%) ⬆️
diskann-garnet/src/provider.rs 83.55% <90.47%> (+0.18%) ⬆️

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@hildebrandmw hildebrandmw merged commit dc3d9b5 into main May 21, 2026
23 checks passed
@hildebrandmw hildebrandmw deleted the mhildebr/remove-accessor-call-in-garnet branch May 21, 2026 22:47
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.

5 participants