Details
-
Task
-
Resolution: Fixed
-
Major - P3
-
None
-
None
-
None
-
Fully Compatible
-
Sharding EMEA 2022-07-25
Description
Currently the ShardRegistry is first constructed, then installed into the Grid and only after it is initialized through ShardRegistry::init].
All the logic of ShardRegistry::init can be safely performed at construction time, so we can simplify the ShardRegistry startup logic by removing the deferred initialization function.
The creation of the config shard object will initialize the associated RSM monitor that in turns will call ShardRegistry::updateReplSetHosts(). Hence the config shard object MUST be created after the ShardRegistry is fully constructed. This is the reason why we do it inside the init() function instead of inside the ShardRegistry constructor itself.