-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Fix Partition All Docs Query With Keys #4152
base: main
Are you sure you want to change the base?
Fix Partition All Docs Query With Keys #4152
Conversation
Thanks for this, this looks decent overall, especially for a first contribution :) I left a few minor notes on the code. I just have one question about the approach taken here. The way I read it: passing keys to match into the query will return result rows we do not want. So this PR starts preventing those result rows from being returned. Would another option to solve this be making it so that we don’t read those rows in the first place? That would make this a performance improvement too. We might even be able to do this at the request validation stage: if Just spitballing here tho. Nice work! |
Thanks Jan, I had considered something similar in the beginning and am able to refactor if this is truly the desired result. However, this being a sort of bulk endpoint, I do believe it is consistent with the current behavior of the |
cbf2b11
to
0f9df2e
Compare
0f9df2e
to
1cc0079
Compare
1cc0079
to
195b56e
Compare
195b56e
to
eea086d
Compare
Overview
This PR addresses a bug that is described in issue #2496 where posting an all docs query to a partition endpoint with keys that are not a part of the partition also gets returned.
Testing recommendations
Consider the following documents, each in their own partition on a database named
test
.When we run the following query against the
part2
partition:We get both documents from both partitions, but what we expect should look like this
The code in this PR fixes this issue and returns the results we expect.
Related Issues or Pull Requests
Issue #2496
Checklist
rel/overlay/etc/default.ini