summaryrefslogtreecommitdiff
path: root/src/mongo/s/client/shard_connection.cpp
diff options
context:
space:
mode:
authorsamantharitter <samantha.ritter@10gen.com>2015-11-20 18:31:32 -0500
committerRamon Fernandez <ramon@mongodb.com>2016-01-29 13:28:56 -0500
commitc96e8cacf35cf327ba7061cc1aaba997a566a300 (patch)
tree1d38dde27cc38df2d822edf114df4153933fe7ae /src/mongo/s/client/shard_connection.cpp
parent5ca8d6e28255e9519db61d5d25807d70a3000ba7 (diff)
downloadmongo-c96e8cacf35cf327ba7061cc1aaba997a566a300.tar.gz
SERVER-21597 Fix connPoolStats to work with many NetworkInterfaces
(cherry picked from commit 7c67e25f37853c60c106d2cf08eca1b81c4133ae)
Diffstat (limited to 'src/mongo/s/client/shard_connection.cpp')
-rw-r--r--src/mongo/s/client/shard_connection.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mongo/s/client/shard_connection.cpp b/src/mongo/s/client/shard_connection.cpp
index 9be2f45a028..4d810238744 100644
--- a/src/mongo/s/client/shard_connection.cpp
+++ b/src/mongo/s/client/shard_connection.cpp
@@ -36,6 +36,7 @@
#include "mongo/db/commands.h"
#include "mongo/db/lasterror.h"
+#include "mongo/executor/connection_pool_stats.h"
#include "mongo/s/chunk_manager.h"
#include "mongo/s/client/shard.h"
#include "mongo/s/client/shard_registry.h"
@@ -115,10 +116,12 @@ public:
int options,
std::string& errmsg,
mongo::BSONObjBuilder& result) {
- // Base pool info
- shardConnectionPool.appendInfo(result);
+ // Connection information
+ executor::ConnectionPoolStats stats{};
+ shardConnectionPool.appendConnectionStats(&stats);
+ stats.appendToBSON(result);
- // Thread connection info
+ // Thread connection information
activeClientConnections.appendInfo(result);
return true;