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

ShardRegistry can have a shard host mapped to a config shard

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

      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. repro.diff
          3 kB
        2. test.js
          2 kB

            Assignee:
            backlog-server-sharding [DO NOT USE] Backlog - Sharding Team
            Reporter:
            randolph@mongodb.com Randolph Tan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: