[SERVER-9496] Drop sharded collection the drop of sharded db leaves data on non-primary shards Created: 29/Apr/13 Updated: 07/Jun/13 Resolved: 07/Jun/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | David Hows | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Participants: | |||||||||
| Description |
|
Assuming 2+ shards Repro Steps:
Check and confirm on the shard servers the amount of data remaining. Primary shard will have no data for this database. Secondary shards will still have db files existing as the MongoS did not route the drop command to these shards. The drop of the database should be routed to the non-primary shards to cleanup. We should do some preflight checks before the drop and then use that to help determine where the drops are needed. |
| Comments |
| Comment by David Hows [ 29/Apr/13 ] |
|
Its an edge case, no doubt. But surely something we can do some checks for.
I assume you mean non-sharded collections? If so, this would apply on the primary shard as well.
I've re-worded that bit and attached a JStest.
Correct. |
| Comment by Scott Hernandez (Inactive) [ 29/Apr/13 ] |
|
What if there is data in other collections there? I'm a little confused by your comments starting with "Primary shard will be empty". Perhaps writing this as jstest will make it more clear exactly what you expect to happen and for the behaviors to be. I think what you are describing is that the collections are removed but the db isn't dropped on shards which only had sharded collections. |