Add sanity check assertions that only a config server has config shard identity

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 7.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • Sharding NYC 2023-03-06, Sharding NYC 2023-03-20
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      As of SERVER-73865 the config server will have a shard identity document with "config" as its shard name. We reject adding a shard with that name if not using the transitionToCatalogShard command on the config server, but we should still have validation when inserting and loading the shard identity document to avoid problems from manual intervention.

      In particular:

      • When inserting a shard identity document, we should uassert (likely in the ShardServerOpObserver) that if the name is "config," the local node must have the config role, and if the name is not, it must not have the config role
      • When loading the shard identity document, we should uassert using the same logic (possibly when initializing from the shard identity), ie only allow "config" name on a config role node and require there is no config role for any other name

            Assignee:
            Wenqin Ye
            Reporter:
            Jack Mulrow
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: