[SERVER-7438] NamespaceDetails::alloc()'s 'extentLoc' argument is unused by all callers, should be removed Created: 21/Oct/12  Updated: 11/Jul/16  Resolved: 27/Oct/12

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: 2.2.0
Fix Version/s: 2.3.1

Type: Bug Priority: Major - P3
Reporter: Tad Marshall Assignee: Tad Marshall
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

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



 Comments   
Comment by auto [ 27/Oct/12 ]

Author:

{u'date': u'2012-10-25T06:43:29-07:00', u'email': u'tad@10gen.com', u'name': u'Tad Marshall'}

Message: SERVER-7438 remove unused 'extentLoc' argument from two routines

Remove the unused 'extentLoc' argument from NamespaceDetails::alloc()
and outOfSpace().
Branch: master
https://github.com/mongodb/mongo/commit/9f6f027835114db83c2ff0e3091641d29ded2a08

Generated at Thu Feb 08 03:14:32 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.