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

dbhash command return misleading error when passing collection name

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 3.2.0
    • Component/s: Usability
    • Labels:
      None
    • Storage Execution
    • ALL

      The dbhash command returns a misleading error when running an old form of the command:

      // run dbHash using the old way
      > db.runCommand( { dbHash : 'config' } )
      { "ok" : 0, "errmsg" : "need a valid database name", "code" : 28539 }
      // but, thisis case, the "config" database exists and is valid
      > show dbs
      config         0.023GB
      // run with the new way with now problem
      > db.runCommand( { dbHash : 1, collections: ['config'] } )
      {
      	"host" : "Stevens-MacBook-Pro-2.local",
      	"collections" : {
      		
      	},
      	"md5" : "d41d8cd98f00b204e9800998ecf8427e",
      	"timeMillis" : 0,
      	"fromCache" : [ ],
      	"ok" : 1
      }
      

            Assignee:
            backlog-server-execution [DO NOT USE] Backlog - Storage Execution Team
            Reporter:
            steven.hand Steven Hand
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: