Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-10783

MongoDB displays databases even after dropDatabase() has completed successfully

    • Type: Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.4.4
    • Component/s: Admin
    • Labels:
      None
    • Environment:
      Mac OS X 10.8/10.9
    • OS X
    • Hide

      1) Launch mongo
      2) show dbs
      3) use <database name>
      4) db.dropDatabase()
      5) Go to step #2 to #4 until you have deleted all the ones you want
      6) exit mongo
      7) Launch mongo

      Something really interesting once the shell has opened:

      TurboMonkey:~ tito$ mongo
      MongoDB shell version: 2.4.4
      connecting to: test
      Server has startup warnings:
      Sun Sep 15 22:08:29.401 [initandlisten]
      Sun Sep 15 22:08:29.401 [initandlisten] ** WARNING: soft rlimits too low. Number of files is 256, should be at least 1000
      > show dbs
      developer 0.203125GB
      local 0.078125GB

      List all databases again and voilĂ ! They're back!

      > show dbs
      13825aa067 (empty)
      78002fa14d (empty)
      89da4e1154 (empty)
      bd24985d6a (empty)
      befd1bcc5e (empty)
      developer 0.203125GB
      local 0.078125GB
      >

      Show
      1) Launch mongo 2) show dbs 3) use <database name> 4) db.dropDatabase() 5) Go to step #2 to #4 until you have deleted all the ones you want 6) exit mongo 7) Launch mongo Something really interesting once the shell has opened: TurboMonkey:~ tito$ mongo MongoDB shell version: 2.4.4 connecting to: test Server has startup warnings: Sun Sep 15 22:08:29.401 [initandlisten] Sun Sep 15 22:08:29.401 [initandlisten] ** WARNING: soft rlimits too low. Number of files is 256, should be at least 1000 > show dbs developer 0.203125GB local 0.078125GB List all databases again and voilĂ ! They're back! > show dbs 13825aa067 (empty) 78002fa14d (empty) 89da4e1154 (empty) bd24985d6a (empty) befd1bcc5e (empty) developer 0.203125GB local 0.078125GB >

      I have several databases listed:

      > show dbs
      13825aa067 (empty)
      78002fa14d (empty)
      89da4e1154 (empty)
      bd24985d6a (empty)
      befd1bcc5e (empty)
      developer 0.203125GB
      local 0.078125GB

      Except for developer and local, I remove them one by one like this:

      > use befd1bcc5e
      switched to db befd1bcc5e
      > db.dropDatabase()

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

      MongoDB reports something like this:

      Mon Sep 16 08:14:53.085 [conn7305] dropDatabase befd1bcc5e starting
      Mon Sep 16 08:14:53.089 [conn7305] removeJournalFiles
      Mon Sep 16 08:14:53.089 [conn7305] dropDatabase befd1bcc5e finished

      When I display all available databases, they're still reported:

      > show dbs
      13825aa067 (empty)
      78002fa14d (empty)
      89da4e1154 (empty)
      bd24985d6a (empty)
      befd1bcc5e (empty)
      developer 0.203125GB
      local 0.078125GB

      These UUID-looking databases won't die.

            Assignee:
            Unassigned Unassigned
            Reporter:
            tito Tito Ciuro
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: