[SERVER-67897] replace removeShard using remove_shard_util.js in sharding jstests Created: 08/Jul/22  Updated: 29/Oct/23  Resolved: 26/Sep/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.2.0-rc0

Type: Task Priority: Major - P3
Reporter: Enrico Golfieri Assignee: Marcos José Grillo Ramirez
Resolution: Fixed Votes: 0
Labels: shardingemea-qw
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Sharding EMEA 2022-09-19, Sharding EMEA 2022-10-03
Participants:
Story Points: 1.5

 Description   

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



 Comments   
Comment by Githook User [ 26/Sep/22 ]

Author:

{'name': 'Marcos José Grillo Ramirez', 'email': 'marcos.grillo@mongodb.com', 'username': 'm4nti5'}

Message: SERVER-67897 Use remove_shard_util.js in tests that need to reliably remove a shard
Branch: master
https://github.com/mongodb/mongo/commit/cec86253e4200704cbd6d4d98e80384a2d57824a

Generated at Thu Feb 08 06:09:20 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.