diff options
Diffstat (limited to 'src/mongo/s/mongos_main.cpp')
| -rw-r--r-- | src/mongo/s/mongos_main.cpp | 31 |
1 files changed, 1 insertions, 30 deletions
diff --git a/src/mongo/s/mongos_main.cpp b/src/mongo/s/mongos_main.cpp index 665f3fe08d4..0504b714aec 100644 --- a/src/mongo/s/mongos_main.cpp +++ b/src/mongo/s/mongos_main.cpp @@ -127,10 +127,6 @@ #include "mongo/util/text.h" #include "mongo/util/version.h" -#ifdef __linux__ -#include <sys/prctl.h> -#endif - namespace mongo { using logv2::LogComponent; @@ -316,10 +312,7 @@ void cleanupTask(const ShutdownTaskArgs& shutdownArgs) { ReplicaSetMonitor::shutdown(); - { - stdx::lock_guard lg(client); - opCtx->setIsExecutingShutdown(); - } + opCtx->setIsExecutingShutdown(); if (serviceContext) { serviceContext->setKillAllOperations(); @@ -348,7 +341,6 @@ void cleanupTask(const ShutdownTaskArgs& shutdownArgs) { } if (auto pool = Grid::get(opCtx)->getExecutorPool()) { - LOGV2_OPTIONS(7698300, {LogComponent::kSharding}, "Shutting down the ExecutorPool"); pool->shutdownAndJoin(); } @@ -357,13 +349,6 @@ void cleanupTask(const ShutdownTaskArgs& shutdownArgs) { } if (Grid::get(serviceContext)->isShardingInitialized()) { - // The CatalogCache must be shuted down before shutting down the CatalogCacheLoader as - // the CatalogCache may try to schedule work on CatalogCacheLoader and fail. - LOGV2_OPTIONS(7698301, {LogComponent::kSharding}, "Shutting down the CatalogCache"); - Grid::get(serviceContext)->catalogCache()->shutDownAndJoin(); - - LOGV2_OPTIONS( - 7698302, {LogComponent::kSharding}, "Shutting down the CatalogCacheLoader"); CatalogCacheLoader::get(serviceContext).shutDown(); } @@ -860,18 +845,6 @@ std::unique_ptr<AuthzManagerExternalState> createAuthzManagerExternalStateMongos return std::make_unique<AuthzManagerExternalStateMongos>(); } -void disableMongosTHPUnderTestingEnvironment() { -#ifdef __linux__ - if (TestingProctor::instance().isEnabled()) { - if (prctl(PR_SET_THP_DISABLE, 1, 0, 0, 0) == -1) { - LOGV2_WARNING(8751802, "Could not disable THP on mongos"); - } else { - LOGV2_INFO(8751803, "Successfully disabled THP on mongos"); - } - } -#endif -} - ExitCode main(ServiceContext* serviceContext) { serviceContext->setFastClockSource(FastClockSourceFactory::create(Milliseconds{10})); @@ -946,8 +919,6 @@ ExitCode mongos_main(int argc, char* argv[]) { return EXIT_ABRUPT; } - disableMongosTHPUnderTestingEnvironment(); - try { auto serviceContextHolder = ServiceContext::make(); serviceContextHolder->registerClientObserver( |
