diff options
author | Henrik Edin <henrik.edin@mongodb.com> | 2017-07-27 12:58:10 -0400 |
---|---|---|
committer | Henrik Edin <henrik.edin@mongodb.com> | 2017-09-15 13:18:36 -0400 |
commit | 699f4020febee8b8bf0e3cbc056c01776b52a238 (patch) | |
tree | a720205a2b04abb081292564943c6e0d4f14a484 /src/mongo/db/commands/server_status.cpp | |
parent | f1bf0b33b4f1ce7bb50f208ef5e2d736ef5eba68 (diff) | |
download | mongo-699f4020febee8b8bf0e3cbc056c01776b52a238.tar.gz |
SERVER-30136 Move session stats tracking to the service entry point. At the same time, unify logging of connection accepted/refused/closed in this class too to make the transport layers cleaner.
Diffstat (limited to 'src/mongo/db/commands/server_status.cpp')
-rw-r--r-- | src/mongo/db/commands/server_status.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/mongo/db/commands/server_status.cpp b/src/mongo/db/commands/server_status.cpp index 4eabfd02abf..546944e5dc7 100644 --- a/src/mongo/db/commands/server_status.cpp +++ b/src/mongo/db/commands/server_status.cpp @@ -48,7 +48,7 @@ #include "mongo/db/stats/counters.h" #include "mongo/platform/process_id.h" #include "mongo/transport/message_compressor_registry.h" -#include "mongo/transport/transport_layer.h" +#include "mongo/transport/service_entry_point.h" #include "mongo/util/log.h" #include "mongo/util/net/hostname_canonicalization.h" #include "mongo/util/net/sock.h" @@ -233,10 +233,11 @@ public: BSONObj generateSection(OperationContext* opCtx, const BSONElement& configElement) const { BSONObjBuilder bb; - if (!opCtx->getServiceContext()->getTransportLayer()) { - return bb.obj(); - } - auto stats = opCtx->getServiceContext()->getTransportLayer()->sessionStats(); + + auto serviceEntryPoint = opCtx->getServiceContext()->getServiceEntryPoint(); + invariant(serviceEntryPoint); + + auto stats = serviceEntryPoint->sessionStats(); bb.append("current", static_cast<int>(stats.numOpenSessions)); bb.append("available", static_cast<int>(stats.numAvailableSessions)); bb.append("totalCreated", static_cast<int>(stats.numCreatedSessions)); |