[SERVER-6710] memory owned by BSONObjExternalSorter may exceed _maxFilesize Created: 04/Aug/12  Updated: 30/Sep/13  Resolved: 30/Sep/13

Status: Closed
Project: Core Server
Component/s: Index Maintenance
Affects Version/s: None
Fix Version/s: None

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

Operating System: ALL
Participants:

 Description   

BSONObjExternalSorter::finishMap() calls _cur->clear(), which resets the _cur array's size but does not destroy the BSONObjs contained within it. The contained BSONObjs will be destroyed when their array locations are reassigned, but if new keys are larger than old keys some array locations may never be reassigned. Any such excess memory won't be counted in the _curSizeSoFar size and won't be freed until _cur is destroyed.

This is not likely to cause significant memory overhead but could in pathological cases.


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