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

Better message for experimental storage and index commands

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 2.5.4
    • Affects Version/s: 2.4.5
    • Component/s: Diagnostics
    • Labels:
    • Environment:

      Problem:
      In order to use db.c.getIndexStats() or the command indexStats you need to enable the mongd at startup with --enableExperimentalIndexStatsCmd per the documentation here

      http://docs.mongodb.org/manual/reference/command/indexStats/#dbcmd.indexStats

      However, if this is not enabled at startup you get the following message

      > db.q.getIndexStats()
      error executing indexStats command: {
      	"ok" : 0,
      	"errmsg" : "no such cmd: indexStats",
      	"bad cmd" : {
      		"indexStats" : "q"
      	}
      }
      

      The message at best in not helpful, it should indicate that a startup parameter is missing (and may be a link to the documentation)....

      Reproduce:
      Do not add the startup parameter indicated above and simply do the following

      db.q.drop()
      db.q.insert({a:1})
      db.q.ensureIndex({a:1});
      db.q.getIndexStats()
      

            Assignee:
            dan@mongodb.com Daniel Pasette (Inactive)
            Reporter:
            alvin Alvin Richards (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: