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

XMLWordPrintableJSON

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

      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 Marshall
            Reporter:
            Tad Marshall
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: