Disallow compound wildcard indexes from being used as a shard key index

XMLWordPrintableJSON

    • Catalog and Routing
    • Fully Compatible
    • ALL
    • v8.2, v8.0, v7.0
    • CAR Team 2025-09-01, CAR Team 2025-09-15, CAR Team 2025-09-29
    • 🟥 DDL
    • None
    • None
    • None
    • None
    • None
    • None

      Some compound wildcard indexes can be used as the shard key index, when this is not supported and can lead to severe correctness issues. We should add validation to prevent this.

      In the repro attached, we see that when a collection is sharded and the shard key index has a wildcard component, documents can be missed in a full collection scan plan.

            Assignee:
            Silvia Surroca
            Reporter:
            Matt Boros
            Votes:
            0 Vote for this issue
            Watchers:
            26 Start watching this issue

              Created:
              Updated:
              Resolved: