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

memory leak in the MultiPlanStage

    • Fully Compatible
    • ALL
    • Hide

      Run the following and watch the memory usage using a tool like "top":

      t.drop();
      t.ensureIndex({a: 1, b: 1});
      t.ensureIndex({a: 1, c: 1});
      t.insert({a: 1});
      for (var i = 0; i < 100000; i++) { t.find({a: 1}).explain(true); }
      
      Show
      Run the following and watch the memory usage using a tool like "top": t.drop(); t.ensureIndex({a: 1, b: 1}); t.ensureIndex({a: 1, c: 1}); t.insert({a: 1}); for ( var i = 0; i < 100000; i++) { t.find({a: 1}).explain( true ); }

      The MultiPlanStage deletes all pointers which it owns, except for the QuerySolution for the winning plan. The MultiPlanStage should either keep ownership of all QuerySolutions, or transfer ownership of the winning solution to the PlanExecutor.

      This issue affects 2.7 versions only, and does not affect any production releases.

            Assignee:
            david.storch@mongodb.com David Storch
            Reporter:
            david.storch@mongodb.com David Storch
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: