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

NamespaceDetails::alloc()'s 'extentLoc' argument is unused by all callers, should be removed

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.3.1
    • Affects Version/s: 2.2.0
    • Component/s: Internal Code
    • Labels:
      None
    • Fully Compatible
    • ALL

      The NamespaceDetails::alloc() routine in src/mongo/db/namespace_details.cpp takes 'DiskLoc& extentLoc' as its third parameter. alloc() returns the DiskLoc of the extent in which it allocated a new record.

      None of the four callers of alloc() uses the returned value.

      This parameter should be removed.

      Likewise, outOfSpace() in src/mongo/db/pdfile.cpp also does not use this parameter and in fact takes this argument by value, so the value returned by alloc() is not made available to the (single) caller of outOfSpace() (allocateSpaceForANewRecord()).

            Assignee:
            tad Tad Marshall
            Reporter:
            tad Tad Marshall
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: