[SERVER-81293] Get rid of `ensurePrimaryShard` helper Created: 21/Sep/23 Updated: 29/Oct/23 Resolved: 28/Sep/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 7.2.0-rc0 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Pierlauro Sciarelli | Assignee: | Pierlauro Sciarelli |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Sprint: | Sharding EMEA 2023-10-02 | ||||||||||||
| Participants: | |||||||||||||
| Linked BF Score: | 160 | ||||||||||||
| Description |
|
The ensurePrimaryShard helper function is currently used to create a database on a specific primary shard (if not existing) or changing a db's primary shard (if existing). Inspecting a sample of tests invoking it, it turns out that this function is used in the following ways:
Purpose of this ticket is to get rid of ensurePrimaryShard for the following reasons:
This is a precondition to deprecate the movePrimary command once moveCollection will be available, so there will not be too many tests to adapt in the future. |
| Comments |
| Comment by Githook User [ 28/Sep/23 ] |
|
Author: {'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}Message: |
| Comment by Githook User [ 28/Sep/23 ] |
|
Author: {'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}Message: |