[SERVER-12091] Changing userCacheInvalidationIntervalSecs with setParameter doesn't take effect until the current interval finishes Created: 13/Dec/13 Updated: 11/Nov/14 Resolved: 20/Oct/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Security, Sharding, Usability |
| Affects Version/s: | 2.5.4 |
| Fix Version/s: | 2.7.8 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Spencer Brody (Inactive) | Assignee: | Spencer Brody (Inactive) |
| 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 | ||||||||
| Participants: | |||||||||
| Description |
|
By default, mongos invalidates its user cache every 10 minutes. It's possible to change this interval at runtime using the "userCacheInvalidationIntervalSecs" option to setParameter. The problem is that changing this value with setParameter doesn't wake up the invalidation thread if its already sleeping. This means that if you start up a new mongos and then immediately change its cache invalidation interval to something shorter than the 10 minute default, it is likely that the cache still won't be invalidated for almost 10 minutes, since the invalidation thread is already in the middle of a 10 minute sleep when you change the sleep interval. This could be fixed without too much work by changing the invalidation thread to sleep on a condition variable and by signaling that condvar whenever the "userCacheInvalidationIntervalSecs" value is changed. |
| Comments |
| Comment by Githook User [ 20/Oct/14 ] |
|
Author: {u'username': u'stbrody', u'name': u'Spencer T Brody', u'email': u'spencer@mongodb.com'}Message: |