[
https://issues.apache.org/jira/browse/HBASE-22480?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16848768#comment-16848768
]
Zheng Hu commented on HBASE-22480:
----------------------------------
[~aoxiang], Nice finding, Thanks for your work. I'm also working on those
similar reference count issues in HBASE-22463 & HBASE-22422. IMO, the
curBlock shouldn't do the release
(same thing as the blockCache#returnBlock ) unless we shipped those cells to
rpc client or closed the HFileScanner, otherwise we're in the risk of depending
on some block which has been free (memory leak issues). Say we'd better to
handle like this(mean let the shipping or closing to return block the curBlock.
In my patch I introduced a releaseIfNotCurBlock method):
{code}
if(seekToBlock != this.curBlock){
reader.returnBlock(seekToBlock);
}
{code}
In general, very nice finding. I've also checked the HFileScannerImpl
carefully but didn't this bug in my patches before. Also FYI [~anoop.hbase] &
[~ram_krish], Thanks.
> Get block from BlockCache once and return this block to BlockCache twice make
> ref count error.
> ----------------------------------------------------------------------------------------------
>
> Key: HBASE-22480
> URL: https://issues.apache.org/jira/browse/HBASE-22480
> Project: HBase
> Issue Type: Sub-task
> Reporter: binlijin
> Assignee: binlijin
> Priority: Major
> Attachments: HBASE-22480-master-v1.patch
>
>
> After debugging HBASE-22433, i find the problem it is that we get a block
> from BucketCache once and return this block to BucketCache twice and make the
> ref count error, sometimes the refCount can be negative.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)