Details
-
Bug
-
Resolution: Done
-
Major - P3
-
2.2.0
-
None
-
Fully Compatible
-
ALL
Description
The MongoDataFile::makeRecord(DiskLoc dl, int size) method in src/mongo/db/pdfile.h does not use the 'size' argument that it is passed.
MongoDataFile::makeRecord() is identical to MongoDataFile::recordAt(DiskLoc dl) except for the additional, unused, 'size' parameter.
The only caller of MongoDataFile::makeRecord() is DataFileMgr::makeDeletedRecord(const DiskLoc& dl, int len), also in pdfile.h. makeDeletedRecord() ignores its incoming 'len' argument and passes sizeof(DeletedRecord) as the 'size' parameter to makeRecord() where, as noted above, the parameter is ignored.
MongoDataFile::makeRecord() should be removed. DataFileMgr::makeDeletedRecord() should give up its unused 'len' parameter and should call MongoDataFile::recordAt() instead of makeRecord().