[SERVER-57588] Inconsistent query results when an array position is indexed whose value is an array Created: 09/Jun/21 Updated: 29/Oct/23 Resolved: 22/Nov/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | 5.2.0, 5.1.2, 5.0.6, 4.4.11, 4.2.19 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Alex Bevilacqua | Assignee: | Timour Katchaounov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | query-director-triage | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Operating System: | ALL | ||||
| Backport Requested: |
v5.2, v5.1, v5.0, v4.4, v4.2, v4.0, v3.6
|
||||
| Sprint: | Query Optimization 2021-06-28, QO 2021-09-20, QO 2021-10-04, QO 2021-10-18, QO 2021-11-01, QO 2021-11-15, QO 2021-11-29 | ||||
| Participants: | |||||
| Description |
|
When indexing an array element by position (ex: {"a.0"}) if the value at the indexed position is an array, the index won't be multikey and can effect the result of a query if the index is selected as the winning plan.
Now if the following index is created and the operation run again the results are different:
|
| Comments |
| Comment by Timour Katchaounov [ 25/Feb/22 ] |
|
The last commit actually reverts another commit for which I incorrectly entered this ticket. |
| Comment by Githook User [ 25/Feb/22 ] |
|
Author: {'name': 'Timour Katchaounov', 'email': 'timour.katchaounov@mongodb.com', 'username': 'timourk'}Message: Revert " This reverts commit ad12685ff33131f95053dc567639312999957475 due to incorrect git message. |
| Comment by Githook User [ 23/Feb/22 ] |
|
Author: {'name': 'Timour Katchaounov', 'email': 'timour.katchaounov@mongodb.com', 'username': 'timourk'}Message: (cherry picked from commit 90699509e15b33fda10832e79efcd158aee1f0eb) |
| Comment by Githook User [ 12/Jan/22 ] |
|
Author: {'name': 'Timour Katchaounov', 'email': 'timour.katchaounov@mongodb.com', 'username': 'timourk'}Message: (cherry picked from commit 90699509e15b33fda10832e79efcd158aee1f0eb) |
| Comment by Githook User [ 21/Dec/21 ] |
|
Author: {'name': 'Timour Katchaounov', 'email': 'timour.katchaounov@mongodb.com', 'username': 'timourk'}Message: (cherry picked from commit 90699509e15b33fda10832e79efcd158aee1f0eb) |
| Comment by Githook User [ 20/Dec/21 ] |
|
Author: {'name': 'Timour Katchaounov', 'email': 'timour.katchaounov@mongodb.com', 'username': 'timourk'}Message: (cherry picked from commit 90699509e15b33fda10832e79efcd158aee1f0eb) |
| Comment by Githook User [ 20/Dec/21 ] |
|
Author: {'name': 'Timour Katchaounov', 'email': 'timour.katchaounov@mongodb.com', 'username': 'timourk'}Message: (cherry picked from commit 90699509e15b33fda10832e79efcd158aee1f0eb) |
| Comment by Githook User [ 22/Nov/21 ] |
|
Author: {'name': 'Timour Katchaounov', 'email': 'timour.katchaounov@mongodb.com', 'username': 'timourk'}Message: |
| Comment by Timour Katchaounov [ 22/Nov/21 ] |
|
This bug is present in all versions from 3.6 up. Let me know if it should be backported and how far back. |