Skip to content

Commit

Permalink
minor cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
kiranprakash154 committed Mar 13, 2024
1 parent 08937b6 commit 7ae0a0a
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ BytesReference getOrCompute(
BytesReference value = cache.computeIfAbsent(key, cacheLoader);
if (cacheLoader.isLoaded()) {
cacheEntity.onMiss();
// see if its the first time we see this reader, and make sure to register a cleanup key
// see if it's the first time we see this reader, and make sure to register a cleanup key
CleanupKey cleanupKey = new CleanupKey(cacheEntity, readerCacheKeyId);
if (!registeredClosedListeners.containsKey(cleanupKey)) {
Boolean previous = registeredClosedListeners.putIfAbsent(cleanupKey, Boolean.TRUE);
Expand Down Expand Up @@ -631,7 +631,8 @@ private boolean canSkipCacheCleanup(double cleanThresholdPercent) {
if (staleKeysInCachePercentage() < cleanThresholdPercent) {
if (logger.isDebugEnabled()) {
logger.debug(
"Skipping disk cache keys cleanup since the percentage of stale keys in disk cache is less than the threshold"
"Skipping cache cleanup since the percentage of stale keys is less than the threshold : "
+ stalenessThreshold
);
}
return true;
Expand Down

0 comments on commit 7ae0a0a

Please sign in to comment.