Details
-
Bug
-
Resolution: Fixed
-
Major - P3
-
None
-
None
-
Fully Compatible
-
ALL
-
v4.4
-
Query 2020-02-24, Query 2020-03-09, Query 2020-03-23, Query 2020-04-06
-
15
Description
In some cases, ordering a $match in front of a $sort can require a second call to pipelineOptimize: the first call simplifies the $match, enabling the second call to recognize that the $match can be moved.
After SERVER-7568, it's possible for a sort to get pushed into the $cursor stage before the second call to pipelineOptimize, preventing the optimization from happening.