Description
Running repairDatabase on a non-existing database creates an empty db folder on the filesystem but show dbs does not show the same on the shell.
dineshs-MacBook-Pro:db dineshchander$ ls -lrt
|
total 163848
|
-rwxr-xr-x 1 dineshchander staff 6 Feb 2 21:48 mongod.lock
|
drwxr-xr-x 3 dineshchander staff 102 Feb 2 21:48 journal
|
-rw------- 1 dineshchander staff 16777216 Feb 2 21:48 local.ns
|
-rw------- 1 dineshchander staff 67108864 Feb 2 21:48 local.0
|
drwxr-xr-x 2 dineshchander staff 68 Feb 2 21:48 _tmp
|
dineshs-MacBook-Pro:db dineshchander$ mongo
|
MongoDB shell version: 2.6.11
|
connecting to: test
|
Server has startup warnings:
|
2016-02-02T21:48:07.971+0530 [initandlisten]
|
> db.version()
|
2.6.11
|
> use abcd
|
switched to db abcd
|
> db.repairDatabase()
|
{ "ok" : 1 }
|
> show dbs
|
admin (empty)
|
local 0.078GB
|
> ^C
|
bye
|
dineshs-MacBook-Pro:db dineshchander$ ls -lrt
|
total 163848
|
-rwxr-xr-x 1 dineshchander staff 6 Feb 2 21:48 mongod.lock
|
drwxr-xr-x 2 dineshchander staff 68 Feb 2 21:48 _tmp
|
drwxr-xr-x 2 dineshchander staff 68 Feb 2 21:48 journal
|
drwxr-xr-x 2 dineshchander staff 68 Feb 2 21:48 abcd
|
-rw------- 1 dineshchander staff 16777216 Feb 2 21:48 local.ns
|
-rw------- 1 dineshchander staff 67108864 Feb 2 21:48 local.0
|
As the db is non-existing (even the shell does not show it), no directory should get created on the filesystem.
Attachments
Issue Links
- duplicates
-
SERVER-23976 repairDatabase command on a new, different-cased database terminates server
-
- Closed
-