-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Internal Code
-
None
-
Fully Compatible
-
Sharding 2020-03-23, Sharding 2020-04-06, Sharding 2020-04-20, Sharding 2020-05-04, Sharding 2020-05-18, Sharding 2020-06-01
There are components which wrap global initializers, eg. ServiceContext::ContructorActionRegisterer. If these are used inside MONGO_INITIALIZER they will silently fail to run. Since the graph has already been flattened by this time, doing this is invalid, but the abstraction makes it hard to know that this happened. As such, executeInitializers() should "freeze" the graph prior to running the initializer functions, to prevent these nodes from being added.