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

Query executing during background index build completion can lead to suboptimal cached plan

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Query Optimization

      SERVER-32943 improved the timing of flushing the plan cache when building an index in the background. The associated test seems to indicate that the change addresses the case where the concurrent query finishes prior to the completion of the index build.

      There is another case that is presently not addressed. This would be when the query that gets replanned starts while the index build is still in progress but finishes after the index build completes. This situation can result in a suboptimal plan in the cache as described in the previous ticket requiring a manual flush of the plan cache. We should consider preventing those concurrent operations from caching or pursuing some other mitigation technique.

            Assignee:
            backlog-query-optimization [DO NOT USE] Backlog - Query Optimization
            Reporter:
            christopher.harris@mongodb.com Chris Harris
            Votes:
            0 Vote for this issue
            Watchers:
            14 Start watching this issue

              Created:
              Updated: