-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.4.6
-
Component/s: None
-
None
-
ALL
-
mongos> sh.status() --- Sharding Status --- sharding version: { "_id" : 1, "version" : 3, "minCompatibleVersion" : 3, "currentVersion" : 4, "clusterId" : ObjectId("5279b89763d68b8d4364b20c") } shards: { "_id" : "shard0000", "host" : "Joannas-MacBook-Pro.local:27017" } { "_id" : "shard0001", "host" : "Joannas-MacBook-Pro.local:27018", "tags" : [ "a" ] } databases: { "_id" : "admin", "partitioned" : false, "primary" : "config" } { "_id" : "test", "partitioned" : true, "primary" : "shard0000" } test.foo shard key: { "_id" : 1 } chunks: shard0001 1 { "_id" : { "$minKey" : 1 } } -->> { "_id" : { "$maxKey" : 1 } } on : shard0001 Timestamp(2, 0) tag: a { "_id" : { "$minKey" : 1 } } -->> { "_id" : { "$maxKey" : 1 } }
I have a collection foo in database test, sharded, primary shard for the db is shard0000, but the collection has a tag range set so it lives on shard0001.
I can work with this collection, but it does not show up in show collections:
mongos> db.foo.save({a:1}) mongos> db.foo.find() { "_id" : ObjectId("5279b9e2972221f9a6cf650b"), "a" : 1 } mongos> show collections system.indexes mongos>
Turning on profiling for both mongoD's backing the shards, when issuing the show collections command I can see queries against test.system.namespaces on the primary shard
{ "op" : "query", "ns" : "test.system.namespaces", "query" : { }, "ntoreturn" : 0, "ntoskip" : 0, "nscanned" : 2, "keyUpdates" : 0, "numYield" : 0, "lockStats" : { "timeLockedMicros" : { "r" : NumberLong(55), "w" : NumberLong(0) }, "timeAcquiringMicros" : { "r" : NumberLong(6), "w" : NumberLong(4) } }, "nreturned" : 2, "responseLength" : 123, "millis" : 0, "ts" : ISODate("2013-11-06T05:25:04.283Z"), "client" : "127.0.0.1", "allUsers" : [ ], "user" : "" } { "op" : "query", "ns" : "test.system.namespaces", "query" : { }, "ntoreturn" : 0, "ntoskip" : 0, "nscanned" : 2, "keyUpdates" : 0, "numYield" : 0, "lockStats" : { "timeLockedMicros" : { "r" : NumberLong(50), "w" : NumberLong(0) }, "timeAcquiringMicros" : { "r" : NumberLong(6), "w" : NumberLong(3) } }, "nreturned" : 2, "responseLength" : 123, "millis" : 0, "ts" : ISODate("2013-11-06T05:25:05.650Z"), "client" : "127.0.0.1", "allUsers" : [ ], "user" : "" } { "op" : "query", "ns" : "test.system.namespaces", "query" : { }, "ntoreturn" : 0, "ntoskip" : 0, "nscanned" : 2, "keyUpdates" : 0, "numYield" : 0, "lockStats" : { "timeLockedMicros" : { "r" : NumberLong(53), "w" : NumberLong(0) }, "timeAcquiringMicros" : { "r" : NumberLong(6), "w" : NumberLong(3) } }, "nreturned" : 2, "responseLength" : 123, "millis" : 0, "ts" : ISODate("2013-11-06T05:25:07.002Z"), "client" : "127.0.0.1", "allUsers" : [ ], "user" : "" }
But no queries on the other shard.
I have attached a jstest tag_showcolls.js
- duplicates
-
SERVER-4232 `show collections` on mongos doesn't include sharded collections which are not present on the primary shard
- Closed