Skip to content

Commit b07278f

Browse files
Update IndicesRequestCache.java
Signed-off-by: Kiran Prakash <[email protected]>
1 parent a3c12cd commit b07278f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

server/src/main/java/org/opensearch/indices/IndicesRequestCache.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ public final class IndicesRequestCache implements RemovalListener<ICacheKey<Indi
155155
private final Function<ShardId, Optional<CacheEntity>> cacheEntityLookup;
156156
// pkg-private for testing
157157
final IndicesRequestCacheCleanupManager cacheCleanupManager;
158+
158159
// These values determine the valid names for levels in the cache stats API
159160
public static final String SHARD_ID_DIMENSION_NAME = "shards";
160161
public static final String INDEX_DIMENSION_NAME = "indices";
@@ -532,7 +533,7 @@ void enqueueCleanupKey(CleanupKey cleanupKey) {
532533
* @param cleanupKey the CleanupKey to be updated in the map
533534
*/
534535
private void updateStaleCountOnCacheInsert(CleanupKey cleanupKey) {
535-
if (stalenessThreshold == 0.0 || cleanupKey.entity == null) {
536+
if (cleanupKey.entity == null) {
536537
return;
537538
}
538539
IndexShard indexShard = (IndexShard) cleanupKey.entity.getCacheIdentity();

0 commit comments

Comments
 (0)