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

Invalidate SBE plan cache when any of the query knobs is changed

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • QE 2022-02-21, QE 2022-03-07
    • 35

      Some query knobs may change the semantics of generated plans that are stored in the cache. One way to deal with it would be to encode the values of such query knobs into the plan cache key and only invalidate the cache when any of these knobs is changed. This could be error prone if a new query knob is added in the future but a plan cache key encoding scheme is not updated.

      A safer approach would be to invalidate the cache when any of the query knobs is changed. Given that it's a relatively rare operation, it shouldn't cause too much operational disruption. With this approach all query knobs will have to have an on_update hook to flush the cache.

            Assignee:
            david.storch@mongodb.com David Storch
            Reporter:
            anton.korshunov@mongodb.com Anton Korshunov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: