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

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 2.3.1
    • 2.2.0
    • Internal Code
    • None
    • Fully Compatible
    • ALL

    Description

      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()).

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: