From 6084f5cb58657f2576e5a63794fcf302b1777a8c Mon Sep 17 00:00:00 2001 From: Spencer T Brody Date: Fri, 1 Mar 2013 18:25:16 -0500 Subject: SERVER-8771 Additional fix for mongostat --discover with mongos --- src/mongo/tools/stat_util.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mongo/tools/stat_util.cpp b/src/mongo/tools/stat_util.cpp index b3c61a65c05..26d62434770 100644 --- a/src/mongo/tools/stat_util.cpp +++ b/src/mongo/tools/stat_util.cpp @@ -46,7 +46,7 @@ namespace mongo { BSONObj StatUtil::doRow( const BSONObj& a , const BSONObj& b ) { BSONObjBuilder result; - bool isMongos = b["shardCursorType"].type() == Object; // TODO: should have a better check + bool isMongos = b["shardCursorType"].type() == Object || b["process"].String() == "mongos"; if ( a["opcounters"].isABSONObj() && b["opcounters"].isABSONObj() ) { BSONObj ax = a["opcounters"].embeddedObject(); -- cgit v1.2.1