Currently, when an addShard command is run, sharding initialization is triggered when the _configsvrAddShard command inserts a shard identity document on the shard. The shards OpObserver then sees it received the identity document and triggers sharding initialization, but because it is under a database lock, it cannot do any networking calls or I/O, which is a problem if we want to do any blocking operations to initialize a shard.
The solution will be to create an _addShard command on the shard, which will be called from the config server. It will be responsible for inserting the shard identity document into itself, which will trigger the normal initialization. Then, we will be able to add any blocking calls we want from inside this command, after inserting that document.
- is depended on by
-
SERVER-31586 Recreate PeriodicBalancerSettingsRefresher on the ServiceContext
- Closed