Repository navigation
Add InsertResult::SuccessUpdate - #1449
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 91.93% 90.94% -0.99%
==========================================
Files 583 583
Lines 115903 116854 +951
==========================================
- Hits 106550 106271 -279
- Misses 9353 10583 +1230
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
7ce6252 to
6d631e0
Compare
6d631e0 to
2739735
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.