[SERVER-22175] DBConfig needs to lock mutex whenever accessing _primaryId or _shardingEnabled Created: 13/Jan/16  Updated: 25/Jan/17  Resolved: 19/Aug/16

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

Type: Bug Priority: Major - P3
Reporter: Randolph Tan Assignee: Randolph Tan
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-25699 Avoid making copies of ShardId in DBC... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding 2016-08-29
Participants:

 Description   

There are places where DBConfig::_lock mutex is held while reading/modifying these members and there are methods that just reference them without holding the mutex.



 Comments   
Comment by Githook User [ 19/Aug/16 ]

Author:

{u'username': u'renctan', u'name': u'Randolph Tan', u'email': u'randolph@10gen.com'}

Message: SERVER-22175 DBConfig needs to lock mutex whenever accessing _primaryId or _shardingEnabled
Branch: master
https://github.com/mongodb/mongo/commit/0b165e8a2b756c5c5fa8746df049f7b3253ec294

Comment by Randolph Tan [ 13/Jan/16 ]

Yes. There are some setter methods for it, and also whenever _load is called.

Comment by Spencer Brody (Inactive) [ 13/Jan/16 ]

renctan - can those values change once a DBConfig is constructed? If so then we probably need to be locking everywhere.

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