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

Fix plan cache problem in some js tests

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • Fully Compatible
    • ALL
    • QE 2025-03-17
    • 200
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      In index_filter_commands.js, plan_cache_clear.js and plan_cache_list_plans.js, we run the lookup query first, then run a explain for that query to get plan cache key, and use the key to retrieve from plan cache, this is usually fine because we always generate same plan for that query. 

      But sometime this assumption is wrong because the node may have stale routing info, foreign coll might be treated as non-local incorrectly, the SBE is not used for the lookup non-local foreign coll, but after routing info refreshed SBE might be used for the second explain query. (The lookup for the foreign coll fails first time due to stale info, but will be retried, so we can get the result successfully)

            Assignee:
            zixuan.zhuang@mongodb.com Zixuan Zhuang
            Reporter:
            zixuan.zhuang@mongodb.com Zixuan Zhuang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              None
              None
              None
              None