-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
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.
- backports
-
NODE-6347 Inconsistent results returned by find() query when using sort() and limit() with more than 10,000 records.
- Closed
- related to
-
SERVER-94821 Check collation correctness on collectionless pipelines with $lookup
- Backlog