From 5b085110677802d8ac01ec731794867fdc07ad38 Mon Sep 17 00:00:00 2001 From: Yang Wang Date: Fri, 8 Sep 2023 15:35:02 +1000 Subject: [PATCH] Update x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/support/CacheIteratorHelper.java Co-authored-by: Tim Vernum --- .../xpack/core/security/support/CacheIteratorHelper.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/support/CacheIteratorHelper.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/support/CacheIteratorHelper.java index 28b5a09f19f34..5b372ed91b7bf 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/support/CacheIteratorHelper.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/support/CacheIteratorHelper.java @@ -32,8 +32,7 @@ public CacheIteratorHelper(Cache cache) { // the lock is used in an odd manner; when iterating over the cache we cannot have modifiers other than deletes using the // iterator but when not iterating we can modify the cache without external locking. When making normal modifications to the cache // the read lock can be obtained so that we can allow concurrent modifications; however when we need to iterate over the keys or - // values - // of the cache the write lock must be obtained to prevent any modifications. + // values of the cache the write lock must be obtained to prevent any modifications. // Note - the write lock is needed for concurrent modifications across Cache#put and Cache#invalidateAll // see https://github.com/elastic/elasticsearch/issues/99326 for additional information updateLock = new ReleasableLock(lock.readLock());