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

Conversation

elasticsearchmachine
Copy link
Collaborator

Backports the following commits to 7.14:

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 ywangd added auto-merge Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) v7.14.0 labels Jul 28, 2021
@elasticsearchmachine elasticsearchmachine merged commit 21b5a2d into elastic:7.14 Jul 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-merge Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport v7.14.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants