[SERVER-31231] prevent addShard and shardCollection from running concurrently with setFCV Created: 22/Sep/17 Updated: 30/Oct/23 Resolved: 09/Oct/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 3.5.13 |
| Fix Version/s: | 3.6.0-rc0 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Esha Maharishi (Inactive) | Assignee: | Esha Maharishi (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Sprint: | Sharding 2017-10-23 | ||||||||
| Participants: | |||||||||
| Description |
|
addShard (that is, the _configsvrAddShard command) sends setFeatureCompatibilityVersion to the to-be-added shard, to set the shard's FCV to match the cluster's. If addShard runs concurrently with setFCV, the added shard can end up with the wrong FCV: 1) setFCV="3.6" called against a mongos, which forwards _configsvrSetFCV to the config server This ticket should make the addShard command take the featureCompatibilityVersionLock ResourceMutex. Similarly, shardCollection (that is, the _configsvrShardCollection command) asks the primary shard for the collection's UUID, if the config server's FCV is 3.6 or is being upgraded to 3.6. If shardCollection runs concurrently with setFCV, the collection's entry in config.collections can end up without a UUID: 1) shardCollection checks FCV, sees that it is 3.4, so does not ask primary shard for a UUID |
| Comments |
| Comment by Githook User [ 09/Oct/17 ] |
|
Author: {'email': 'esha.maharishi@mongodb.com', 'name': 'Esha Maharishi', 'username': 'EshaMaharishi'}Message: |