wchevreuil commented on code in PR #5530: URL: https://github.com/apache/hbase/pull/5530#discussion_r1408399669
########## hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java: ########## @@ -642,12 +643,14 @@ void blockEvicted(BlockCacheKey cacheKey, BucketEntry bucketEntry, boolean decre blocksByHFile.remove(cacheKey); if (decrementBlockNumber) { this.blockNumber.decrement(); + if (ioEngine.isPersistent()) { + removeFileFromPrefetch(cacheKey.getHfileName()); + } } if (evictedByEvictionProcess) { cacheStats.evicted(bucketEntry.getCachedTime(), cacheKey.isPrimary()); Review Comment: Sorry, missed the previous comment. It was wrong to call the removeFileFromPrefetch if we are not decrementing the block number. In some occasions, we do replace the same block and call blockEvicted with decrementBlockNumber set to false. This means even though we evicted, we still have that block for the file and we shouldn't remove it from the list of fully cached files. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@hbase.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org