[SERVER-44015] MR Agg: Respect limit when no sort is specified Created: 15/Oct/19  Updated: 29/Oct/23  Resolved: 29/Oct/19

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.3.1

Type: Task Priority: Major - P3
Reporter: James Wahlin Assignee: Mihai Andrei
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Query 2019-11-04
Participants:

 Description   

MapReduce in agg currently ignores the 'limit' option specified on the command when no sort is provided.



 Comments   
Comment by Githook User [ 29/Oct/19 ]

Author:

{'email': 'mihai.andrei@mongodb.com', 'name': 'Mihai Andrei'}

Message: SERVER-44015 MR Agg: Respect limit when no sort is specified
Branch: master
https://github.com/mongodb/mongo/commit/ee2601dcb11cfd4a9cbaf927abd1d6487ea16024

Comment by James Wahlin [ 15/Oct/19 ]

Rather than supplying the limit to DocumentSourceSort on construction we should consider adding an explicit DocumentSourceLimit. This stage will be pushed down to query as part of the call to PipelineD::buildInnerQueryExecutorGeneric().

Generated at Thu Feb 08 05:04:44 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.