← Back to Pull requests

[MOD-18471] Support fine-grained SVS index #1027

Closed
unknown closed this pull request without merging on Sep 24, 2026 20:41 UTC
View on GitHub
unknown unknown commented on Aug 27, 2026 05:06 UTC
Author

Adds support for using newly-added separate fine-grained SVS index with minor corresponding test revisions

Includes SVS 0.5.0 rc1 binaries, which will eventually be swapped out for the official release binaries after validation.

Redisearch CI failures at test_vecsim_svs.py:711 and test_vecsim_svs.py:729 come from changes in internal logic not being reflected in tests yet.
1. Each deletion now submit a single label consolidation job, that can change size of the reverse edges lists. This breaks the test_vecsim_svs.py:711.
2. Some of the submitted consolidation jobs can be unfinished before GC launch. This breaks the test_vecsim_svs.py:729.

<!-- CURSOR_SUMMARY -->
---

[!NOTE]

High Risk

Large concurrent-mutation and tiered-async rewrite across SVS/HNSW locking, ingestion, delete/relabel/GC paths, plus a new prebuilt binary dependency.

> Overview

Upgrades SVS to 0.5.0rc2 prebuilts and switches CMake download URLs to the nightly concurrent builds; GCC shared-lib support now requires GLIBC ≥ 2.28 (older 2.26 tarball path removed), and replace_external_id detection targets svs/concurrent/dynamic_index.h.

> SVS backend moves from svs::index::vamana to svs::concurrent mutable Vamana indexes, with segmented blocked storage/graph allocators, sequence-locked graphs, and reverse-edge accounting in size estimates. The implementation is held in a shared_ptr guarded by mutexes, supports lazy init via ready() / addVectorsIfInitialized, per-label consolidate, and maps relabel/GC to the concurrent APIs (compact() instead of separate consolidate in GC).

> Tiered SVS ingestion is redesigned: batch “update with swap journal” is replaced by per-vector insert jobs, a training batch (ids_to_init_) that runs initSVSIndex, async consolidate jobs after deletes, and richer relabel coordination (delayed inserts, takeover of pending consolidations). Tiered batch iteration no longer holds the main index lock for SVS queries.

> Shared tiered infrastructure: TieredInsertJob, invalid-job handling, removeIngestedVectorFromFlat, and default indexSize / getDistanceFrom live in VecSimTieredIndex; ScopedLocks lets HNSW lock flat + HNSW data guard for size while tiered SVS skips backend query locks. HNSW tiered code delegates insert-job bookkeeping to the base class.

> Tests/bindings: memory estimates include reverse edges; flow tests call run_gc() before memory checks; Python runGC() calls the index directly so non-tiered SVS compacts too.

> <sup>Reviewed by Cursor Bugbot for commit ca35f7c72b46f382fbb86fa66c46733f59f07a4c. Bugbot is set up for automated code reviews on this repo. Configure here.</sup>

<!-- /CURSOR_SUMMARY -->

Diff: 358 lines (+268 / -90) across 4 files Reviewer: razdoburdin Review duration: 41254m
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.48) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.48 · 358 lines diff across 4 files
0.48
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
56%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.352
Shallow Review Depth shallow_review_depth
0.289
Ai Authored ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #1027"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 56.8% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 47.6% (MEDIUM) · Higher = larger blast radius
47.6%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 56.8% · Lower = rushed or shallow review
56.8%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 20.6% · Safe to merge
20.6%