[SERVER-49821] Define utility function for getting recipient which would own document under new shard key Created: 23/Jul/20  Updated: 29/Oct/23  Resolved: 17/Sep/20

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

Type: Task Priority: Major - P3
Reporter: Max Hirschhorn Assignee: Alexander Taskov (Inactive)
Resolution: Fixed Votes: 0
Labels: PM-234-M2, PM-234-T-oplog-fetch
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Gantt Dependency
has to be done before SERVER-49822 Add destined recipient to oplog entri... Closed
has to be done before SERVER-49823 Add destined recipient to oplog entri... Closed
has to be done before SERVER-49824 Add destined recipient to oplog entri... Closed
has to be done after SERVER-49564 Create class for ReshardingDonorState... Closed
Related
related to SERVER-49572 Implement onReshardingParticipantTran... Closed
is related to SERVER-50921 Handle checking whether recipients sh... Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding 2020-09-21
Participants:

 Description   

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);



 Comments   
Comment by Githook User [ 16/Sep/20 ]

Author:

{'name': 'Alex Taskov', 'email': 'alex.taskov@mongodb.com', 'username': 'alextaskov'}

Message: SERVER-49821 Define utility function for getting recipient which would own document under new shard key
Branch: master
https://github.com/mongodb/mongo/commit/99c10e35e5e1afdacb9919be2e9f5f596da56a21

Comment by Haley Connelly [ 09/Sep/20 ]

SERVER-49821 Will add a new OpObserver for Resharding.

Currently in progress, logic in ConfigServerOpObserver::onUpdate from SERVER-49572 needs to be relocated into the new observer. 

If this ticket gets done first, the logic will be relocated as a part of SERVER-49572 . Otherwise, a new ticket will get created.

Edit: Never mind, this ticket didn't wind up needing to create a new observer.

Generated at Thu Feb 08 05:20:56 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.