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

$queryStats pipelines on mongos aren't optimized

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Query Integration
    • Fully Compatible
    • ALL
    • v8.0

      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:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: