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

Newly added shards shouldn't get put into the mongos' shard lookup table until after creating a ReplicaSetMonitor for it

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.2.2, 2.3.2
    • Component/s: Sharding
    • Labels:
    • Sharding
    • ALL

      This could cause problems in other parts of the code that try to get that replica set's monitor and expect one to exist.

      The problem appears to be in StaticShardInfo.reload(). If a new shard was added via a different mongos, reload() will put the new shard's information into StaticShardInfo's data structures, _lookup and _rsLookup without creating a ReplicaSetMonitor for it first. Fix would be to check every shard getting added to see if it's connection string is of type SET, and if so call ReplicaSetMonitor::createIfNeeded on it's connection string.

            Assignee:
            backlog-server-sharding [DO NOT USE] Backlog - Sharding Team
            Reporter:
            spencer@mongodb.com Spencer Brody (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: