summaryrefslogtreecommitdiff
path: root/src/mongo/db/storage/devnull/devnull_init.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/storage/devnull/devnull_init.cpp')
-rw-r--r--src/mongo/db/storage/devnull/devnull_init.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/mongo/db/storage/devnull/devnull_init.cpp b/src/mongo/db/storage/devnull/devnull_init.cpp
index 68e80902d29..e6272dbb163 100644
--- a/src/mongo/db/storage/devnull/devnull_init.cpp
+++ b/src/mongo/db/storage/devnull/devnull_init.cpp
@@ -31,7 +31,6 @@
#include "mongo/base/init.h"
#include "mongo/db/service_context.h"
-#include "mongo/db/service_context_d.h"
#include "mongo/db/storage/devnull/devnull_kv_engine.h"
#include "mongo/db/storage/kv/kv_storage_engine.h"
#include "mongo/db/storage/storage_engine_init.h"
@@ -65,10 +64,8 @@ public:
};
} // namespace
-MONGO_INITIALIZER_WITH_PREREQUISITES(DevNullEngineInit, ("ServiceContext"))
-(InitializerContext* context) {
- registerStorageEngine(getGlobalServiceContext(),
- std::make_unique<DevNullStorageEngineFactory>());
- return Status::OK();
-}
+ServiceContext::ConstructorActionRegisterer registerDevNull(
+ "RegisterDevNullEngine", [](ServiceContext* service) {
+ registerStorageEngine(service, std::make_unique<DevNullStorageEngineFactory>());
+ });
} // namespace mongo