Skip to content

perf(db): batch graph, text, and vector deletions - #976

Draft
xav-db wants to merge 16 commits into
mainfrom
drop-improvements
Draft

perf(db): batch graph, text, and vector deletions#976
xav-db wants to merge 16 commits into
mainfrom
drop-improvements

Conversation

@xav-db

@xav-db xav-db commented Aug 13, 2026

Copy link
Copy Markdown
Member

Summary

Ports and combines the open Helix Proper drop-improvement work from HelixDB/helix-proper#64, #69, #70, #71, and #72.

  • add direct NWhere -> Limit -> Drop regression coverage
  • add atomic deletion benchmarks, telemetry, and recorded evidence
  • batch graph deletion closures and deduplicate topology work
  • drain active text deletions through bounded epochs
  • batch active vector deletion cohorts while preserving visibility and residue checks

Why

Large drop requests performed substantial graph and index deletion work one entity at a time. That repeated storage reads, topology updates, and search-index maintenance inside one write transaction. The new paths compute exact cohorts, coalesce repeated work, and apply bounded batches while retaining atomicity and fail-closed validation.

Impact

Large node-drop workloads should perform fewer storage round trips and repeated index mutations. Text and vector deletion work remains bounded, restart-safe, and immediately hidden from search. Explicit-ID retry semantics and direct NWhere -> Limit -> Drop behavior remain covered.

Validation

  • cargo test --workspace
  • cargo clippy --workspace -- -D warnings
  • cargo fmt --all -- --check
  • rustfmt --edition 2024 --check on changed Rust files
  • dedicated deletion, text epoch, vector cohort, and transport-corpus regression tests

@mintlify

mintlify Bot commented Aug 13, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
helix 🟢 Ready View Preview Aug 13, 2026, 4:34 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@matthewsanetra matthewsanetra left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found three issues in the new deletion benchmark tooling that should be addressed before merging:

  1. Legacy graph benchmark records are silently discarded. load_group ignores every JSONL line that fails SampleRecord deserialization (crates/db/examples/deletion_benchmark_compare.rs:74). The graph fixtures included in this PR use the older case schema and omit fields now required by DeletionBenchmarkCase, so the documented graph comparison exits successfully without producing any result. Please either support the legacy schema or return an error for malformed samples, and reject empty comparison groups.

  2. Indexed deletion benchmarks verify only graph counts. verify_and_close checks node and edge counts, but never verifies that secondary, text, or vector index entries were removed (crates/db/tests/production_support/deletion_batch.rs:490). A regression that skips index deletion could therefore pass the benchmark and appear faster. Please add family-specific post-delete verification, including after reopen, for the selected index families.

  3. Multiple benchmark files conflate independent runs. load_group groups samples only by record.run_id (crates/db/examples/deletion_benchmark_compare.rs:80). Because each benchmark invocation restarts run IDs at zero, comma-separated files merge unrelated runs. Passing two five-run files reports five runs with fifty samples each instead of ten runs with twenty-five samples each, which changes the hierarchical bootstrap population. Please key runs by both file identity and run ID.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants