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

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 3.0.0
    • Fix Version/s: 3.3.11
    • Component/s: Storage
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Sprint:
      TIG 18 (08/05/16)
    • Linked BF Score:
      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

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

              Dates

              Created:
              Updated:
              Resolved: