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

Force refresh on removeShard and addShard

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.4.0-rc7, 4.7.0
    • Affects Version/s: None
    • Component/s: Sharding
    • None
    • Fully Compatible
    • ALL
    • v4.4
    • Sharding 2020-06-01
    • 13

      Currently removeShard removes the entry in config.shards for the shard being removed and then calls ShardRegistry::reload(). It's possible that this reload actually joins an already running reload however, and so will still read in the entry just removed. We should check to see if the reload joined, and if so reload again.

      Also, addShard currently inserts an entry into config.shards and then calls ShardRegistry::getShard() which checks for an entry for this shard and if it does not find one, reloads. It's possible that there is an old entry for the same shard in the ShardRegistry though, so we may decide not reload and leave the ShardRegistry in a stale state until the next refresh. To be sure the ShardRegistry picks up the newest targeter and RSM, we should force a refresh after inserting the doc.

            Assignee:
            janna.golden@mongodb.com Janna Golden
            Reporter:
            janna.golden@mongodb.com Janna Golden
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: