- 
    Type:
Bug
 - 
    Resolution: Fixed
 - 
    Priority:
Major - P3
 - 
    Affects Version/s: None
 - 
    Component/s: None
 
- 
        Fully Compatible
 - 
        ALL
 - 
        v5.0
 - 
        Execution Team 2021-06-14, Execution Team 2021-06-28
 - 
        None
 
- 
        None
 - 
        None
 - 
        None
 - 
        None
 - 
        None
 - 
        None
 
When running db.runCommand( { collStats : "timeseries" } ) on a mongos for a time-series collection, the new timeseries field does not appear at the top-level. For replica sets and standalones, timeseries is a top-level field as shown below:
 {{ "ns" : "test.timeseries", "size" : 8154720, "timeseries" : { "bucketsNs" : "test.system.buckets.timeseries", "bucketCount" : 70, "avgBucketSize" : 116496, "numBucketInserts" : 0, "numBucketUpdates" : 0, "numBucketsOpenedDueToMetadata" : 0, "numBucketsClosedDueToCount" : 0, "numBucketsClosedDueToSize" : 0, "numBucketsClosedDueToTimeForward" : 0, "numBucketsClosedDueToTimeBackward" : 0, "numBucketsClosedDueToMemoryThreshold" : 0, "numCommits" : 0, "numWaits" : 0, "numMeasurementsCommitted" : 0 } ...}
However, for a mongos the timeseries field is only available nested within the shards field. For example:
{{ "sharded" : false, "primary" : "myShard_0", ... "shards" : { "myShard_0" : { "ns" : "test.ts", "size" : 0, "timeseries" : { "bucketsNs" : "test.system.buckets.ts", "bucketCount" : 0, "numBucketInserts" : 0, "numBucketUpdates" : 0, "numBucketsOpenedDueToMetadata" : 0, "numBucketsClosedDueToCount" : 0, "numBucketsClosedDueToSize" : 0, "numBucketsClosedDueToTimeForward" : 0, "numBucketsClosedDueToTimeBackward" : 0, "numBucketsClosedDueToMemoryThreshold" : 0, "numCommits" : 0, "numWaits" : 0, "numMeasurementsCommitted" : 0 }, ... }, ...} 
I would think the timeseries field would also be at the top-level similar to the ns, size, storageSize, totalIndexSize, totalSize, indexSizes etc fields. If this is expected behavior, however, feel free to close this ticket.
- is related to
 - 
                    
SERVER-57589 Enhance testing for cluster collStats and indexStats commands to ensure top-level 'timeseries' summation works
-         
 - Closed
 
 -