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

db.collection.getShardDistribution() shows NaN

    • Fully Compatible
    • ALL
    • v4.2, v4.0
      1. Create a new collection
      2. Shard collection
      3. run `db.collection.getShardDistribution()`
      4. See `NaN` in aggregations

      Running `db.collection.getShardDistribution()` when collection has no documents shows `NaN` in several aggregations:

       

       mongos> db.labels_ng_1_1.getShardDistribution()
      
      Shard Prod-Shard_2 at Prod-Shard_2/shard:27018
       data : 0B docs : 0 chunks : 1
       estimated data per chunk : 0B
       estimated docs per chunk : 0Totals
       data : 0B docs : 0 chunks : 1
       Shard Prod-Shard_2 contains NaN% data, NaN% docs in cluster, avg obj size on shard : NaNGiB

            Assignee:
            randolph@mongodb.com Randolph Tan
            Reporter:
            pgilad Gilad Peleg
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: