[ https://issues.apache.org/jira/browse/HBASE-22480?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16969817#comment-16969817 ]
chenxu commented on HBASE-22480: -------------------------------- After reading the code, I have some doubt about HFileScannerImpl#updateCurrBlockRef {code:java} void updateCurrBlockRef(HFileBlock block) { if (block != null && curBlock != null && block.getOffset() == curBlock.getOffset()) { return; } if (this.curBlock != null && this.curBlock.isSharedMem()) { prevBlocks.add(this.curBlock); } this.curBlock = block; } {code} I know it has little to do with the current JIRA, It's just a question Should we put the new block into the prevBlocks if it has the same offset with the curBlock. Otherwise, we can't release it ? > 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 > Affects Versions: 2.2.2 > Reporter: Lijin Bin > Assignee: Lijin Bin > Priority: Major > Fix For: 3.0.0, 2.3.0, 2.2.3 > > Attachments: HBASE-22480-branch-2.2-v1.patch, > HBASE-22480-branch-2.2-v1.patch, HBASE-22480-branch-2.2-v1.patch, > HBASE-22480-branch-2.2-v2.patch, HBASE-22480-master-v1.patch, > HBASE-22480-master-v2.patch, HBASE-22480-master-v3.patch, > HBASE-22480-master-v4.patch, HBASE-22480-master-v5.patch, > HBASE-22480-master-v6.patch, HBASE-22480-master-v6.patch, > HBASE-22480-master-v6.patch, HBASE-22480-master-v7.patch, > HBASE-22480-master-v7.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 (v8.3.4#803005)