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.
- is fixed by
-
SERVER-86174 Avoid unnecessary fillOutPlannerParams() and fillOutSecondaryCollectionsInformation() calls
- Closed