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

Make QueryPlannerParams to only be filled out on construction

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Fully Compatible

      Currently QueryPlannerParams can be in two states: initializes with only options or fully initializes with indexes being present and query settings / index filters being applied.

      This results in struggling, when reading the code and not being sure if indexes have already been fetched, resulting in unnecessary calls.

      While unnecessary calls should be eliminated as part of SERVER-86174, this ticket is supposed to refactor the QueryPlannerParams struct to be sure that if QueryPlannerParams are present, they are fully initialized.

      I think it also would be nice to not allow QueryPlannerParams declaration without invoking a dedicated constructor explicitly, to avoid confusion.

            Assignee:
            catalin.sumanaru@mongodb.com Catalin Sumanaru
            Reporter:
            denis.grebennicov@mongodb.com Denis Grebennicov
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: