Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-28678

The explain command should reject explained commands containing readConcern or writeConcern

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 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.

            Assignee:
            backlog-query-optimization [DO NOT USE] Backlog - Query Optimization
            Reporter:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Votes:
            0 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: