[SERVER-35486] Create _addShard command on shard to drive shard initialization Created: 07/Jun/18  Updated: 29/Oct/23  Resolved: 13/Jun/18

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

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

Issue Links:
Depends
is depended on by SERVER-31586 Recreate PeriodicBalancerSettingsRefr... Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding 2018-06-18
Participants:

 Description   

Currently, when an addShard command is run, sharding initialization is triggered when the _configsvrAddShard command inserts a shard identity document on the shard. The shards OpObserver then sees it received the identity document and triggers sharding initialization, but because it is under a database lock, it cannot do any networking calls or I/O, which is a problem if we want to do any blocking operations to initialize a shard. 

The solution will be to create an _addShard command on the shard, which will be called from the config server. It will be responsible for inserting the shard identity document into itself, which will trigger the normal initialization. Then, we will be able to add any blocking calls we want from inside this command, after inserting that document. 



 Comments   
Comment by Githook User [ 13/Jun/18 ]

Author:

{'name': 'Matthew Saltz', 'email': 'matthew.saltz@mongodb.com'}

Message: SERVER-35486 Create _addShard command on shard to drive shard initialization
Branch: master
https://github.com/mongodb/mongo/commit/09919208ae16cd44f3ca3e98220e1cc322419a8a

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