Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-74311

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

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 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

      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@mongodb.com Wenqin Ye
            Reporter:
            jack.mulrow@mongodb.com Jack Mulrow
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: