[SERVER-4246] allow resharding by more-specific shard key. Created: 10/Nov/11 Updated: 06/Dec/22 Resolved: 30/Jul/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Greg Studer | Assignee: | [DO NOT USE] Backlog - Sharding Team |
| Resolution: | Done | Votes: | 10 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Assigned Teams: |
Sharding
|
||||||||||||
| Participants: | |||||||||||||
| Description |
|
While sharding by a different shard key in general could require arbitrary amounts of data movement, sharding by a more-specific shard key doesn't have this problem. For example, a collection might initially be sharded by "region", then suddenly one region is huge, and the data must be resharded to split the regional chunks. Even though no data needs to be moved between shards, this isn't allowed. If we were nicer, we could allow this by creating indices on each shard for the new shard key, then modifying the config db and appending criteria to the chunk bounds. |
| Comments |
| Comment by Garaudy Etienne [ 30/Jul/21 ] |
|
We introduced refineCollection in MongoDB 4.4 |