[SERVER-60068] Avoid calls to fillOutPlannerParams() unless a replan is triggered Created: 19/Sep/21 Updated: 29/Oct/23 Resolved: 24/Mar/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 6.0.0-rc0 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Anton Korshunov | Assignee: | Ruoxin Xu |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Sprint: | QO 2021-11-29, QO 2021-12-13, QO 2021-12-27, QO 2022-01-10, QO 2022-01-24, QO 2022-02-07, QO 2022-02-21, QO 2022-03-07, QO 2022-03-21, QO 2022-04-04 | ||||||||||||
| Participants: | |||||||||||||
| Linked BF Score: | 135 | ||||||||||||
| Description |
|
Currently we call fillOutPlannerParams() in the early stage of PrepareExecutionHelper::prepare() call. However, if we're about to recover the plan from the cache and not going to replan, this call is totally unnecessary as we're not going to call the the query planner. Given that this call is quite expensive, we should delay it until we know that we're going to replan. |
| Comments |
| Comment by Githook User [ 28/Mar/22 ] |
|
Author: {'name': 'Rui Liu', 'email': 'rui.liu@mongodb.com', 'username': 'lriuui0x0'}Message: |
| Comment by Githook User [ 24/Mar/22 ] |
|
Author: {'name': 'Ruoxin Xu', 'email': 'ruoxin.xu@mongodb.com', 'username': 'RuoxinXu'}Message: |
| Comment by Ruoxin Xu [ 24/Mar/22 ] |
|
In this ticket, we discovered a bug/inconsistency between find queries and distinct queries - distinct commands will always inherit collation from the collection if there’s no specified collation before the resolution of the index filters. Whereas find commands don’t do the same. This ticket fixed the bug by changing the behaviour of distinct command when working with index filters and collations. Prior to this ticket, it matters if distinct commands inherit the collation from the collection. After this ticket the resolution of index filters will only take into account the collations explicitly specified by the users no matter what the collection’s collation is. The behaviour above is not documented. There are some other related changes introduced by |
| Comment by Githook User [ 24/Mar/22 ] |
|
Author: {'name': 'Ruoxin Xu', 'email': 'ruoxin.xu@mongodb.com', 'username': 'RuoxinXu'}Message: |