[SERVER-16723] display active commands in server status only when command metrics are available. Created: 05/Jan/15  Updated: 15/Jan/15  Resolved: 14/Jan/15

Status: Closed
Project: Core Server
Component/s: Admin, Shell
Affects Version/s: None
Fix Version/s: 2.8.0-rc5

Type: Bug Priority: Minor - P4
Reporter: Scott Hernandez (Inactive) Assignee: David Hows
Resolution: Done Votes: 0
Labels: pull-request
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-15870 suppress uncalled commands from db.se... Closed
is related to SERVER-16714 serverStatus command with oplog argum... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

Running db.serverStatus({oplog:1}) helper returns a TypeError when the command fails:

$ mongo some-config-svr-host:40031
MongoDB shell version: 2.8.0-rc4
connecting to: some-config-svr-host:40031/test
configsvr> db.serverStatus({oplog:1})
2015-01-04T13:51:21.188-0500 I QUERY    TypeError: Cannot read property 'commands' of undefined
    at DB.serverStatus (src/mongo/shell/db.js:904:57)
    at (shell):1:4 at src/mongo/shell/db.js:904
configsvr>



 Comments   
Comment by Githook User [ 09/Jan/15 ]

Author:

{u'username': u'daveh86', u'name': u'daveh86', u'email': u'howsdav@gmail.com'}

Message: SERVER-16723 display active commands in server status only when command metrics are available.

Closes #901

Signed-off-by: Benety Goh <benety@mongodb.com>
Branch: master
https://github.com/mongodb/mongo/commit/666b3e19b10b3ac4c3de4c7a90a7070d33154240

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