[SERVER-11080] dropDatabase command failed to drop database from all shards. Created: 08/Oct/13  Updated: 10/Dec/14  Resolved: 19/Mar/14

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

Type: Bug Priority: Critical - P2
Reporter: jitendra Assignee: Unassigned
Resolution: Done Votes: 0
Labels: sharding
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

OEL linux


Operating System: Linux
Steps To Reproduce:

Insert 100 GB data to sharding cluster for database_1.
Now start inserting data to database_2.
Run dropDatabase command from mongos for database_1 (while insertion is going on database_2) .

Participants:

 Description   

Hi,

We have following configuration of mongodb:(journal enabled)
On machines-1 have following servers
mongod - 5
config server - 2
mongos - 1
On machines-2 have following servers
mongod - 5
config server - 1

We ran dropDatabase command from mongos, got below error:
mongos> db.dropDatabase()
{
"assertion" : "DBClientBase::findN: transport error: 192.168.50.222:20000 query:

{ dropDatabase: 1 }

",
"assertionCode" : 10276,
"errmsg" : "db assertion failure",
"ok" : 0
}

dropDatabase dropped the database only from shard1.
database was not deleted from shard2 to shard10.

i again ran dropDatabase command from mongos and get "ok"
mongos> db.dropDatabase()

{ "dropped" : "00031013", "ok" : 1 }

but database was not deleted from shard2 to shard10.

We got below log in mongos:
couldn't find database [00031013] in config db

I have following questions:
1. How can we drop the database in above condition:
2. what does mean by "couldn't find database [00031013] in config db" ?
3. Any other way to remove database files apart from dropDatabase?

please help me to resolve this issue

T&R,
JRV



 Comments   
Comment by Stennie Steneker (Inactive) [ 19/Mar/14 ]

Hi JRV,

Please be advised I'm closing this issue due to inactivity.

I would also note that the SERVER project is intended for reporting bugs or feature suggestions for the MongoDB server.

For MongoDB-related support discussion please post on the mongodb-users group (http://groups.google.com/group/mongodb-user) or ask specific questions on Stack Overflow / ServerFault.

Thanks,
Stephen

Comment by Linda Qin [ 28/Oct/13 ]

Hi JRV,

Following up with you on this subject since we haven't heard from you in a while. Could you please let us know if you were able to drop the database and do you have any progress to answer the questions in my last comment?

Thanks,
Linda

Comment by Linda Qin [ 17/Oct/13 ]

Hi JRV,

Please find my comments inline:

1. How can we drop the database in above condition:

To drop the database in the above condition, you can login to the primary of each shard (if it is a replica set for each shard, otherwise just login the mongod server for each shard), and drop that database from each shard.

2. what does mean by "couldn't find database [00031013] in config db" ?

This means the configurations of database [00031013] were already removed from the config database when you retrying deleting this database again.

3. Any other way to remove database files apart from dropDatabase?

If it is a sharded cluster, you have to use dropDatabase to drop the db from mongos to cleanup the database configurations for db from config database.

To help us diagnose why it failed to drop the database from mongos, could you please:

  1. confirm which shard is running on 192.168.50.222:20000?
  2. upload a dump of the config database using mongodump, and the logs from mongos, shard1 and shard2?
  3. confirm how you checked that database was not deleted from shard2 to shard10? Did you login to each shard to check?
  4. confirm how you inserted data to database_1 and database_2? Did you inserted them from mongos?

Thanks,
Linda

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