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

Investigate refactoring compound-indexing code to handle each index type in one place

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Storage Execution

      Currently, we instantiate one IndexAccessMethod-based class for each index. In the case of a compound index, that class must handle all types in the compound index. This means for each special index type, the code must also handle regular (ascending/descending) indexes. At a minimum, we might be able to refactor so that each implementation for handling regular indexes calls into the same helper methods.

      But it might prove more robust in the long-term if we refactor a bit higher up the stack. If, instead of instantiating a specialized IndexAccessMethod for each index, we were instead to have a generic top-level class which iterates over fields in an index, and calls specialized handlers based on the type of indexed field, we are likely to have less issues due to duplicated, subtly different code.

            Assignee:
            backlog-server-execution [DO NOT USE] Backlog - Storage Execution Team
            Reporter:
            dan.larkin-york@mongodb.com Dan Larkin-York
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: