[SERVER-1344] listdatabases only shows unsharded dbs 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
admin
local
> use config
switched to db config
> db.databases.find()

{ "_id" : "admin", "partitioned" : false, "primary" : "config" } { "_id" : "foo", "partitioned" : true, "primary" : "shard0" } { "_id" : "bar", "partitioned" : true, "primary" : "shard0" } { "_id" : "baz", "partitioned" : true, "primary" : "shard0" } { "_id" : "blort", "partitioned" : true, "primary" : "shard0" } { "_id" : "db1", "partitioned" : true, "primary" : "shard0" } { "_id" : "db22", "partitioned" : true, "primary" : "shard0" } { "_id" : "db3", "partitioned" : true, "primary" : "shard0" }

> use x
switched to db x
> db.y.insert(

{x:1}

)
> show dbs
admin
local
x



 Comments   
Comment by Alberto Lerner [ 16/Jul/10 ]

> use config
switched to db config
> db.databases.find()

{ "_id" : "admin", "partitioned" : false, "primary" : "config" } { "_id" : "foo", "partitioned" : false, "primary" : "shard0" } { "_id" : "baz", "partitioned" : false, "primary" : "shard0" }

> use x
switched to db x
> db.y.insert(

{x:1}

)
> show dbs
admin
baz
foo
local
x
> quit()

      • Shutdown cluster and brought up
        (testing if state is persistent across crashes)

alerner@guaruja:~/Desktop/repo/head3$ ./mongo
MongoDB shell version: 1.5.5-pre-
connecting to: test
> show dbs
admin
baz
foo
local
x
>

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