[SERVER-86022] Consider adding a prerequisite check to removeShard which requires all shards to have consistent index definitions Created: 31/Jan/24 Updated: 01/Feb/24 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Max Hirschhorn | Assignee: | Backlog - Catalog and Routing |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Catalog and Routing
|
| Participants: |
| Description |
|
It is possible for shards to enforce different constraints for inserts and updates due to having different index definitions. Our data migration protocols do not allow inserting documents into a shard which would violate these constraints. (And corrupting an index on another shard to allow removing a shard to succeed is not a tradeoff we're willing to make.) This means removing a shard may leave that shard in the draining state for an indefinite amount of time until a client manually intervenes. Eagerly failing the removeShard command may be preferable to avoid the system from becoming stuck in this state. |