mongodbclojuremongo-shellmonger

Mongo DB dbStats collection count is incorrect


I have noticed that executing a dbStats command returns an incorrect number of collections.

For all databases, dbStats returns an extra collection. So for a database with 2 collections, dbStats will return 3.

The collection count error is consistent with both the mongo shell and using Monger (a clojure wrapper around the latest version MongoDB Java Driver).

Is this intentional behaviour or a bug in MongoDB?


Solution

  • This was raised as a bug - system.namespaces is included in the count but isn't actually included in the list of collections.

    https://jira.mongodb.org/browse/SERVER-1162