Skip to content

fix: reduce DiskANN index storage overhead - #279

Merged
lindixu6-hash merged 1 commit into
tickernelz:mainfrom
amandeavor:fix/vector-index-storage
Aug 30, 2026
Merged

fix: reduce DiskANN index storage overhead#279
lindixu6-hash merged 1 commit into
tickernelz:mainfrom
amandeavor:fix/vector-index-storage

Conversation

@amandeavor

Copy link
Copy Markdown
Collaborator

Summary

  • store DiskANN neighbor vectors as float8 for both content and tag indexes
  • cap max_neighbors at 20 so high-dimensional embeddings do not inherit the much larger libSQL default
  • assert the persisted SQL definitions and exercise direct vector_top_k lookups through both tuned indexes

Scope

This deliberately changes newly created indexes only. Existing shards retain their current index definitions until a separate failure-safe rebuild/VACUUM migration is designed, so this patch does not risk leaving an existing shard without an index.

Addresses the new-shard portion of #277.

Validation

  • bun test tests/turso-vector-search.test.ts -t "inserts and searches memories" — 1 pass
  • bun run typecheck — pass
  • bun run build — pass
  • full local Windows suite — 446 pass; 2 unrelated platform/timing failures: an EBUSY file rename in the legacy migrator test and the existing 30-second 200-vector ANN test timing out at 35.5 seconds. The latter was slower and eventually crashed Bun when repeated with the unmodified upstream index definition.

Copilot AI lite review requested due to automatic review settings August 28, 2026 12:12

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@lindixu6-hash lindixu6-hash left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed the new-shard index definition and direct-query coverage. The change is intentionally scoped to newly created content/tag indexes; existing-shard rebuild and VACUUM remain a separate migration concern. Local verification at 88221cd: targeted vector tests 3/3, full suite 447/447 with 1 skip, typecheck, and production build all pass. The approved GitHub package-smoke matrix is also green on Ubuntu, Windows, macOS Intel, and Apple Silicon.

@lindixu6-hash
lindixu6-hash merged commit 19d1010 into tickernelz:main Aug 30, 2026
7 checks passed
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.

3 participants