[SERVER-32943] Query during background index build can lead to suboptimal cached plan Created: 27/Jan/18  Updated: 29/Oct/23  Resolved: 09/May/18

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: None
Fix Version/s: 3.6.9, 4.0.0-rc0

Type: Bug Priority: Major - P3
Reporter: Chris Harris Assignee: James Wahlin
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Related
related to SERVER-43624 Query executing during background ind... Backlog
is related to SERVER-34830 currentOp of replicated createIndexes... Closed
is related to SERVER-32452 Replanning may not occur when a plan ... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v3.6, v3.4
Sprint: Query 2018-05-07, Query 2018-05-21
Participants:
Case:

 Description   

Building an index flushes the plan cache. If a query which could leverage the new index executes while the background build is still in progress, the query will be planned without the ability to consider the new index as a candidate. This plan can then get cached and there will be no further flushing done as a result of the build process. Further, the index in the cached plan may not be as selective as the newly created one, therefore it may be hard to evict the old plan without manual intervention.



 Comments   
Comment by Githook User [ 20/Sep/18 ]

Author:

{'name': 'James Wahlin', 'email': 'james@mongodb.com', 'username': 'jameswahlin'}

Message: SERVER-32943 Query during background index build can lead to suboptimal cached plan

(cherry picked from commit 2f20acfd0d462e7f6c1c1c59bd562c883f1db55d)
Branch: v3.6
https://github.com/mongodb/mongo/commit/ac77dda1614b446e3772bd19cdee42735f2f0d7c

Comment by Githook User [ 09/May/18 ]

Author:

{'email': 'james@mongodb.com', 'name': 'James Wahlin', 'username': 'jameswahlin'}

Message: SERVER-32943 Query during background index build can lead to suboptimal cached plan
Branch: master
https://github.com/mongodb/mongo/commit/2f20acfd0d462e7f6c1c1c59bd562c883f1db55d

Generated at Thu Feb 08 04:31:47 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.