[SERVER-24213] Make addShard return success if attempting to add an already existing shard Created: 19/May/16  Updated: 25/Jan/17  Resolved: 08/Aug/16

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 3.3.11

Type: Task Priority: Major - P3
Reporter: Spencer Brody (Inactive) Assignee: Spencer Brody (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
related to SERVER-24214 Validate shardIdentity document of pr... Backlog
Backwards Compatibility: Minor Change
Sprint: Sharding 15 (06/03/16), Sharding 16 (06/24/16), Sharding 17 (07/15/16), Sharding 18 (08/05/16)
Participants:
Linked BF Score: 0

 Description   

Rather than failing with a 'shard already exists' error, addShard should return success if a shard with the same shard name and replica set name already exists. This makes addShard idempotent, which in turns makes it safe to be automatically retried on network errors.



 Comments   
Comment by Githook User [ 08/Aug/16 ]

Author:

{u'username': u'stbrody', u'name': u'Spencer T Brody', u'email': u'spencer@mongodb.com'}

Message: SERVER-24213 Make addShard return success if attempting to add an already existing shard
Branch: master
https://github.com/mongodb/mongo/commit/9597d67f9640b32fad2264c49da4ba0bd271d395

Comment by Githook User [ 21/Jul/16 ]

Author:

{u'username': u'stbrody', u'name': u'Spencer T Brody', u'email': u'spencer@mongodb.com'}

Message: SERVER-24213 Clean up failpoints for failing insert,update, and delete requests on mongods
Branch: master
https://github.com/mongodb/mongo/commit/c354229a6da64636d3aa8ce1bc6e25cf537f8154

Comment by Githook User [ 20/Jul/16 ]

Author:

{u'username': u'stbrody', u'name': u'Spencer T Brody', u'email': u'spencer@mongodb.com'}

Message: SERVER-24213 Rewrite add shard unit tests to use ConfigServerTestFixture

This makes the addShard unit tests run in an environment closer to how addShard works in reality,
because they will be using a ShardLocal for the config shard, backed by the ephemeralForTest storage
engine
Branch: master
https://github.com/mongodb/mongo/commit/1649926dcc1b9f14a10319cf171a55ce680fc278

Comment by Githook User [ 25/May/16 ]

Author:

{u'username': u'stbrody', u'name': u'Spencer T Brody', u'email': u'spencer@mongodb.com'}

Message: SERVER-24213 Retry addShard on network errors now that it has been made idempotent
Branch: master
https://github.com/mongodb/mongo/commit/783c30fe15471b08f5b216fb028f2664bd264f66

Comment by Githook User [ 25/May/16 ]

Author:

{u'username': u'stbrody', u'name': u'Spencer T Brody', u'email': u'spencer@mongodb.com'}

Message: SERVER-24213 Temporary hack to make successful addShard idempotent to unbreak the continuous stepdown suite
Branch: master
https://github.com/mongodb/mongo/commit/d37780177a363b6c9865409226b3953ad1fbd717

Generated at Thu Feb 08 04:05:42 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.