[SERVER-76952] Allow hash_agg stage to early terminate accumulator processing Created: 09/May/23  Updated: 29/Oct/23  Resolved: 16/May/23

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

Type: Improvement Priority: Major - P3
Reporter: Rui Liu Assignee: Projjal Chanda
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Problem/Incident
Assigned Teams:
Query Execution
Backwards Compatibility: Fully Compatible
Participants:
Linked BF Score: 35

 Description   

Right now the Classic engine has an optimization to early terminate the accumulator processing when the accumulator will no longer be affected, for example, $first and $firstN. This optimization is missing in SBE, which may cause unnecessary overhead including accumulator argument evaluation, extra VM calls and so on.



 Comments   
Comment by Githook User [ 15/May/23 ]

Author:

{'name': 'Projjal Chanda', 'email': 'projjal.chanda@mongodb.com', 'username': 'projjal'}

Message: SERVER-76952: Skip processing accumulator when the result is no longer affected
Branch: master
https://github.com/mongodb/mongo/commit/427574c5614a3a3587b4a6563823149d60e71543

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