[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: |
|
||||||||||||||||||||||||||||||||
| 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.
|
| Comments |
| Comment by Githook User [ 16/Sep/20 ] |
|
Author: {'name': 'Alex Taskov', 'email': 'alex.taskov@mongodb.com', 'username': 'alextaskov'}Message: |
| Comment by Haley Connelly [ 09/Sep/20 ] |
|
Edit: Never mind, this ticket didn't wind up needing to create a new observer. |