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: Gone away
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Optimization
    • QO 2024-08-19, QO 2024-09-02, QO 2024-09-16, QO 2024-09-30

      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:
            william.qian@mongodb.com William Qian
            Reporter:
            christopher.harris@mongodb.com Chris Harris
            Votes:
            0 Vote for this issue
            Watchers:
            18 Start watching this issue

              Created:
              Updated:
              Resolved: