Prevent promotion to sharded with stale sharding metadata

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.3.0-rc0
    • Affects Version/s: 8.3.0-rc0
    • Component/s: None
    • None
    • Catalog and Routing
    • Minor Change
    • ALL
    • CAR Team 2026-01-19, CAR Team 2026-02-02
    • 200
    • 🟩 Routing and Topology
    • None
    • None
    • None
    • None
    • None
    • None

      In this ticket, we should add guardrails that prevent users from running addshard on the first shard if they have sharding metadata present.

      We should definitely disallow this if there is a prior shard identity present (this will likely break some tests, but is the best indicator that the replica set was previously a shard) and we should additionally check for the presence of any collections we know would be problematic, though it doesn't need to be exhaustive. Some examples would be config.collections and the db authoritative collections on shards.

            Assignee:
            Wolfee Farkas
            Reporter:
            Allison Easton
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: