[SERVER-81537] Refactor addShard code to use the Shard object Created: 28/Sep/23  Updated: 26/Oct/23

Status: Open
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   

When adding a shard we currently create a shard object that is only used to obtain a targeter. Then, we proceed to use this targeter and a helper function to communicate with the shard. We should be able to use the shard object to communicate with the shard instead. Initially this was not possible because the RSM code was intrinsically called, and this causes problems because the RSM automatically do changes in the ShardRegistry. The main problem with this is that we have duplicated code to handle the communication with the shard which is already implemented for example in the ShardRemote class.

We should refactor the addShard code to use a Shard object for communications. This might imply creating a custom Shard object that does not communicate with the RSM nor the ShardRegistry. It is also part of this ticket analyze if we need to use the new async_rpc library.


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