-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
-
Fully Compatible
-
ALL
-
QO 2021-09-06
-
157
In sharded $lookup, when the from field of the $lookup is a sharded view and a CommandOnShardedViewNotSupported exception is generated to resolve the pipeline for this view, it is necessary to update the index of the match stage for the field join (_fieldMatchPipelineIdx) to the correct value.
The initial implementation incorrectly assumed that this stage would always be the last one in the pipeline. The solution is to update the old index of the match stage by adding the length of the view pipeline to it.