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

replace removeShard using remove_shard_util.js in sharding jstests

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Fully Compatible
    • Sharding EMEA 2022-09-19, Sharding EMEA 2022-10-03
    • 1.5

      As mentioned in  SERVER-32553 removeShard in jstests can be problematic due to stepdown of the config server which may lead to a ShardNotFound.

      In several places a snipped code like the following https://github.com/10gen/mongo/blob/527dfe85a1771586339b34a177b3f7954aa2793b/jstests/sharding/data_size_aware_balancing_sessions_collection.js#L65-L82 has been used to prevent test from failing. 

      after SERVER-67734 a utility script was added https://github.com/10gen/mongo/blob/master/jstests/sharding/libs/remove_shard_util.js

      that allows you to safely run a removeShard until the process returns 'complete'

      all the snippet codes can now be safely replaced with the utility removeShard. 

      This should encourage developers to run the utility removeShard ad prevent another BF for the same reason

            Assignee:
            marcos.grillo@mongodb.com Marcos José Grillo Ramirez
            Reporter:
            enrico.golfieri@mongodb.com Enrico Golfieri
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: