-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Integration
-
Fully Compatible
-
QI 2023-10-02, QI 2023-10-16
For find queries, a cursor is created if and only if the results don't fit inside a single batch.
However, for agg queries it appears a cursor is always created regardless of whether or not a further batch is required. We should change this for agg to mirror find behavior to not waste an unnecessary cursor.
Update:
- The default batch size is 101 docs or 16MB
- Walking through handleCursorCommand() could be a good starting point.
- Walking through how the find command does it is also a good starting point.
- related to
-
SERVER-77013 Expand jstest coverage to verify metrics are aggregated accurately
- Closed