[SERVER-59570] Sharded view resolution in $lookup incorrectly updates index of match stage Created: 25/Aug/21 Updated: 29/Oct/23 Resolved: 26/Aug/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 5.1.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Alya Berciu | Assignee: | Alya Berciu |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Operating System: | ALL | ||||
| Sprint: | QO 2021-09-06 | ||||
| Participants: | |||||
| Linked BF Score: | 157 | ||||
| Description |
|
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. |
| Comments |
| Comment by Vivian Ge (Inactive) [ 06/Oct/21 ] |
|
Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you! |
| Comment by Githook User [ 26/Aug/21 ] |
|
Author: {'name': 'Alya Berciu', 'email': 'alyacarina@gmail.com', 'username': 'alyacb'}Message: |