Skip to content

fix(vector): make unscoped admin calls reach every bucket - #86

Merged
hseshadr merged 2 commits into
mainfrom
fix/unscoped-admin-all-buckets
Oct 24, 2026
Merged

hseshadr merged 2 commits into
mainfrom
fix/unscoped-admin-all-buckets

Conversation

@hseshadr

Copy link
Copy Markdown
Collaborator

What

BucketedPartitionStrategy.get_search_partitions(None) returned bucket_0 only, so an unscoped search, delete, or get_stats silently operated on 1/num_buckets of the rows. An unscoped delete of every id left 255/256 rows alive and returned success, contradicting the documented admin path in the README.

None now fans out to every bucket; a scoped key still routes to exactly one. Insertion of an unkeyed row still lands in bucket_0 and is reachable from the unscoped path.

Tests

  • pytest -q: 382 passed, 99.1% coverage.
  • New regression tests/test_partition_key_round_trip.py::test_should_reach_every_bucket_on_an_unscoped_admin_delete inserts into two distinct buckets, deletes unscoped, and proves both rows are gone.
  • Updated test_get_search_partitions_none_key and the scoped get_stats assertion in test_index_manager.py.

Risk

Behavior change only for unscoped calls; scoped paths unchanged. Unscoped admin work is now O(num_buckets) instead of O(1), which is the cost of correctness.

BucketedPartitionStrategy.get_search_partitions(None) returned bucket_0 only,
so an unscoped search, delete, or get_stats silently operated on 1/num_buckets
of the rows. An unscoped delete of every id left 255/256 rows alive and
returned success, contradicting the documented admin path.

None now fans out to every bucket; a scoped key still routes to exactly one.
Insertion of an unkeyed row still lands in bucket 0 and is reachable from the
unscoped path. Added a manager-level regression that inserts into two distinct
buckets, deletes unscoped, and proves both are gone.

Tests: pytest -q (382 passed, 99.1% coverage).
The unscoped-bucket regression adds two branches, so the three figures in
ARCHITECTURE.md moved to 99.10% total / 99.00% statement / 99.45% branch.
check_coverage_claim.py now agrees.
@hseshadr
hseshadr merged commit 6280c69 into main Oct 24, 2026
2 checks passed
@hseshadr
hseshadr deleted the fix/unscoped-admin-all-buckets branch October 24, 2026 21:13
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.

1 participant