-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Sharding
-
Fully Compatible
-
Sharding 2020-09-21
Add a utility function to identify the recipient shard which would own the document under the new shard key pattern. One idea is to get the ChunkManager for the new sharded collection (the one under the new shard key pattern), then use ChunkManager::findIntersectingChunk() to find the overlapping chunk on the recipient, and finally use Chunk::getShardId() to get the destined recipient. boost::none would be returned if there isn't an active resharding operation.
This function must return boost::none if the donor shard doesn't own the document under the current shard key pattern.
boost::optional<ShardId> getDestinedRecipient(const NamespaceString& sourceNss, BSONObj fullDocument);
- has to be done after
-
SERVER-49564 Create class for ReshardingDonorStateMachine with function stubs
- Closed
- has to be done before
-
SERVER-49822 Add destined recipient to oplog entries from inserts
- Closed
-
SERVER-49823 Add destined recipient to oplog entries from updates
- Closed
-
SERVER-49824 Add destined recipient to oplog entries from deletes
- Closed
- is related to
-
SERVER-50921 Handle checking whether recipients should be added to oplog entries even after recovery
- Closed
- related to
-
SERVER-49572 Implement onReshardingParticipantTransition in the ReshardingCoordinatorObserver
- Closed