[SERVER-65972] Use Shard object instead of manually sending commands to a soon to be added shard Created: 26/Apr/22  Updated: 26/Oct/23

Status: Backlog
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Marcos José Grillo Ramirez Assignee: Backlog - Catalog and Routing
Resolution: Unresolved Votes: 0
Labels: oldshardingemea
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Catalog and Routing
Participants:

 Description   

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.


Generated at Thu Feb 08 06:04:08 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.