镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

[diskann-garnet] Split finish_import into finish_import and verify_im… - #1515

Merged
Jack Moffitt (metajack) merged 1 commit into
mainfrom
push-oyvypkvrrmqy
Oct 30, 2026
Merged

Jack Moffitt (metajack) merged 1 commit into
mainfrom
push-oyvypkvrrmqy

Conversation

@metajack

Copy link
Copy Markdown
Contributor

This decouples index verification from finalization. This is beneficial to skip when the importer is trusted to be correct, and because the replicas do not need to do this extra work anyway. This has an added benefit of making sequencing of these commands during replication much easier to deal with.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Concurrent finish_import calls can overwrite the cache with stale start-point neighbors after an insertion, leaving searches with outdated graph links while still reporting success.

1 open issue
What changed in this PR

This PR separates import verification from finalization in the Garnet integration, allowing trusted importers and replicas to skip verification and simplifying replication sequencing.

Changes:

  • Introduces optional partitioned verify_import and a standalone Boolean-returning finish_import.
  • Updates import tests and documentation, and rejects mismatched callback read lengths.
  • Bumps the Garnet package to version 9.0.0 for the changed FFI.
File Description
diskann-garnet/​src/​provider.rs Separates verification from finalization and updates provider tests.
diskann-garnet/​src/​lib.rs Exposes the separate verification and finalization FFI functions.
diskann-garnet/​src/​garnet.rs Checks read lengths before copying callback data.
diskann-garnet/​src/​ffi_tests.rs Tests separate verification and finalization paths.
diskann-garnet/​src/​dyn_index.rs Updates dynamic index methods for the split API.
diskann-garnet/​README.md Explains the revised import workflow.
diskann-garnet/​docs/​ffi-design.rs Documents the new FFI signatures and contracts.
diskann-garnet/​docs/​data-design.md Clarifies import status transitions and start-point handling.
diskann-garnet/​diskann-garnet.nuspec Bumps the NuGet package to 9.0.0.
diskann-garnet/​Cargo.toml Bumps the Rust crate to 9.0.0.
Cargo.lock Records the updated crate version.

Review effort: Balanced

Comment thread diskann-garnet/src/provider.rs Resolved
@codecov-commenter

Codecov Comments Bot (codecov-commenter) commented Oct 26, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.50000% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.19%. Comparing base (8376a57) to head (064e1b8).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
diskann-garnet/src/provider.rs 97.17% 5 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1515      +/-   ##
==========================================
+ Coverage   92.16%   92.19%   +0.03%     
==========================================
  Files         592      592              
  Lines      123582   123638      +56     
==========================================
+ Hits       113899   113988      +89     
+ Misses       9683     9650      -33     
Flag Coverage Δ
miri 92.19% <97.50%> (+0.03%) ⬆️
unittests 92.14% <97.50%> (+0.03%) ⬆️

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 79.22% <100.00%> (-0.20%) ⬇️
diskann-garnet/src/garnet.rs 97.11% <100.00%> (+0.01%) ⬆️
diskann-garnet/src/lib.rs 94.79% <100.00%> (+0.71%) ⬆️
diskann-garnet/src/provider.rs 91.05% <97.17%> (+0.84%) ⬆️

... and 3 files with indirect coverage changes

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

@metajack
Jack Moffitt (metajack) merged commit 7545fda into main Oct 30, 2026
29 checks passed
@metajack
Jack Moffitt (metajack) deleted the push-oyvypkvrrmqy branch October 30, 2026 16:00
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