$queryStats pipelines on mongos aren't optimized

XMLWordPrintableJSON

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

      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
            Reporter:
            Gil Alon
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: