Refactor disk index build structure#1271
Open
wuw92 wants to merge 7 commits into
Open
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: ecf6179f-7467-44be-8a77-bf7a96e319af
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: ecf6179f-7467-44be-8a77-bf7a96e319af
- Moved disk index builder tests to a new module structure for better organization. - Updated import paths in `disk_provider.rs` to reflect the new location of `IndexBuildFixture` and `TestParams`. - Enhanced the test suite for disk index building, including additional test cases and improved parameter handling.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the diskann-disk disk index build path to clarify module ownership: merged-index building logic is separated from top-level orchestration, and the in-memory single-graph build pipeline is consolidated behind an internal entry point, while keeping behavior unchanged.
Changes:
- Extract merged-index build implementation (partition/shard build/merge/cleanup) into a dedicated
merged_indexmodule. - Move the in-memory build pipeline into
inmem_builderand call it from the top-level disk builder. - Centralize builder test fixtures under
build::builder::testsand update test imports accordingly.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| diskann-disk/src/search/provider/disk_provider.rs | Updates test fixture import path to the new builder test module location. |
| diskann-disk/src/build/builder/tests.rs | Introduces centralized builder test fixtures and helpers under build::builder::tests. |
| diskann-disk/src/build/builder/quantizer.rs | Updates documentation wording for build quantizer types. |
| diskann-disk/src/build/builder/mod.rs | Adjusts module layout (adds merged_index, exposes tests as pub(crate) under cfg(test)). |
| diskann-disk/src/build/builder/merged_index.rs | New module containing merged-index build implementation and RAM estimation tests. |
| diskann-disk/src/build/builder/inmem_builder.rs | Consolidates the one-shot in-memory build pipeline behind an internal entry point. |
| diskann-disk/src/build/builder/build.rs | Keeps top-level orchestration and policy; wires in merged_index + inmem_builder entry points. |
| diskann-disk/src/build/builder/core.rs | Deletes the previous combined “core” module after refactor. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: ecf6179f-7467-44be-8a77-bf7a96e319af
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: ecf6179f-7467-44be-8a77-bf7a96e319af
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: ecf6179f-7467-44be-8a77-bf7a96e319af
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: ecf6179f-7467-44be-8a77-bf7a96e319af
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.
Why
This is a follow-up to #1254. Removing checkpoint and continuation support eliminated the workflow state that previously justified much of the disk-build indirection, allowing the remaining build path to be simplified and its module ownership clarified.
Module changes
core.rstomerged_index.rs; the renamed module retains the merged-build implementation and RAM estimation.tests.rs.IndexBuildStrategyanddetermine_build_strategyfrom the renamed module tobuild.rs, where the one-shot versus merged decision is made.build.rstoinmem_builder.rs.