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});

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.7.6
    • Affects Version/s: 1.6.5
    • Component/s: Admin
    • Labels:
      None
    • Environment:
      ubuntu
    • Linux

      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.

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

              Created:
              Updated:
              Resolved: