[
https://issues.apache.org/jira/browse/HBASE-21957?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16815144#comment-16815144
]
Zheng Hu commented on HBASE-21957:
----------------------------------
Attached an simple desgin document here, because of its complexity. it also
will be an part of the doc for the parent issue, I mean I will write an doc for
the whole off-heap block reading in HBASE-21879.
> Unify refCount of BucketEntry and refCount of hbase.nio.ByteBuff into one
> -------------------------------------------------------------------------
>
> Key: HBASE-21957
> URL: https://issues.apache.org/jira/browse/HBASE-21957
> Project: HBase
> Issue Type: Sub-task
> Reporter: Zheng Hu
> Assignee: Zheng Hu
> Priority: Major
> Attachments: HBASE-21957-design.png
>
>
> After HBASE-12295, we have block with MemoryType.SHARED or
> MemoryType.EXCLUSIVE, the block in offheap BucketCache will be shared, and
> have an reference count to track its life cycle. If no rpc reference to the
> shared block, then the block can be evicted.
> while after the HBASE-21916, we introduced an refcount for ByteBuff, then I
> think we can unify the two into one. tried to fix this when preparing patch
> for HBASE-21879, but seems can be different sub-task, and it won't affect the
> main logic of HBASE-21879, so create a seperate one.
> !HBASE-21957-design.png!
> Attached an picture here, in general , for those HFileBlocks which is
> mapping to the same BucketEntry, they should share the same refCnt. That's
> to say, if an bucketEntry has a refCnt-a, then all HFileBlocks related to
> this bucket entry shoud also use this refCnt-a to track its memory.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)