Details
-
Improvement
-
Resolution: Unresolved
-
Major - P3
-
None
-
None
-
None
-
None
-
Query Optimization
Description
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.
Attachments
Issue Links
- 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)
-
-
PHPLIB-802 Send readConcern but not writeConcern to explain commands
-
- Closed
-