diff options
author | Andy Schwerin <schwerin@mongodb.com> | 2018-05-05 10:20:46 -0400 |
---|---|---|
committer | Andy Schwerin <schwerin@mongodb.com> | 2018-05-05 10:20:46 -0400 |
commit | 30994f3bacb6e814ae015d83693c549a3b924ccc (patch) | |
tree | bb959682199469dc6039406721a2f8000cefc10e /src/mongo/db/storage/mobile | |
parent | 757c434668e4936d6b2ac62131be7f12aeac25be (diff) | |
download | mongo-30994f3bacb6e814ae015d83693c549a3b924ccc.tar.gz |
SERVER-34798 Move storage initialization behaviors out of ServiceContext subclasses to new library.
Diffstat (limited to 'src/mongo/db/storage/mobile')
-rw-r--r-- | src/mongo/db/storage/mobile/SConscript | 7 | ||||
-rw-r--r-- | src/mongo/db/storage/mobile/mobile_init.cpp | 3 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/mongo/db/storage/mobile/SConscript b/src/mongo/db/storage/mobile/SConscript index 98ed0435228..1f481c23d0a 100644 --- a/src/mongo/db/storage/mobile/SConscript +++ b/src/mongo/db/storage/mobile/SConscript @@ -50,8 +50,11 @@ env.Library( LIBDEPS=[ 'storage_mobile_core', '$BUILD_DIR/mongo/db/storage/kv/kv_engine' - ] - ) + ], + LIBDEPS_PRIVATE=[ + '$BUILD_DIR/mongo/db/storage/storage_engine_common', + ], +) ''' env.CppUnitTest( target='storage_mobile_index_test', diff --git a/src/mongo/db/storage/mobile/mobile_init.cpp b/src/mongo/db/storage/mobile/mobile_init.cpp index edadad22887..41a5dc83159 100644 --- a/src/mongo/db/storage/mobile/mobile_init.cpp +++ b/src/mongo/db/storage/mobile/mobile_init.cpp @@ -34,6 +34,7 @@ #include "mongo/db/service_context.h" #include "mongo/db/storage/kv/kv_storage_engine.h" #include "mongo/db/storage/mobile/mobile_kv_engine.h" +#include "mongo/db/storage/storage_engine_init.h" #include "mongo/db/storage/storage_options.h" namespace mongo { @@ -74,7 +75,7 @@ GlobalInitializerRegisterer mobileKVEngineInitializer( "MobileKVEngineInit", {"ServiceContext"}, [](InitializerContext* context) { - getGlobalServiceContext()->registerStorageEngine("mobile", new MobileFactory()); + registerStorageEngine(getGlobalServiceContext(), std::make_unique<MobileFactory>()); return Status::OK(); }, [](DeinitializerContext* const) { return Status::OK(); }); |