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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: 1.8.2
    • Fix Version/s: 1.9.2
    • Component/s: Sharding
    • Labels:
      None
    • Operating System:
      ALL

      Description

      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
      }

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: