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

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • 2.2.2, 2.3.2
    • Sharding
    • Sharding
    • ALL

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: