[SERVER-79373] Do not create a cursor in runAgg() if results can fit in a single batch Created: 26/Jul/23  Updated: 29/Oct/23  Resolved: 03/Oct/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.2.0-rc0

Type: Improvement Priority: Major - P3
Reporter: Maddie Zechar Assignee: Chris Wolff
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-77013 Expand jstest coverage to verify metr... Closed
Assigned Teams:
Query Integration
Backwards Compatibility: Fully Compatible
Sprint: QI 2023-10-02, QI 2023-10-16
Participants:

 Description   

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:



 Comments   
Comment by Githook User [ 03/Oct/23 ]

Author:

{'name': 'Christopher M. Wolff', 'email': 'chris.wolff@mongodb.com', 'username': 'wolffcm'}

Message: SERVER-79373 Do not create cursor for pipeline when unneeded
Branch: master
https://github.com/mongodb/mongo/commit/e5f80852fcabf21d0dde5769dbc6ac6ee291d521

Generated at Thu Feb 08 06:40:48 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.