chenxu14 commented on a change in pull request #479: HBASE-22802 Avoid temp ByteBuffer allocation in FileIOEngine#read URL: https://github.com/apache/hbase/pull/479#discussion_r317646441
########## File path: hbase-common/src/main/java/org/apache/hadoop/hbase/nio/ByteBuff.java ########## @@ -78,6 +79,23 @@ public boolean release() { return refCnt.release(); } + public RefCnt getRefCnt() { + return this.refCnt; + } + + /** + * BucketEntry use this to share refCnt with ByteBuff, so make the method public here, + * the upstream should not use this public method in other place, or the previous recycler + * will be lost. + */ + public void shareRefCnt(RefCnt refCnt, boolean replace) { Review comment: Sorry, there missing some conversations with @openinx We do this in order not to violate the LRU, when BucketCache#freeEntireBuckets is executed ---------------------------------------------------------------- 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