[SERVER-20976] Potential race in DBConfig::isSharded Created: 16/Oct/15  Updated: 27/Oct/15  Resolved: 19/Oct/15

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

Type: Bug Priority: Major - P3
Reporter: Misha Tyulenev Assignee: Kaloian Manassiev
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

https://github.com/mongodb/mongo/blob/268d7f361a5bf11f61b9cebab7ce2d9d86c5e14d/src/mongo/s/config.cpp#L149-L157

the first _shardingEnabled check can lead to a race. If this check does not need lock than then second check should be removed.



 Comments   
Comment by Githook User [ 19/Oct/15 ]

Author:

{u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}

Message: SERVER-20976 Check for sharding enable should be done under mutex
Branch: master
https://github.com/mongodb/mongo/commit/5dd28a39ea5f1d22003355fe532845f153236c83

Generated at Thu Feb 08 03:55:51 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.