[SERVER-62294] The moveChunk cmd doesn't remove the collection entry on the local catalog Created: 29/Dec/21 Updated: 26/Oct/23 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Sergi Mateo Bellido | Assignee: | Backlog - Catalog and Routing |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | oldshardingemea, sharding-range-deleter-rough-edges, shardingemea-qw | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Assigned Teams: |
Catalog and Routing
|
||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Participants: | |||||||||||||||||
| Story Points: | 3 | ||||||||||||||||
| Description |
|
The moveChunk command doesn't remove the collection entry from the local catalog after moving the last chunk to another shard. This can cause some problems specially when we remove a shard and afterwards we add it back (HELP-30325): the addShard command might fail because the shard that we are trying to add has a database that already exists on the sharded cluster. This DB shouldn't exist on the shard, because as part of the removeShard command we migrated all its data to other shards. However, since we didn't remove the collection entry after moving the last chunk, the shard has a set of empty (orphan?) collections that are visible through a listDatabases cmd. |