[SERVER-84637] moveCollection should be able to move a collection with unique indexes on unsplittable collections Created: 08/Jan/24 Updated: 02/Feb/24 |
|
| Status: | Needs Scheduling |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 8.0 Required |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Marcos José Grillo Ramirez | Assignee: | Kshitij Gupta |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | cs-subteam2 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Operating System: | ALL |
| Steps To Reproduce: | Run the patch attached with all feature flags |
| Participants: | |
| Story Points: | 3 |
| Description |
|
Unsplittable collections by definition are tracked collections with only one chunk. The internal representation in config.collections requires a 'shard key', however, considering that in order to shard it the shardCollection command must be called, they can be treated as collections with all the data on the same shard, so, any unique index created for the collection, can be preserved even if the collection is moved. This means that the uniqueness constraint validation executed by resharding (which is the machinery used by moveCollection) it should not apply for unsplittable collections. |