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

avgObjSize return Nan instead of 0 when there are no objects and running db.runCommand( { dbStats: 1});

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 1.7.6
    • 1.6.5
    • Admin
    • None
    • ubuntu
    • Linux

    Description

      Assuming admin db has no objects try In the shell:
      > use admin;
      > db.runCommand(

      { dbStats: 1}

      );
      > db.runCommand(

      { dbStats: 1}

      );
      {
      "collections" : 0,
      "objects" : 0,
      "avgObjSize" : NaN,
      "dataSize" : 0,
      "storageSize" : 0,
      "numExtents" : 0,
      "indexes" : 0,
      "indexSize" : 0,
      "fileSize" : 0,
      "ok" : 1
      }

      avgObjSize should be 0 instead of NaN

      The binary part of the avgObjSize is:
      1,97,118,103,79,98,106,83,105,122,101,0,0,0,0,0,0,0,248,255

      0,0,0,0,0,0,248,255 is wrong.

      Attachments

        Activity

          People

            eliot Eliot Horowitz (Inactive)
            pablo pablo platt
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: