-
Type: Improvement
-
Resolution: Won't Fix
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Optimization
Currently, the explain command ignores any readConcern or writeConcern fields contained in the explained commands:
MongoDB Enterprise > db.runCommand({ "explain" : { "find" : "test", "readConcern" : { "level" : "local" } } }) { "queryPlanner" : { MongoDB Enterprise > db.runCommand({ "explain" : { "delete" : "test", deletes : [{q : {x : 1}, limit : 1}], "writeConcern" : { w : 1 } } }) { "queryPlanner" : { ...
Consider rejecting these commands, as read/write concern are not relevant to evaluating the query plan.
This would be a minor backwards breaking change for drivers, some of which currently would send an explain command with read/write concern fields present in the explained command.
- is related to
-
NODE-4184 AggregateOperation should not throw when explain + writeConcern is specified
- Backlog
-
MONGOSH-1002 When executing explain on aggregate it generates an error with WriteConcern
- Waiting (Blocked)
-
SERVER-51795 Explain command on sharded clusters does not support readConcern
- Closed
-
PHPLIB-802 Send readConcern but not writeConcern to explain commands
- Closed