Skip to content
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(aggregations, explain-plan): remove out stages before running explain plan COMPASS-7012 #4830

Merged
merged 1 commit into from
Sep 12, 2023

Conversation

gribnoysup
Copy link
Collaborator

@gribnoysup gribnoysup commented Sep 11, 2023

We learned that non-genuine MongoDB servers, in particular CosmosDB, will execute pipelines when running explain plan even in queryPlanner mode. This is especially harmful when pipeline contains one of the out stages: $merge or $out. While we usually don't try to address compatibility issues like that with non-genuine servers, this one in particular can cause pretty bad data corruption issues, so we are fixing this by always removing out stages before running explain for aggregations for all servers. As a nice side-effect, this actually makes our visual explain plan more detailed for these kinds of pipelines.

@gribnoysup gribnoysup merged commit a390314 into main Sep 12, 2023
@gribnoysup gribnoysup deleted the compass-7012-filter-out-stages-for-explain branch September 12, 2023 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants