[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: Remove the unused 'extentLoc' argument from NamespaceDetails::alloc() |