-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Fix broken is_empty filter on new points #6882
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
This comment was marked as resolved.
This comment was marked as resolved.
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
generall
approved these changes
Jul 16, 2025
JojiiOfficial
approved these changes
Jul 16, 2025
generall
pushed a commit
that referenced
this pull request
Jul 17, 2025
* Add test to catch bug Bug: <#6880> * Fix loading null index from wrong path * Simplify test * Also bump total point count when removing a point * Add debug assertion, ensure we don't create null index in selector * Update bug link * Remove unused import Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
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.
Fixes #6880
When upserting new points, the
is_empty
filter did not work properly. It did not always include the newly upserted points during filtering.More specifically, this problem appears when upserting points in which the payload field (of the index) is absent. The null index relies on knowing the exact (segment) point count to reliably filter points. When upserting a point in which the payload field is absent, we don't add the point to the index and therefore don't bump the point count.
When the payload field is absent, instead of adding (set, overwrite) the point to the index, we actually remove (set, overwrite) it from the index. To fix the filtering problem, I now also bump the point count when removing a point. This will ensure that new upsertions without the field still set the correct point count.
This PR fixes two problems:
I also add a test to assert correct behavior.
Existing deployments do not have permanent damage because of this bug. All (existing) null indices are fixed on restart.
All Submissions:
dev
branch. Did you create your branch fromdev
?New Feature Submissions:
cargo +nightly fmt --all
command prior to submission?cargo clippy --all --all-features
command?