[SERVER-54911] Disallow movePrimary on databases owning collections being resharded Created: 03/Mar/21 Updated: 27/Oct/23 Resolved: 03/Mar/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Pierlauro Sciarelli | Assignee: | [DO NOT USE] Backlog - Sharding EMEA |
| Resolution: | Works as Designed | Votes: | 0 |
| Labels: | PM-1965-Milestone-0-Metadata-Format | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Sharding EMEA
|
| Participants: |
| Description |
|
Given a database, provide a way to check if a resharding operation is ongoing for an owned collection: this can be achievable by adding a field to DatabaseType. In v5.0, only one resharding operation is expected to be executed in the whole cluster. However, it would be nice to provide a counter - instead of a simple flag - in order to already prepare metadata for the future. The counter in config.databases entries is expected to keep track of the number of resharding operations and it should be incremented here and decremented here |
| Comments |
| Comment by Pierlauro Sciarelli [ 03/Mar/21 ] |
|
We are already acquiring the db distributed lock during resharding, so no need for the proposed mechanism |