summaryrefslogtreecommitdiff
path: root/src/mongo/db/service_context.cpp
diff options
context:
space:
mode:
authorAndy Schwerin <schwerin@mongodb.com>2018-07-18 13:46:53 -0400
committerHenrik Edin <henrik.edin@mongodb.com>2018-07-27 16:20:53 -0400
commitbfe170e49b1dc10b2badde45bc13c057a2f8ab61 (patch)
treef71d35e019c3194d033545c73296d415e18eb496 /src/mongo/db/service_context.cpp
parent018905518ca552775255f36a52e9fd187f9d61f8 (diff)
downloadmongo-bfe170e49b1dc10b2badde45bc13c057a2f8ab61.tar.gz
SERVER-36258 Construct ServiceContext after mongo initializers complete.
Diffstat (limited to 'src/mongo/db/service_context.cpp')
-rw-r--r--src/mongo/db/service_context.cpp17
1 files changed, 0 insertions, 17 deletions
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<std::string>{"ServiceContext"},
[this, constructor, destructor](InitializerContext* context) {
_iter = registeredConstructorActions().emplace(
registeredConstructorActions().end(),