Skip to content

Alleviate SERVER-13732 on all top level filters #3564

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

Conversation

NotBobTheBuilder
Copy link
Contributor

In a prior commit, improvements were made to the addition of _rperm
in the case of $or queries, to avoid MongoDB bug SERVER-13732.

As the vast majority of $or queries previously hit this bug due to the
presence of _rperm on most Parse queries, the present solution
avoids the bug and improves query performance in most cases.

However, it's still possible for clients to supply their own queries
which hit that bug, such as those with _created_at or _updated_at
filters, or their own properties from their data model.

This commit makes the logic currently present for _rperm available
to all top level filters that exist alongside an $or query, meaning
SERVER-13732 should be avoided in all cases where keys at the top and
inner levels do not have name clashes.

Additionally, simple tests are added for the DatabaseController source.

In a prior commit, improvements were made to the addition of `_rperm`
in the case of `$or` queries, to avoid MongoDB bug SERVER-13732.

As the vast majority of $or queries previously hit this bug due to the
presence of `_rperm` on most Parse queries), the present solution
avoids the bug and improves query performance in most cases.

However, it's still possible for clients to supply their own queries
which hit that bug, such as those with `_created_at` or `_updated_at`
filters, or their own properties from their data model.

This commit makes the logic currently present for `_rperm` available
to all top level filters that exist alongside an $or query, meaning
SERVER-13732 should be avoided in all cases where keys at the top and
inner levels do not have name clashes.

- parse-community#3476
- https://jira.mongodb.org/browse/SERVER-13732
@flovilmart flovilmart merged commit 7319562 into parse-community:master Feb 26, 2017
@flovilmart
Copy link
Contributor

Thanks for the PR! Hopefully we'll have a better performance on those $or queries with it.

@NotBobTheBuilder NotBobTheBuilder deleted the generic-server-13732 branch March 6, 2017 23:02
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