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

Investigate CollectionImpl::averageObjectSize() computation when there are no records

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 6.1.0-rc0
    • None
    • None
    • None
    • Fully Compatible
    • Execution Team 2022-06-27

    Description

          inline int averageObjectSize(OperationContext* opCtx) const {
              uint64_t n = numRecords(opCtx);
       
              if (n == 0)
                  return 5;
              return static_cast<int>(dataSize(opCtx) / n);
          }
      

      Attachments

        Activity

          People

            gregory.wlodarek@mongodb.com Gregory Wlodarek
            gregory.wlodarek@mongodb.com Gregory Wlodarek
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: