Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-12091

Changing userCacheInvalidationIntervalSecs with setParameter doesn't take effect until the current interval finishes

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 2.7.8
    • 2.5.4
    • Security, Sharding, Usability
    • None
    • Fully Compatible
    • ALL

    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.

      Attachments

        Activity

          People

            spencer@mongodb.com Spencer Brody (Inactive)
            spencer@mongodb.com Spencer Brody (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: