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

Relax maximum time for mongos cache invalidation propagation

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • Security 2022-02-21, Security 2022-05-02, Security 2022-05-16
    • 15

      The mongos_cache_invalidation.js test checks to see whether mongoses in a sharded cluster invalidate their user caches after various UMCs are run. It enforces that the invalidation must occur within 10 seconds, while each mongos polls the config server for user cache generation changes every 5 seconds. In order to test for invalidation, the test tries running update commands as the user whose privileges have been changed and expects to see the update fail after at most 10 seconds.

      This works the vast majority of the time, but occasionally the update command takes longer than expected (6-7 seconds). This is enough to run out the clock even if the cache is invalidated during the update. 

      In order to mitigate the odds of this happening, we should increase the time the test tries to assert the propagation for. Alternatively, the test could also sleep for a few seconds before the updates start to increase the odds of the invalidation occurring before the update commands start.

            Assignee:
            varun.ravichandran@mongodb.com Varun Ravichandran
            Reporter:
            varun.ravichandran@mongodb.com Varun Ravichandran
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: