Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7.14] Fix the usage of CacheIteratorHelper for service account (#75510) #75765

Merged

Commits on Jul 28, 2021

  1. Fix the usage of CacheIteratorHelper for service account (elastic#75510)

    CacheIteratorHelper requires lock acquisition for any mutation to the
    underlying cache. This means it is incorrect to manipulate the cache
    without invocation of CacheIteratorHelper#acquireUpdateLock. This is OK
    for caches of simple values, but feels excessive for caches of
    ListenableFuture.
    
    This PR update the cache invalidation code to use cache.forEach instead
    of CacheInvalidator. It simplifies the code by removing any explicit
    lockings. The tradeoff is that it needs to build a list of keys to
    delete in memory. Overall it is a better tradeoff since no explicit
    locking is required and better leverage of Cache's own methods.
    ywangd authored and elasticsearchmachine committed Jul 28, 2021
    Configuration menu
    Copy the full SHA
    d49c79e View commit details
    Browse the repository at this point in the history