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

Reload shard registry before attempting to get number of shards in ShardRegistry::getNumShards()

    • Type: Icon: Improvement Improvement
    • Resolution: Gone away
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.6.11, 4.0.9, 4.1.7
    • Component/s: Sharding
    • None

      If getNumShards() returns before the shard registry is populated, it's possible that it can incorrectly return that zero shards exist.

      This function is only used in one place.

      This ticket is simply to either:

      1. Remove this function and replace with getAllShardIds(), which does do a reload, or:
      2. Add a reload inside getNumShards() if the number turns out to be zero.

            Assignee:
            tommaso.tocci@mongodb.com Tommaso Tocci
            Reporter:
            blake.oler@mongodb.com Blake Oler
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: