diff --git a/server/src/main/java/org/opensearch/indices/IndicesRequestCache.java b/server/src/main/java/org/opensearch/indices/IndicesRequestCache.java index 35ca559a808fe..4a28ba8640b64 100644 --- a/server/src/main/java/org/opensearch/indices/IndicesRequestCache.java +++ b/server/src/main/java/org/opensearch/indices/IndicesRequestCache.java @@ -711,7 +711,6 @@ private synchronized void cleanCache(double stalenessThreshold) { } Set> dimensionListsToDrop = new HashSet<>(); - for (Iterator> iterator = cache.keys().iterator(); iterator.hasNext();) { ICacheKey key = iterator.next(); if (cleanupKeysFromClosedShards.contains(key.key.shardId)) {