Update SHARDING_FILTER logic to support non-simple collation sharding

XMLWordPrintableJSON

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

      SPM-1930 will permit sharding with collation.

      Queries which specify (a superset of) the shard key in equalities (e.g., sharded on {a:1}, query of {a:"foobar"}) can normally be targeted to a single shard. However, if the query collation does not match the sharding collation, this is not possible.

      Prior to the fix for SERVER-94315 QueryPlannerParams::fillOutPlannerParamsForExpressQuery erroneously cleared INCLUDE_SHARD_FILTER in this case, leading to a query executing on multiple nodes, but with no shard filtering, leading to potential duplicate results from orphans.

      At the time of SERVER-94315, prior to SPM-1930, the only possible sharding collation was simple. Once SPM-1930 changes this, QueryPlannerParams::fillOutPlannerParamsForExpressQuery must be updated to reflect this.

              Assignee:
              Unassigned
              Reporter:
              James Harrison
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: