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

Serialize multiplanning for the same query shape

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Optimization
    • v8.0
    • CAR Team 2024-03-04, CAR Team 2024-03-18, CAR Team 2024-04-01, QE 2024-05-13, QE 2024-05-27, QE 2024-06-10, QE 2024-06-24, QE 2024-07-08, QE 2024-07-22, QE 2024-08-05

      We have observed a pattern (called "multi-plan storms") whereby many concurrent operations may engage in multi-planning for the same problematic query shape. Today it is possible that the sheer magnitude of work done as part of multi-planning these queries prevents the query subsystem from completing any of those plans, caching the winning plan, and speeding up future attempts to plan. This ticket covers introducing a serialization point in the multi-planner, loosely following pseudocode algorithm:

      • Ask plan cache for plan given shape
      • If “no plan available”, plan and put plan in cache
      • Else if “someone is planning that shape already” then “wait for plan on that shape”
      • Run

       

            Assignee:
            alexander.ignatyev@mongodb.com Alexander Ignatyev
            Reporter:
            matt.broadstone@mongodb.com Matt Broadstone
            Votes:
            2 Vote for this issue
            Watchers:
            35 Start watching this issue

              Created:
              Updated: