[SERVER-82038] cmdObj isn't needed for runAggregate if no cursor is opened Created: 10/Oct/23  Updated: 15/Dec/23  Resolved: 15/Dec/23

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

Type: Improvement Priority: Major - P3
Reporter: Will Buerger Assignee: Santiago Roche
Resolution: Fixed Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Query Integration
Backwards Compatibility: Fully Compatible
Participants:

 Description   

When running an aggregation pipeline over a view, we build the new AggregateCommandRequest with the resolved view and the original user-provided request. We then serialize the AggregateCommandRequest into a BSON cmdObj (here). In the IDHack path, this serialization takes somewhere around 1-2% of the query time, but the resulting cmdObj isn't actually necessary until a cursor is opened. We can avoid this time spent serializing if the results fit in one batch.



 Comments   
Comment by Githook User [ 14/Dec/23 ]

Author:

{'name': 'Santiago Roche', 'email': 'santiago.roche@mongodb.com', 'username': ''}

Message: SERVER-82038: Introduce lazy serialization of command when aggregating over view.

GitOrigin-RevId: 5f516f8473d2682bd45f023f74059a0c36872a2f
Branch: master
https://github.com/mongodb/mongo/commit/6ecbaa21dda219b38997d2d4302922f82a77d14d

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