chenxu14 commented on a change in pull request #467: HBASE-22802 Avoid temp 
ByteBuffer allocation in FileIOEngine#read
URL: https://github.com/apache/hbase/pull/467#discussion_r312779366
 
 

 ##########
 File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java
 ##########
 @@ -502,8 +504,10 @@ public Cacheable getBlock(BlockCacheKey key, boolean 
caching, boolean repeat,
           // block will use the refCnt of bucketEntry, which means if two 
HFileBlock mapping to
           // the same BucketEntry, then all of the three will share the same 
refCnt.
           Cacheable cachedBlock = ioEngine.read(bucketEntry);
-          // RPC start to reference, so retain here.
-          cachedBlock.retain();
+          if (ioEngine.usesSharedMemory()) {
 
 Review comment:
   The eviction policy will compare BucketEntry with it’s accessCounter, so 
this will not violate the LRU?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to