[SERVER-31860] setFCV on a cluster can fail to call setFCV on shards if the config server primary's ShardRegistry is empty Created: 07/Nov/17  Updated: 30/Oct/23  Resolved: 30/Nov/17

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 3.6.0-rc2
Fix Version/s: 3.6.3, 3.7.1

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

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v3.6
Sprint: Sharding 2017-11-13, Sharding 2017-12-04
Participants:
Linked BF Score: 0

 Description   

It's possible for the previous ShardRegistry reload to have failed (e.g., due to the majority snapshot not being available), and setFCV uses ShardRegistry::getAllShardIds(), which does not force a ShardRegistry reload.

We could band-aid this by adding a ShardRegistry reload before the ShardRegistry::getAllShardIds(), or we could force a reload inside getAllShardIds() (and maybe also ShardRegistry::getNumShards(), a similar function that has the same issue).



 Comments   
Comment by Githook User [ 16/Jan/18 ]

Author:

{'email': 'jack.mulrow@mongodb.com', 'name': 'Jack Mulrow', 'username': 'jsmulrow'}

Message: SERVER-31860 setFCV on config server should load shards directly from config.shards

(cherry picked from commit 0ac16524737f8331c8a116d15275975060dcb248)
Branch: v3.6
https://github.com/mongodb/mongo/commit/85cf50d91d71856d208858f1b0551ca76bf0e300

Comment by Githook User [ 30/Nov/17 ]

Author:

{'name': 'Jack Mulrow', 'username': 'jsmulrow', 'email': 'jack.mulrow@mongodb.com'}

Message: SERVER-31860 setFCV on config server should load shards directly from config.shards
Branch: master
https://github.com/mongodb/mongo/commit/0ac16524737f8331c8a116d15275975060dcb248

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