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

Query during background index build can lead to suboptimal cached plan

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 3.6.9, 4.0.0-rc0
    • Querying
    • None
    • Fully Compatible
    • ALL
    • v3.6, v3.4
    • Query 2018-05-07, Query 2018-05-21

    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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: