-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Fully Compatible
-
ALL
-
v4.4
-
Query 2020-02-24, Query 2020-03-09, Query 2020-03-23, Query 2020-04-06
-
15
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.