[SERVER-11298] Better message for experimental storage and index commands Created: 22/Oct/13  Updated: 11/Jul/16  Resolved: 24/Oct/13

Status: Closed
Project: Core Server
Component/s: Diagnostics
Affects Version/s: 2.4.5
Fix Version/s: 2.5.4

Type: Improvement Priority: Minor - P4
Reporter: Alvin Richards (Inactive) Assignee: Daniel Pasette (Inactive)
Resolution: Done Votes: 0
Labels: 26qa, neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

> db.serverBuildInfo()
{
"version" : "2.4.5",
"gitVersion" : "a2ddc68ba7c9cee17bfe69ed840383ec3506602b",
"sysInfo" : "Darwin bs-osx-106-x86-64-2.10gen.cc 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:32:41 PDT 2011; root:xnu-1504.15.3~1/RELEASE_X86_64 x86_64 BOOST_LIB_VERSION=1_49",
"loaderFlags" : "-fPIC -pthread -rdynamic -m64",
"compilerFlags" : "-Wnon-virtual-dtor -Woverloaded-virtual -fPIC -fno-strict-aliasing -ggdb -pthread -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch -O3 -m64",
"allocator" : "system",
"versionArray" : [
2,
4,
5,
0
],
"javascriptEngine" : "V8",
"bits" : 64,
"debug" : false,
"maxBsonObjectSize" : 16777216,
"ok" : 1
}


Issue Links:
Related
Participants:

 Description   

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()



 Comments   
Comment by auto [ 23/Oct/13 ]

Author:

{u'username': u'monkey101', u'name': u'Dan Pasette', u'email': u'dan@10gen.com'}

Message: SERVER-11298: better error msg for getIndexStats, getPagesInRAM and getDiskStorageStats
Branch: master
https://github.com/mongodb/mongo/commit/deea07bcc3ab166cc6cb5c025d46b89fb4c02236

Generated at Thu Feb 08 03:25:25 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.