feat: add public vector segment builder API#6224
feat: add public vector segment builder API#6224Xuanwo wants to merge 1 commit intoxuanwo/vector-staging-merge-internalfrom
Conversation
PR ReviewThis PR promotes the internal staging-merge types to public API and adds Issues to addressP0 — pub async fn build_all(&self) -> Result<Vec<IndexSegment>> {
let plans = self.plan().await?;
try_join_all(plans.iter().map(|plan| self.build(plan))).await
}
P1 — The crate::index::vector::ivf::plan_staging_segments(
&self.dataset.indices_dir().child(self.staging_index_uuid.as_str()),
&self.partial_shards,
None, // <-- always None
self.target_segment_bytes,
)There's no builder method to set a requested index type, yet P1 — Test doesn't verify recall quality Per the project's testing standards: "Vector index tests must assert recall metrics (>=0.5 threshold), not just verify creation succeeds." The new test asserts Minor nits
🤖 Generated with Claude Code |
This adds the public distributed vector finalize API on top of #6220's internal staging-merge flow. It exposes a canonical two-step workflow: materialize final segments from a staging root, then publish them with
commit_existing_index_segments(...).This keeps
merge_index_metadata(...)as the single-root compatibility path while making the multi-segment path explicit in the Rust API. The branch includes an end-to-end vector test that stages partial shards, builds final segments through the new builder, and commits them as one logical index.Context: #6220