Support QuerySettings under identity_views_passthrough by redirecting setQuerySettings/removeQuerySettings representative queries

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

      jstests/libs/override_methods/implicit_identity_views.js transparently redirects find/aggregate/count/distinct commands to a collection's identity view (<coll>_identity_view) by rewriting the target namespace in runCommandOverride. It does not currently do the same for setQuerySettings/removeQuerySettings, so a query-settings representative query registered against the real collection name computes a different query-shape hash than the identical query actually executed against the redirected view name, and the setting never resolves for that query.

      implicit_timeseries_collections.js already handles this for the timeseries passthrough: it intercepts setQuerySettings/removeQuerySettings in its runCommandOverride and applies the same transformation to the representative query that it applies to real queries (applyTimefieldProjectionToRepresentativeQuery), and it patches QuerySettingsUtils.prototype.getQueryShapeHashFromExplain/getQueryShapeHashFromQuerySettings the same way. This ticket is to add the analogous support to implicit_identity_views.js: intercept setQuerySettings/removeQuerySettings and append the same viewNameSuffix to the representative query's collection-name field, and patch the QuerySettingsUtils shape-hash helpers similarly, so that query settings correctly resolve for view-redirected queries.

      This would let query-settings tests that issue real (non-explain) queries drop the incompatible_with_views tag and gain coverage under identity_views_passthrough, matching the coverage timeseries-based query-settings tests already get under timeseries_crud_jscore_passthrough.

            Assignee:
            Unassigned
            Reporter:
            Daniel Tabacaru
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: