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

Race condition between addShard and ShardRegistry reload

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 3.2.5, 3.3.5
    • Fix Version/s: 3.2.8, 3.3.6
    • Component/s: Sharding
    • Labels:
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Completed:
    • Linked BF Score:
      0

      Description

      If one thread starts reloading the shard registry, all other calls to reload will block waiting for it to complete. If addShard runs concurrently with the reload, it is possible that the initial reload will not see the newly added shard and the reload initiated by addShard will do nothing, assuming that the first reload saw the latest state.

      This is a race condition, which can cause shardCollection calls with sharded key to not use newly added shards.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: