[SERVER-50291] Add query knob to enumerate $or children in a different order Created: 13/Aug/20 Updated: 09/Nov/23 Resolved: 02/Sep/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | 3.6.6, 4.0.0 |
| Fix Version/s: | 4.7.0, 4.2.10, 4.4.2, 4.0.21 |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Charlie Swanson | Assignee: | Charlie Swanson |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||
| Backport Requested: |
v4.4, v4.2, v4.0, v3.6
|
||||||||||||||||||||||||
| Sprint: | Query 2020-08-24, Query 2020-09-07 | ||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Description |
|
As described in SERVER-36393 there are cases where we fail to enumerate some interesting plans because we limit the number of plans we generate for a contained $or. While not a complete solution, one suggestion for a workaround on that ticket was to add a way to enumerate the children of the $or in a different "more interesting" order. To quote:
This ticket tracks the work to implement that solution. |
| Comments |
| Comment by James Wahlin [ 03/Sep/20 ] |
|
charlie.swanson - this looks OK to backport. I agree that with the feature flag off the risk of introducing is minimal. |
| Comment by Charlie Swanson [ 02/Sep/20 ] |
|
james.wahlin can you take a look at the patch and let me know if you agree it is safe to backport? It's a lot of code for sure, but I think it's not too risky since it's all under a flag and the patch doesn't change much of the existing code. |
| Comment by Charlie Swanson [ 02/Sep/20 ] |
|
Accidentally committed this under the wrong ticket. Copying githook comment here. Author: {'name': 'Charlie Swanson', 'email': 'charlie.swanson@mongodb.com', 'username': 'cswanson310'}Message: SERVER-36393 Add new opt-in $or enumeration order |