Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
Signed-off-by: Kiran Prakash <awskiran@amazon.com>
  • Loading branch information
kiranprakash154 committed Apr 23, 2024
1 parent 9068227 commit 5a15c87
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ private void updateStaleCountOnEntryRemoval(CleanupKey cleanupKey, RemovalNotifi
// it should have already been accounted for and hence been removed from this map
// so decrement staleKeysCount
staleKeysCount.decrementAndGet();
// Returning null removes the entry for the shardId, if it exists
// Returning the current value null
return null;
} else {
// If it is in the map, it is not stale yet.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ public void testCacheCleanupBasedOnStaleThreshold_StalenessHigherThanThreshold()
cache.getOrCompute(getEntity(indexShard), getLoader(reader), reader, getTermBytes());
assertEquals(1, cache.count());

cache.getOrCompute(getEntity(indexShard), getLoader(reader), secondReader, getTermBytes());
cache.getOrCompute(getEntity(indexShard), getLoader(secondReader), secondReader, getTermBytes());
assertEquals(2, cache.count());

// no stale keys so far
Expand Down

0 comments on commit 5a15c87

Please sign in to comment.