Division by 0 in dataSize command when collection has zero records

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 3.3.11
    • Affects Version/s: 3.0.0
    • Component/s: Storage
    • None
    • Fully Compatible
    • ALL
    • TIG 18 (08/05/16)
    • 0
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      This bug has been present since 3.0.0. It affects the WiredTiger storage engine, but not the ephemeralForTest and mmapv1 storage engines.

      dbcommands.cpp:

      838    long long avgObjSize = collection->dataSize(txn) / collection->numRecords(txn);
      

      collection->numRecords() can return 0.

            Assignee:
            Isabella Siu (Inactive)
            Reporter:
            Kamran K. (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: