[SERVER-6272] aggregation does not track memory usage on osx Created: 02/Jul/12  Updated: 10/Dec/14  Resolved: 17/Sep/13

Status: Closed
Project: Core Server
Component/s: Aggregation Framework
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Aaron Staple Assignee: Mathias Stearn
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-6862 improve usability of aggregation sort... Closed
Duplicate
duplicates SERVER-9444 Use new Sorter for Aggregation $sort ... Closed
Related
related to SERVER-6157 Refactor BSONObjExtSort Closed
Participants:

 Description   

Observed behavior: No memory assertion is triggered for a large $sort on osx.
Expected behavior: A memory assertion is triggered for a large $sort on osx, the same as on linux.

The reason seems to be that on osx SystemInfo::getPhysicalRam() returns 0, likely because systeminfo_none.cpp is used rather than the linux or win32 variants.

Test

c = db.c;
c.drop();
 
big = new Array( 10000 + 1 ).toString();
 
for( i = 0; i < 100000; ++i ) {
    c.save( { a:i, b:big } );
}
 
// This fails with a memory assertion on linux, but (eventually) generates a result on an osx box with the same amount of ram.
printjson( c.aggregate( { $sort:{ a:1 } }, { $limit:1 } ) );



 Comments   
Comment by Daniel Pasette (Inactive) [ 17/Sep/13 ]

this is a duplicate of SERVER-9444. No longer using OS specific code to calculate limits.

Comment by Aaron Staple [ 02/Jul/12 ]

Assigning to release candidate for triage.

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