-
Type: Bug
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Aggregation pipeline, Explain
-
None
-
Environment:Atlas
Problem Statement/Rationale
When I execute an explain with executionStats from mongosh I get an error instead of the real result, the error makes no sense:
MongoInvalidArgumentError: Option "explain" cannot be used on an aggregate call with writeConcern
If I execte the same command from legacy mongo shell it works as expected.
Steps to Reproduce
Execute the following on Atlas from mongosh:
tlas atlas-diu7sz-shard-0 [primary] anydb> db.anycollection.explain("executionStats").aggregate([\{ "$match": {} }])
MongoInvalidArgumentError: Option "explain" cannot be used on an aggregate call with writeConcern
Reproduced with version 1.0.7
Expected Results
Get the explain plan as it happens with legacy mongo shell.
Additional Notes
Any additional information that may be useful to include.
- depends on
-
NODE-4184 AggregateOperation should not throw when explain + writeConcern is specified
- Backlog
-
NODE-4178 When executing explain on aggregate it generates an error with WriteConcern
- Closed
- is cloned by
-
NODE-4180 Investigate MONGOSH-1002: When executing explain on aggregate it generates an error with WriteConcern
- Closed
- related to
-
SERVER-19758 Add "executionStats" and "allPlansExecution" explain modes to aggregation explain
- Closed
-
SERVER-28678 The explain command should reject explained commands containing readConcern or writeConcern
- Closed