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

collStats scale argument does not apply to maxSize

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.8.0-rc4
    • Affects Version/s: 2.8.0-rc3
    • Component/s: Diagnostics
    • Labels:
      None
    • Minor Change
    • ALL
    • Hide

      Create a capped collection (or use the oplog as in the above example).

      Run collStats with and without a scale argument.

      See that maxSize is the same in both.

      Show
      Create a capped collection (or use the oplog as in the above example). Run collStats with and without a scale argument. See that maxSize is the same in both.

       db.runCommand({"collStats": "oplog.rs"})
      {
      	"ns" : "local.oplog.rs",
      	"count" : 1,
      	"size" : 88,
      	"avgObjSize" : 88,
      	"numExtents" : 1,
      	"storageSize" : 67108864,
      	"nindexes" : 0,
      	"lastExtentSize" : 67108864,
      	"paddingFactor" : 1,
      	"paddingFactorNote" : "paddingFactor is unused and unmaintained in 2.8. It remains hard coded to 1.0 for compatibility only.",
      	"userFlags" : 0,
      	"capped" : true,
      	"max" : NumberLong("9223372036854775807"),
      	"maxSize" : 67108864,
      	"totalIndexSize" : 0,
      	"indexSizes" : {
      		
      	},
      	"ok" : 1
      }
      
      db.runCommand({"collStats": "oplog.rs", scale: 1024})
      {
      	"ns" : "local.oplog.rs",
      	"count" : 1,
      	"size" : 0,
      	"avgObjSize" : 88,
      	"numExtents" : 1,
      	"storageSize" : 65536,
      	"nindexes" : 0,
      	"lastExtentSize" : 65536,
      	"paddingFactor" : 1,
      	"paddingFactorNote" : "paddingFactor is unused and unmaintained in 2.8. It remains hard coded to 1.0 for compatibility only.",
      	"userFlags" : 0,
      	"capped" : true,
      	"max" : NumberLong("9223372036854775807"),
      	"maxSize" : 67108864,
      	"totalIndexSize" : 0,
      	"indexSizes" : {
      		
      	},
      	"ok" : 1
      }
      

            Assignee:
            milkie@mongodb.com Eric Milkie
            Reporter:
            tim.olsen@mongodb.com Timothy Olsen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: