Repository navigation
fix(vector): make unscoped admin calls reach every bucket - #86
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
BucketedPartitionStrategy.get_search_partitions(None)returnedbucket_0only, so an unscopedsearch,delete, orget_statssilently operated on 1/num_bucketsof the rows. An unscoped delete of every id left 255/256 rows alive and returned success, contradicting the documented admin path in the README.Nonenow fans out to every bucket; a scoped key still routes to exactly one. Insertion of an unkeyed row still lands inbucket_0and is reachable from the unscoped path.Tests
pytest -q: 382 passed, 99.1% coverage.tests/test_partition_key_round_trip.py::test_should_reach_every_bucket_on_an_unscoped_admin_deleteinserts into two distinct buckets, deletes unscoped, and proves both rows are gone.test_get_search_partitions_none_keyand the scopedget_statsassertion intest_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.