QueryPlannerParams should not maintain pointers owned by the IndexCatalogEntry

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Query Optimization
    • Fully Compatible
    • ALL
    • v8.2, v8.0, v7.0
    • QO 2025-02-17
    • 0
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The QueryPlannerParams contains a CollectionInfo object which stores index information. The IndexEntry class stores some pointers taken from the IndexCatalogEntry class.

      If that IndexCatalogEntry is invalidated (likely due to a refreshEntry call) then these pointers will become invalid once the last reference to this shared state is released. This means that if there is a yield in the query which is using these QueryPlannerParams, the IndexCatalogEntry could be destroyed and some of the IndexEntry will become invalid.

        1. asan.txt
          68 kB
          Ben Shteinfeld
        2. diff.patch
          5 kB
          Allison Easton
        3. SERVER-105873 potential repro.txt
          536 kB
          Matt Boros

            Assignee:
            Ben Shteinfeld
            Reporter:
            Allison Easton
            Votes:
            0 Vote for this issue
            Watchers:
            20 Start watching this issue

              Created:
              Updated:
              Resolved: