-
Type: Task
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Sharding
-
Labels:None
-
Catalog and Routing
Currently, when we're adding a shard into a cluster, we use a helper function to contact it and apply all addShard related operations. If we need to do any cursor related command, then we need to use the Fetcher API, like it was done as part of SERVER-65386.
It make more sense to use a shard object and remove all boilerplate code we currently have as part of addShard. We actually already create a shard object but if we try to use it, every request fails with a ShardNotFound error.
We should provide a function that allows opening a cursor and get batch information from a shard that is still not in the cluster, and we could extend the Shard class with a tailored implementation for the addShard scenario and remove all usages of _runCommandForAddShard.