Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-3539

mongos returns duplicate "ns" element when you run db.xyz.stats()

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.9.2
    • Affects Version/s: 1.8.2
    • Component/s: Sharding
    • None
    • ALL

      When you run db.xyz.stats() via mongos it returns duplicate "ns" element. In my test the xyz collection itself was not sharded. Here's the output I got:

      > var st = new ShardingTest("stest", 2, 0, 3);
      > var mongos = st.s;
      > var sdb = mongos.getDB("test")
      > sdb.test.insert(

      {x:1}

      ) // make sure collection exists
      > sdb.test.stats()
      {
      "ns" : "test.test",
      "sharded" : false,
      "primary" : "shard0001",
      "ns" : "test.test", // <=== duplicate "ns" element
      "count" : 1,
      "size" : 36,
      "avgObjSize" : 36,
      "storageSize" : 2048,
      "numExtents" : 1,
      "nindexes" : 1,
      "lastExtentSize" : 2048,
      "paddingFactor" : 1,
      "flags" : 1,
      "totalIndexSize" : 8192,
      "indexSizes" :

      { "_id_" : 8192 }

      ,
      "ok" : 1
      }

            Assignee:
            eliot Eliot Horowitz (Inactive)
            Reporter:
            robert@mongodb.com Robert Stam
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: