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

Improve error message when $db is included in OP_QUERY commands

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 3.5.13
    • Affects Version/s: None
    • Component/s: Logging
    • Labels:
      None
    • Minor Change
    • Repl 2017-09-11

      > db.runCommand({isMaster: 1, $db: "admin"})
      {
      	"ok" : 0,
      	"errmsg" : "Parsed command object contains duplicate top level key: $db",
      	"code" : 9,
      	"codeName" : "FailedToParse"
      }
      

      There is no duplicate top level key $db, but I suspect the server is upgrading the OP_QUERY to OP_MSG and $db itself from the wire protocol

            Assignee:
            mathias@mongodb.com Mathias Stearn
            Reporter:
            bjori Hannes Magnusson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: