[SERVER-11051] listDatabases command reports existence of databases that have never been written to. Created: 06/Oct/13  Updated: 14/Mar/16  Resolved: 14/Mar/16

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

Type: Bug Priority: Minor - P4
Reporter: Andy Schwerin Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
Related
is related to SERVER-2080 Connecting to an authenticated server... Closed
is related to SERVER-3181 Add option to listDatabases to only g... Closed
Operating System: ALL
Participants:

 Description   

If a client accesses a non-existent database by reading it, a side-effect of that action is to cause listDatabases to believe in its existence. Further, listDatabases reports its sizeOnDisk as 1 byte, but sets the "empty" flag to true. This is confusing. Non-existent databases should not appear in listDatabases, even if someone attempted to read from it. Should they appear, they certainly shouldn't be reported as having a size on disk, when they have no associated files.



 Comments   
Comment by Ian Whalen (Inactive) [ 14/Mar/16 ]

Confirmed that this was fixed as of 3.2

Comment by auto [ 06/Oct/13 ]

Author:

{u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@10gen.com'}

Message: SERVER-11051 Ignore non-existent databases reported by listDatabases in disk/preallocate.js
Branch: master
https://github.com/mongodb/mongo/commit/31d759f0fc3ac453b5297df2012fce9c1118ce6f

Comment by auto [ 06/Oct/13 ]

Author:

{u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@10gen.com'}

Message: SERVER-11051 Ignore non-existent databases reported by listDatabases in disk/newcollection.js.
Branch: master
https://github.com/mongodb/mongo/commit/8aaf9fa86aeaeeeede230d8d80a20b22c97745ac

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