Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-6272

aggregation does not track memory usage on osx

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major - P3
    • Resolution: Duplicate
    • None
    • None
    • Aggregation Framework
    • None

    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 } ) );

      Attachments

        Issue Links

          Activity

            People

              mathias@mongodb.com Mathias Stearn
              aaron Aaron Staple
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: