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

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 6.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • Execution Team 2022-06-27
    • None
    • None
    • None
    • None
    • None
    • None
    • None

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

            Assignee:
            Gregory Wlodarek
            Reporter:
            Gregory Wlodarek
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: