From bfe170e49b1dc10b2badde45bc13c057a2f8ab61 Mon Sep 17 00:00:00 2001 From: Andy Schwerin Date: Wed, 18 Jul 2018 13:46:53 -0400 Subject: SERVER-36258 Construct ServiceContext after mongo initializers complete. --- src/mongo/db/service_context.cpp | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'src/mongo/db/service_context.cpp') diff --git a/src/mongo/db/service_context.cpp b/src/mongo/db/service_context.cpp index bac2809f798..038cb0a67c4 100644 --- a/src/mongo/db/service_context.cpp +++ b/src/mongo/db/service_context.cpp @@ -349,22 +349,6 @@ void ServiceContext::notifyStartupComplete() { namespace { -// clang-format off -GlobalInitializerRegisterer registerCreateServiceContext{ - "ServiceContext", - {"default"}, - [](InitializerContext* context) { - setGlobalServiceContext(ServiceContext::make()); - return Status::OK(); - }, - [](DeinitializerContext* context) { - // For now, deregistration is done manually after all deinitializers run, in case any - // erroneously access the globalServiceContext without expressing a dependency. - return Status::OK(); - } -}; -// clang-format on - /** * Accessor function to get the global list of ServiceContext constructor and destructor * functions. @@ -390,7 +374,6 @@ ServiceContext::ConstructorActionRegisterer::ConstructorActionRegisterer( destructor = [](ServiceContext*) {}; _registerer.emplace(std::move(name), std::move(prereqs), - std::vector{"ServiceContext"}, [this, constructor, destructor](InitializerContext* context) { _iter = registeredConstructorActions().emplace( registeredConstructorActions().end(), -- cgit v1.2.1