[SERVER-1343] databases still show up after being dropped Created: 01/Jul/10  Updated: 28/Jun/12  Resolved: 16/Jul/10

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

Type: Bug Priority: Major - P3
Reporter: Kristina Chodorow (Inactive) Assignee: Alberto Lerner
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

db version v1.5.4-pre-, pdfile version 4.5
Thu Jul 1 17:22:35 git version: 1d96219addad2a007375043b06731392fe388bbf


Operating System: ALL
Participants:

 Description   

"show dbs" still shows the database after it's dropped:

> use foo
switched to db foo
> db.bar.insert(

{x:1}

)
> db.dropDatabase()

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

> show dbs
admin
foo
local



 Comments   
Comment by Alberto Lerner [ 16/Jul/10 ]
        • Sharded case

> use admin
switched to db admin
> db.runCommand(

{ addshard : "localhost:10000", allowLocal : true }

)

{ "added" : "localhost:10000", "ok" : 1 }

> show dbs
admin
local
> use foo
switched to db foo
> db.bar.save(

{x:1}

)
> db.dropDatabase()

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

> show dbs
admin
local

        • Non-sharded case

> use foo
switched to db foo
> db.bar.save(

{x:1}

)
> db.dropDatabase()

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

> show dbs
admin
local

Comment by Eliot Horowitz (Inactive) [ 05/Jul/10 ]

@justin note it relates to sharding

Comment by Justin Dearing [ 05/Jul/10 ]

Cannot reproduce on windows 7 with Mongo 1.4.1 and A1.5.5-pre, current nightly. What OS are you running? If its a mac I can Test it Tuesday, anything else tomorrow.

Reeks of a caching issue. Does restarting mongod fix the issue? What does the mongod stdout show?

\mongodb-win32-i386-2010-07-04\bin>C:\Users\zippy\AppData\Local\Temp\FTMEEC.tmp\mongo.exe
MongoDB shell version: 1.5.5-pre-
connecting to: test
> use justin
switched to db justin
> db.tom.insert(

{song: 'You can go your own way!!!!'}

);
> db.tom.find()

{ "_id" : ObjectId("4c315bcb4f6c000000005d64"), "song" : "You can go your own way!!!!" }

> show dbs
admin
justin

\mongodb-win32-i386-2010-07-04\bin>C:\Users\zippy\AppData\Local\Temp\FTMF64.tmp\mongod.exe
C:\Users\zippy\AppData\Local\Temp\FTMF64.tmp\mongod.exe --help for help and startup options
Mon Jul 05 00:10:57 MongoDB starting : pid=5828 port=27017 dbpath=/data/db/ 32-bit

    • NOTE: This is a development version (1.5.5-pre-) of MongoDB.
    • Not recommended for production.

Mon Jul 05 00:10:58 db version v1.5.5-pre-, pdfile version 4.5
Mon Jul 05 00:10:58 git version: 812b647228b099457b5fd27002f9a44035ff7067
Mon Jul 05 00:10:58 sys info: windows (5, 1, 2600, 2, 'Service Pack 3') BOOST_LIB_VERSION=1_35
[initandlisten] Mon Jul 05 00:10:58 waiting for connections on port 27017
[websvr] Mon Jul 05 00:10:58 web admin interface listening on port 28017
[initandlisten] Mon Jul 05 00:11:38 connection accepted from 127.0.0.1:14443 #1
[conn1] Mon Jul 05 00:12:59 building new index on

{ _id: 1 }

for justin.tom
[conn1] Mon Jul 05 00:12:59 Buildindex justin.tom idxNo:0 { name: "id", ns: "justin.tom", key:

{ _id: 1 }

}
[conn1] Mon Jul 05 00:12:59 done for 0 records 0.057secs
[conn1] Mon Jul 05 00:12:59 insert justin.tom 345ms
[conn1] Mon Jul 05 00:13:15 dropDatabase justin
local
test
> db.dropDatabase()

{ "dropped" : "justin", "ok" : true }

> show dbs
admin
local
test
>

Generated at Thu Feb 08 02:56:45 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.