Add InsertResult::SuccessUpdate - #1449
Jack Moffitt (metajack) wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Update detection can corrupt ID mappings after failed deletion and remains unsafe for concurrent inserts of the same external ID.
Review effort: Balanced
Findings: 1
Open (2)
What changed in this PR
Adds vector-update support to the Garnet provider and exposes updates through the FFI result contract.
Changes:
- Reuses internal IDs for updates and adds
SuccessUpdate. - Coordinates quantization backfill with vector updates.
- Adds update/backfill tests, documentation, and a major version bump.
| File | Description |
|---|---|
Cargo.lock |
Updates the crate version. |
diskann-garnet/Cargo.toml |
Bumps version to 6.0.0. |
diskann-garnet/diskann-garnet.nuspec |
Aligns NuGet package version. |
diskann-garnet/docs/ffi-design.rs |
Documents update result semantics. |
diskann-garnet/src/ffi_recall_tests.rs |
Simplifies unaligned ID decoding. |
diskann-garnet/src/ffi_tests.rs |
Tests update results and ID reuse. |
diskann-garnet/src/fsm.rs |
Adds guards for existing IDs. |
diskann-garnet/src/garnet.rs |
Tracks update state in contexts. |
diskann-garnet/src/lib.rs |
Exposes SuccessUpdate through FFI. |
diskann-garnet/src/provider.rs |
Implements updates and range synchronization. |
diskann-garnet/src/test_utils.rs |
Tracks internal-map reads in tests. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1449 +/- ##
==========================================
+ Coverage 90.58% 90.60% +0.01%
==========================================
Files 568 568
Lines 112680 113023 +343
==========================================
+ Hits 102069 102401 +332
- Misses 10611 10622 +11
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
IT would be nice to validate this PR on runbooks with replace operations. Thanks. |
c671d49 to
085edb9
Compare
|
Results from wikipedia-1M using wikipedia-1M_expiration_time_replace_only_runbook.yaml. l_build=300 and maxR=48. |
085edb9 to
93b3fa4
Compare


Garnet protocol requires different results for VADD depending on whether it was an insert or an update. This adds an
InsertResult::SuccessUpdatevariant to flag that case. Also, it turned out updates weren't actually implemented at all, so this also fixes that issue.Because quantization backfill may interact with updates, a new range mutex is introduced to allow quantization backfill and updates to lock ranges for changes so they don't stomp on each other.