From af600c3876a26f62d8dde93bf769fc4ca3054072 Mon Sep 17 00:00:00 2001 From: Henrik Edin Date: Mon, 12 Mar 2018 11:14:15 -0400 Subject: SERVER-30170 Embedded can now shutdown and re-initialize. - ServiceContext* is now closer to be an instance context for the database. We still don't support multiple instances but I wrote the new code with this in mind. Teardown and reinitialize then becomes a matter of being able to delete and re-create the ServiceContext*. - Use the new MONGO_INITIALIZER that supports deinit/reinit to be able to re-initialize global systems that are decorations on ServiceContext. - Move creation/destruction of ServiceContext* out of MONGO_INITIALIZER. This so we can hold an exclusive lock during as much as possible of the shutdown (like how mongod does) - New ServiceContext registrer where we can link in different implementations of ServiceContext (replaces the SetGlobalEnvironment MONGO_INITIALIZER) - As a result the SetGlobalEnvironment prerequisite for MONGO_INITIALIZERs is gone. - The ServiceContext is passed to runGlobalInitializers, put in InitializationContext/DeinitializationContext so the initializers know which context they operate on. --- src/mongo/SConscript | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/mongo/SConscript') diff --git a/src/mongo/SConscript b/src/mongo/SConscript index a2451a9cb54..c5d91a883b6 100644 --- a/src/mongo/SConscript +++ b/src/mongo/SConscript @@ -56,14 +56,12 @@ env.Library( 'base/data_type.cpp', 'base/data_type_string_data.cpp', 'base/data_type_terminated.cpp', - 'base/deinitializer_context.cpp', 'base/error_codes.cpp', 'base/error_extra_info.cpp', 'base/global_initializer.cpp', 'base/global_initializer_registerer.cpp', 'base/init.cpp', 'base/initializer.cpp', - 'base/initializer_context.cpp', 'base/initializer_dependency_graph.cpp', 'base/make_string_vector.cpp', 'base/parse_number.cpp', -- cgit v1.2.1