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

'hasTwoOrMoreShards' cluster parameter can be incorrect if addShard/removeShard is interrupted and not retried

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Cluster Scalability
    • ALL

      The last step of addShard in 8.0 and removeShard in 8.1+ is updating the "hasTwoOrMoreShards" cluster parameter if the number of shards goes from 1 to 2 and from 2 back to 1. If there is an interrupt before that step and somehow addShard/removeShard doesn't get retried (e.g. the router exhausted the number of retries which is 3), the "hasTwoOrMoreShards" cluster parameter would be left with an incorrect value. In 8.0, "hasTwoOrMoreShards" is used to determine if the directShardOperation check should be performed on a shard. If "hasTwoOrMoreShards" is false when the number of shards in the cluster is greater or equal to 2, direct commands against one of those shards would incorrectly bypass the directShardOperation check. 

            Assignee:
            Unassigned Unassigned
            Reporter:
            jordi.serra-torrens@mongodb.com Jordi Serra Torrens
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: