-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Execution
-
Fully Compatible
-
ALL
-
None
-
3
-
None
-
None
-
None
-
None
-
None
-
None
If a pipeline contains a $facet with a $bucketAuto stage that contains one of the custom accumulators, we can hit a tassert or return incorrect results (depending on the accumulator). Repro is linked in comments.
This only happens if the $internalFacetTeeConsumer stage returns a paused GetNextResult, which it does not always do (and if this comment isn't stale, I think this is the only time where we might get a paused GetNextResult). This is problematic because the function that generates the position keys resets its counter every time it is called (and if there is a paused result, we will call the function again once we resume). Maybe a quick fix would be to not reset that positional counter, but I'm not sure if there are other implications for that.