[SERVER-19835] SubplanStage should not cache plan for an individual $or branch if plans tie or there are no query results Created: 07/Aug/15 Updated: 19/Sep/15 Resolved: 11/Aug/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | 3.1.2 |
| Fix Version/s: | 3.1.7 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | David Storch | Assignee: | David Storch |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Sprint: | QuInt 8 08/28/15 | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
Versions 2.6.x and 3.0.x will not create a plan cache entry for a query shape if, during plan selection, either
The intention behind this behavior is that in these edge cases the system has low confidence that it has selected the best plan. In order to avoid re-using the wrong plan from the cache for a subsequent execution of the query shape, the system refrains from creating a potentially erroneous cache entry. In version 3.1.2 under However, due to a detail in the implementation of the SubplanStage, $or queries which use the subplan path do not benefit from We should correct this regression by re-introducing the "don't cache ties or zero result queries", just for queries that use the SubplanStage. |
| Comments |
| Comment by Githook User [ 11/Aug/15 ] |
|
Author: {u'username': u'dstorch', u'name': u'David Storch', u'email': u'david.storch@10gen.com'}Message: Since the SubplanStage does not benefit from the CachedPlanStage's replanning, it should not create |
| Comment by David Storch [ 07/Aug/15 ] |
|
Note that the work planned for this ticket is intended to provide a stopgap fix for the regression until we find a satisfactory solution for SERVER-18777. That is, a more complete fix would introduce the cached plan eviction and replanning logic to the SubplanStage. |