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

"timeseries" is not a top-level field when running collStats on mongos

    • Fully Compatible
    • ALL
    • v5.0
    • Execution Team 2021-06-14, Execution Team 2021-06-28

      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.

            Assignee:
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Reporter:
            julia.ruddy@mongodb.com Julia Ruddy (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: