[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: |
|
||||||||
| 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: |
| 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. |