[SERVER-3701] Sharded databases still showing up after being dropped Created: 28/Aug/11  Updated: 29/Aug/11  Resolved: 29/Aug/11

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 1.8.2
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Theo Hultberg Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

We have a cluster of three shards, with a number of sharded databases (one per day, because we need to be able to remove old data, and remove just fragments the database, killing performance). However, when I manually drop databases, some stick around and cannot be removed. Just before the output shown below I had removed every database with the "complete" and "fragments" prefixes, but still five of them showed up with show dbs, and when I remove them again they still show up:

> show dbs
admin	(empty)
complete_20110821	0.40625GB
complete_20110822	13.9013671875GB
config	0.046875GB
fragments_20110821	0.40625GB
fragments_20110822	27.89453125GB
fragments_20110823	1.90625GB
test	(empty)
> db.getSiblingDB("complete_20110821").dropDatabase()
{ "dropped" : "complete_20110821", "ok" : 1 }
> show dbs                                           
admin	(empty)
complete_20110821	0.40625GB
complete_20110822	13.9013671875GB
config	0.046875GB
fragments_20110821	0.40625GB
fragments_20110822	27.89453125GB
fragments_20110823	1.90625GB
test	(empty)
> db.getSiblingDB("complete_20110822").dropDatabase()
{ "dropped" : "complete_20110822", "ok" : 1 }
> show dbs                                           
admin	(empty)
complete_20110821	0.40625GB
complete_20110822	5.951171875GB
config	0.046875GB
fragments_20110821	0.40625GB
fragments_20110822	27.89453125GB
fragments_20110823	1.90625GB
test	(empty)

Notice that when I drop "complete_20110822" the size changes (dropping it again does not change the size now, through).

It doesn't matter how many times I run the remove command, these databases still show up.



 Comments   
Comment by Eliot Horowitz (Inactive) [ 29/Aug/11 ]

You can delete the entry from the config.databases collection, and also drop on each shard.
This is dangerous if you are ever going to re-use, but if not, should be safe.

Comment by Theo Hultberg [ 29/Aug/11 ]

Is there any workaround?

Comment by Eliot Horowitz (Inactive) [ 29/Aug/11 ]

This is because of this bug: SERVER-1726

Generated at Thu Feb 08 03:03:47 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.