[SERVER-76944] Correctly return bool in the prepSubNodes function in plan_enumerator.cpp Created: 09/May/23 Updated: 29/Oct/23 Resolved: 11/May/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.1.0-rc0, 7.0.0-rc2 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Adi Agrawal | Assignee: | Adi Agrawal |
| 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 | ||||||||
| Backport Requested: |
v7.0, v6.0, v5.0, v4.4
|
||||||||
| Participants: | |||||||||
| Linked BF Score: | 138 | ||||||||
| Description |
|
The plan_enumerator calls prepMemo here which calls prepSubNodes here. If we have a nested AND with a child that requires an index then in prepSubNodes, the parent node calls prepSubNodes here. It correctly recognizes that the subNode is mandatory and returns false, however the call to prepSubNodes is not returned, so it's lost. This can falsely indicate that an indexed plan is possible, when it is not. We should return the value here so it is propagated to prepMemo correctly. |
| Comments |
| Comment by Githook User [ 18/May/23 ] |
|
Author: {'name': 'Adityavardhan Agrawal', 'email': 'adi.agrawal@mongodb.com', 'username': 'Adityav369'}Message: (cherry picked from commit bb7468fd0c2f7f2e3bdd4561d2c906f9ebb007ab) |
| Comment by Githook User [ 11/May/23 ] |
|
Author: {'name': 'Adityavardhan Agrawal', 'email': 'adi.agrawal@mongodb.com', 'username': 'Adityav369'}Message: |