From 3805ccdc25facfe536302321ee4fb485f7030d0c Mon Sep 17 00:00:00 2001 From: Jason Carey Date: Wed, 20 Sep 2017 17:50:18 -0400 Subject: SERVER-31289 Add test only $listLocalCursors In order to make the kill sessions test a bit more reliable, adding a test only agg stage that returns minimal info about cursors. That way we can see if we killed our specific cursors, rather than looking at global counts. --- src/mongo/s/server.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/mongo/s/server.cpp') diff --git a/src/mongo/s/server.cpp b/src/mongo/s/server.cpp index e2e87e187d2..54e537e2e83 100644 --- a/src/mongo/s/server.cpp +++ b/src/mongo/s/server.cpp @@ -51,6 +51,8 @@ #include "mongo/db/auth/user_cache_invalidator_job.h" #include "mongo/db/client.h" #include "mongo/db/ftdc/ftdc_mongos.h" +#include "mongo/db/generic_cursor_manager.h" +#include "mongo/db/generic_cursor_manager_mongos.h" #include "mongo/db/initialize_server_global_state.h" #include "mongo/db/kill_sessions.h" #include "mongo/db/lasterror.h" @@ -439,6 +441,9 @@ static ExitCode runMongosServer() { getGlobalServiceContext(), std::make_shared(getGlobalServiceContext(), killSessionsRemote)); + GenericCursorManager::set(getGlobalServiceContext(), + stdx::make_unique()); + // Set up the logical session cache LogicalSessionCache::set(getGlobalServiceContext(), makeLogicalSessionCacheS()); -- cgit v1.2.1