[SERVER-25935] move ShardRegistry::init() out of Grid::init() Created: 01/Sep/16  Updated: 07/Sep/16  Resolved: 07/Sep/16

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

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

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Sprint: Sharding 2016-09-19
Participants:
Linked BF Score: 0

 Comments   
Comment by Esha Maharishi (Inactive) [ 07/Sep/16 ]

The failure was due to a race between

1) ShardRegistry::init() being called before ShardRegistry is placed on the Grid
2) ShardRegistry::init() causing replicaSetChangeShardRegistryUpdateHook to be called, which tries to access ShardRegistry from the Grid.

I think the order of sharding component initialization should be cleaned up more cohesively, possibly in conjunction with dissolving Grid (SERVER-18084), so I'm closing this as Works as Designed for now.

Comment by Max Hirschhorn [ 04/Sep/16 ]

Reverted d1d57b9 due to the changes causing a segmentation fault in ShardRegistry::updateReplSetHosts() during mongos startup. Reopening so that these changes can get re-committed after that issue is addressed.

Comment by Githook User [ 04/Sep/16 ]

Author:

{u'username': u'visemet', u'name': u'Max Hirschhorn', u'email': u'max.hirschhorn@mongodb.com'}

Message: Revert "SERVER-25935 move ShardRegistry::init() out of Grid::init()"

This reverts commit d1d57b9ebab61ae897aaee624ca8df34399baa01.
Branch: master
https://github.com/mongodb/mongo/commit/eea8acf410705f8c25018babdcf4e7861eb7128e

Comment by Githook User [ 02/Sep/16 ]

Author:

{u'name': u'Esha Maharishi', u'email': u'esha.maharishi@mongodb.com'}

Message: SERVER-25935 move ShardRegistry::init() out of Grid::init()
Branch: master
https://github.com/mongodb/mongo/commit/d1d57b9ebab61ae897aaee624ca8df34399baa01

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