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

Check isMultikey() and getMultikeyPaths() consistency when preparing IndexEntry

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Optimization

      Problem

      Query planner relies on these methods from IndexCatalogEntry to prepare IndexEntry in QueryPlannerParams.

      However, if an index is corrupted as in HELP-65833 where isMultikey() may return false while getMultikeyPaths() returns a non-empty vector, a query planner may and hence produce incorrect results.

      Action Item

      • When preparing IndexEntry, if isMultikey() return false, also checks getMultikeyPaths() to see if it returns empty array. If not, set IndexEntry::isMultikey to true.
      • Log whenever it observes multikey path inconsistency from IndexCatalogEntry.

            Assignee:
            Unassigned Unassigned
            Reporter:
            chii.huang@mongodb.com Chi-I Huang
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated: