-
Type:
Bug
-
Resolution: Done
-
Priority:
Minor - P4
-
None
-
Affects Version/s: 2.2.2
-
Component/s: Admin
-
None
-
Environment:Tested on Mac also reported on linux
-
Fully Compatible
-
ALL
-
None
-
3
-
None
-
None
-
None
-
None
-
None
-
None
After removing a replicaset member from a sharded server setup, db.stats continues to report the old replicaset information for the shard.
Initially reported here: https://groups.google.com/forum/?fromgroups=#!topic/mongodb-user/jRmxV0rujvc
mongos> use test switched to db test mongos> db.stats() { "raw" : { "s01/localhost:10010,localhost:10020,localhost:10030" : { "db" : "test", "collections" : 0, "objects" : 0, "avgObjSize" : 0, "dataSize" : 0, "storageSize" : 0, "numExtents" : 0, "indexes" : 0, "indexSize" : 0, "fileSize" : 0, "nsSizeMB" : 0, "ok" : 1 } }, "objects" : 0, "avgObjSize" : NaN, "dataSize" : 0, "storageSize" : 0, "numExtents" : 0, "indexes" : 0, "indexSize" : 0, "fileSize" : 0, "ok" : 1 } mongos> sh.status() --- Sharding Status --- sharding version: { "_id" : 1, "version" : 3 } shards: { "_id" : "s01", "host" : "s01/localhost:10010,localhost:10020,localhost:10030" } { "_id" : "s02", "host" : "s02/localhost:20010,localhost:20020,localhost:20030" } databases: { "_id" : "admin", "partitioned" : false, "primary" : "config" } { "_id" : "test", "partitioned" : true, "primary" : "s01" } mongos> bye 08:22:20 [jlee@Jeffs-MacBook-Air.local] - /Users/jlee $ mongo localhost:10010/admin --eval "rs.remove('localhost:10030')" MongoDB shell version: 2.2.2 connecting to: localhost:10010/admin Tue Jan 29 08:22:55 DBClientCursor::init call() failed Tue Jan 29 08:22:55 query failed : admin.$cmd { replSetReconfig: { _id: "s01", version: 2, members: [ { _id: 0, host: "localhost:10010" }, { _id: 1, host: "localhost:10020" } ] } } to: localhost:10010 Tue Jan 29 08:22:55 Error: error doing query: failed src/mongo/shell/collection.js:155 08:22:55 [jlee@Jeffs-MacBook-Air.local] - /Users/jlee $ mongo MongoDB shell version: 2.2.2 connecting to: test mongos> sh.status() --- Sharding Status --- sharding version: { "_id" : 1, "version" : 3 } shards: { "_id" : "s01", "host" : "s01/localhost:10010,localhost:10020" } { "_id" : "s02", "host" : "s02/localhost:20010,localhost:20020,localhost:20030" } databases: { "_id" : "admin", "partitioned" : false, "primary" : "config" } { "_id" : "test", "partitioned" : true, "primary" : "s01" } mongos> db.stats() { "raw" : { "s01/localhost:10010,localhost:10020,localhost:10030" : { "db" : "test", "collections" : 0, "objects" : 0, "avgObjSize" : 0, "dataSize" : 0, "storageSize" : 0, "numExtents" : 0, "indexes" : 0, "indexSize" : 0, "fileSize" : 0, "nsSizeMB" : 0, "ok" : 1 } }, "objects" : 0, "avgObjSize" : NaN, "dataSize" : 0, "storageSize" : 0, "numExtents" : 0, "indexes" : 0, "indexSize" : 0, "fileSize" : 0, "ok" : 1 }