SERVER-136021ClosedFixed

Prevent interrupt delinquency in $group by checking for interrupt in the spill and merge loops

Analysis found unbounded check-free spans in the $group spill/merge paths: # *Classic merge loop* — {{GroupProcessor::getNextSpilled()}} ({{{}src/mongo/db/pipeline/group_processor.cpp{}}}, ~line 53): the {{while}} loop merging all spilled partials for one group id runs unbounded within a single call (each iteration = disk read + deserialize + accumulator merge). With low-cardinality keys and a large spill this is seconds to minutes without a check. Add a *direct, unamortized* {{_expCtx->getOpe

Affected Versions
Versions known to exhibit this issue

No affected versions recorded.

Fixed Versions
Versions that include the fix
9.1.0-rc09.1.0-rc1025
Components
Server components related to this issue

No components specified.

Labels
Tags and classification
auto-reverted