Repository navigation
[diskann-inmem] Move start point handling out of Store. - #1527
Merged
Mark Hildebrand (hildebrandmw) merged 2 commits intoOct 28, 2026
Merged
Conversation
Mark Hildebrand (hildebrandmw)
requested review from
a team
and
a balanced review from Copilot
October 28, 2026 17:03
Store.
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Frozen IDs in the freelist can exhaust all 20 acquisition attempts, causing Store::acquire to return None even when a writable slot is available.
1 open issue
What changed in this PR
This PR moves start-point ownership from Store into the full and quantized representations, preparing the in-memory index for more flexible start-point placement.
Changes:
- Makes stores and freelists manage a total ID limit without tracking a separate frozen-point range.
- Moves capacity, start-point IDs, and total-point validation into representations.
- Adds a copyable, validated
Rangetype and updates accessors, integration wrappers, and tests.
| File | Description |
|---|---|
diskann-inmem/src/store/simple.rs |
Updates tests to initialize frozen slots explicitly. |
diskann-inmem/src/store/mod.rs |
Removes frozen-range ownership and uses total ID limits. |
diskann-inmem/src/store/intrusive.rs |
Adapts frozen-slot and acquisition tests. |
diskann-inmem/src/repr/quantized/mod.rs |
Owns capacity and start-point IDs in the quantized representation. |
diskann-inmem/src/repr/internal/simple.rs |
Updates test store construction. |
diskann-inmem/src/repr/internal/quantization/rerank.rs |
Updates reranking test store construction. |
diskann-inmem/src/repr/internal/macros.rs |
Reads capacity from representations. |
diskann-inmem/src/repr/full.rs |
Owns capacity and start-point IDs in the full representation. |
diskann-inmem/src/provider.rs |
Uses the new range type for search start points. |
diskann-inmem/src/num.rs |
Adds validated ranges and boundary tests. |
diskann-inmem/src/integration/store/simple.rs |
Converts configured capacity into an ID limit. |
diskann-inmem/src/integration/store/mod.rs |
Reports slot counts from the total ID limit. |
diskann-inmem/src/integration/store/intrusive.rs |
Adapts construction and panic documentation. |
diskann-inmem/src/integration/store/checked.rs |
Adapts checked-store construction. |
diskann-inmem/src/freelist.rs |
Uses IdLimit for minting, scanning, and recycling bounds. |
Review effort: Balanced
Suhas Jayaram Subramanya (suhasjs)
approved these changes
Oct 28, 2026
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1527 +/- ##
==========================================
+ Coverage 91.04% 92.10% +1.05%
==========================================
Files 592 592
Lines 123565 123658 +93
==========================================
+ Hits 112498 113890 +1392
+ Misses 11067 9768 -1299
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Jack Moffitt (metajack)
approved these changes
Oct 28, 2026
Mark Hildebrand (hildebrandmw)
deleted the
mhildebr/start-points-out-of-store
branch
October 28, 2026 20:43
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Move frozen point knowledge out of
Storeand intoRepresentations.This is part of a workstream to make usage of start points more flexible. Currently, the
Storehas knowledge of frozen points and mandates that they go at the end. However, outside of some minor optimizations with respect to initial ID minting and ID scanning, theStoredoesn't really need to know about frozen points.The PR is broken into two commits:
Commit 1
Mechanically moves the start points handling into
repr::Fullandrepr::Quantizedand does minimal test rewrites onStoreto compensate for the lack for direct frozen point knowledge.Commit 2
A clean up pass. Instead of using
std::ops::Range<u32>to represent start point ranges, this adds a bespokeRangethat is closer to https://doc.rust-lang.org/std/range/struct.Range.html with the additional requirement thatend >= start.Small Perf Changes
When the
Store/Freelistknew about the frozen points, we could optimize ID minting and ID scanning to not consider the frozen point range. With this PR, theStoredoesn't know the start points are special. I think this is only a minor concern: there are usually only a handful of start points (usually one) for millions of vectors. So we add a few extra slot acquisition attempts but buy much more flexibility.