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

$queryStats pipelines on mongos aren't optimized

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Integration
    • ALL

      Aggregations run using db.runCommand({aggregate: 1, pipeline:[]}) aren't optimized. We noticed this while running performance tests for $queryStats with $sort and $limit. The limit wasn't being absorbed into the sort, causing the sort to spill and erroring on mongos since mongos can't spill to disk. However, queryStats must run on mongos, which means this pipeline if the query stats store can't fit into memory will always fail.

      This problem probably affects all database aggregations run on mongos, but that needs to be confirmed.

            Assignee:
            mariano.shaar@mongodb.com Mariano Shaar
            Reporter:
            gil.alon@mongodb.com Gil Alon
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: