ShardRegistry can have a shard host mapped to a config shard

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Sharding
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      if the host:port combination originally refers to a config server node and later a shard node.

      To make it easier to catch this we should use unordered_map::insert when populating _hostLookup and add a warning if the insert was unsuccessful (when the host is aready in the map) here:
      https://github.com/mongodb/mongo/blob/r4.1.3/src/mongo/s/client/shard_registry.cpp#L593

      since this can mean that the host was part of another shard, otherwise it would have been removed here:
      https://github.com/mongodb/mongo/blob/r4.1.3/src/mongo/s/client/shard_registry.cpp#L567

        1. test.js
          2 kB
          Randolph Tan
        2. repro.diff
          3 kB
          Randolph Tan

            Assignee:
            [DO NOT USE] Backlog - Sharding Team
            Reporter:
            Randolph Tan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: