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

Division by 0 in dataSize command when collection has zero records

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 3.0.0
    • 3.3.11
    • Storage
    • None
    • Fully Compatible
    • ALL
    • TIG 18 (08/05/16)
    • 0

    Description

      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.

      Attachments

        Activity

          People

            isabella.siu@mongodb.com Isabella Siu (Inactive)
            kamran.khan Kamran K.
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: