[SERVER-31760] Lookup sub-pipeline is not using index for equality match Created: 29/Oct/17 Updated: 23/Aug/18 Resolved: 04/Jan/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Aggregation Framework |
| Affects Version/s: | None |
| Fix Version/s: | 3.6.3, 3.7.1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Naveen | Assignee: | David Storch |
| Resolution: | Done | Votes: | 4 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
MongoDB server version: 3.6.0-rc1 |
||
| Issue Links: |
|
||||||||||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||||||||||||
| Backport Requested: |
v3.6
|
||||||||||||||||||||||||||||||||
| Sprint: | Query 2017-11-13, Query 2017-12-04, Query 2017-12-18, Query 2018-01-01, Query 2018-01-15 | ||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||
| Linked BF Score: | 0 | ||||||||||||||||||||||||||||||||
| Description |
|
I am doing following aggregation to join two collection using foreign pipeline.
|
| Comments |
| Comment by Trevor Wilson [ 23/Aug/18 ] |
|
I've found that $expr still does not use the correct index if it is a multi-key index. I've created a ticket here: |
| Comment by Asya Kamsky [ 15/Apr/18 ] |
|
Since this bug was fixed, aniket please open a new SERVER ticket indicating behavior which appears to be wrong. Please provide all information (exact aggregation, available indexes, relevant log lines). |
| Comment by aniket [ 14/Apr/18 ] |
|
I am still facing same issue with current stable vaersion 3.6.3. |
| Comment by Githook User [ 01/Feb/18 ] |
|
Author: {'email': 'david.storch@10gen.com', 'name': 'David Storch', 'username': 'dstorch'}Message: (cherry picked from commit 9282f7813d97756f0ab1e635d57e84b7145560d7) Conflicts: |
| Comment by Githook User [ 01/Feb/18 ] |
|
Author: {'email': 'david.storch@10gen.com', 'name': 'David Storch', 'username': 'dstorch'}Message: (cherry picked from commit 6699621bfb54174c7ee082ee85c62211788942c3) Conflicts: |
| Comment by Githook User [ 01/Feb/18 ] |
|
Author: {'email': 'david.storch@10gen.com', 'name': 'David Storch', 'username': 'dstorch'}Message: (cherry picked from commit 01c39d416435f930d249701ccb71744b519873b5) Conflicts: |
| Comment by Githook User [ 04/Jan/18 ] |
|
Author: {'name': 'David Storch', 'username': 'dstorch', 'email': 'david.storch@10gen.com'}Message: |
| Comment by Githook User [ 29/Dec/17 ] |
|
Author: {'name': 'David Storch', 'username': 'dstorch', 'email': 'david.storch@10gen.com'}Message: |
| Comment by Githook User [ 18/Dec/17 ] |
|
Author: {'name': 'David Storch', 'email': 'david.storch@10gen.com', 'username': 'dstorch'}Message: |
| Comment by James Wahlin [ 28/Nov/17 ] |
|
Hi Naveen, We are working on fixing this issue on our development branch (which is what "3.7 Desired" reflects). Once a fix is in place we will evaluate for backport to the 3.6 stable branch, which if green-lighted would be delivered in one of the 3.6 minor releases. Please continue to watch this ticket for updates. Thanks, |
| Comment by Naveen [ 28/Nov/17 ] |
|
Thanks James! Will the fix be available in 3.6? What is "3.7 Desired"? |
| Comment by James Wahlin [ 06/Nov/17 ] |
|
Hi Naveen, Thanks for reporting this issue. My apologies for the silence on this ticket. It is expected that $lookup with a foreign pipeline, which references a foreign dotted field path, will not use indexes in mongod version 3.6.0-rc1. This is the case when using $expr in a find command against a single collection as well. We recognize that this behavior is not ideal and are exploring the addition of index use for equality for 3.6.0, at least for the case where the foreign field is not of type array. We will use this ticket to track and will update when we have more information. Thanks, |