Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-32943

Query during background index build can lead to suboptimal cached plan

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.6.9, 4.0.0-rc0
    • Affects Version/s: None
    • Component/s: Querying
    • None
    • Fully Compatible
    • ALL
    • v3.6, v3.4
    • Query 2018-05-07, Query 2018-05-21

      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.

            Assignee:
            james.wahlin@mongodb.com James Wahlin
            Reporter:
            christopher.harris@mongodb.com Chris Harris
            Votes:
            0 Vote for this issue
            Watchers:
            14 Start watching this issue

              Created:
              Updated:
              Resolved: