refineCollectionShardKey should install authoritative shard catalog metadata on the DB primary even when it owns no chunks

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 9.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Catalog and Routing
    • Fully Compatible
    • CAR Team 2026-05-11
    • 200
    • 🟥 DDL
    • None
    • None
    • None
    • None
    • None
    • None

      On the authoritative shard-metadata path, refineCollectionShardKey only installs the post-DDL catalog/metadata on shards that own chunks of the new routing table. If the DB primary owns no chunks, its in-memory CSR and durable shard catalog stay at the pre-DDL shard version.

      This is a problem for various reasons:

      • checkShardFilteringMetadata flags the divergence between the global and the shard catalog.
      • If refine is transforming the collection metadata from non-authoritative to shard-authoritative, the primary may continue thinking that the collection is untracked when this is not true.

            Assignee:
            Silvia Surroca
            Reporter:
            Silvia Surroca
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: