[ 
https://issues.apache.org/jira/browse/HBASE-13301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14385138#comment-14385138
 ] 

Anoop Sam John commented on HBASE-13301:
----------------------------------------

In btw a context switch t1 completed the caching and done evict and again 
cached same block.. This seems rarest of rare case. So that is what I mean it 
might not happen in a real case. (Sorry withdraw wont happen :-) )

> Possible memory leak in BucketCache
> -----------------------------------
>
>                 Key: HBASE-13301
>                 URL: https://issues.apache.org/jira/browse/HBASE-13301
>             Project: HBase
>          Issue Type: Bug
>          Components: BlockCache
>            Reporter: zhangduo
>            Assignee: zhangduo
>         Attachments: HBASE-13301-testcase.patch
>
>
> {code:title=BucketCache.java}
> public boolean evictBlock(BlockCacheKey cacheKey) {
>       ...
>       if (bucketEntry.equals(backingMap.remove(cacheKey))) {
>         bucketAllocator.freeBlock(bucketEntry.offset());
>         realCacheSize.addAndGet(-1 * bucketEntry.getLength());
>         blocksByHFile.remove(cacheKey.getHfileName(), cacheKey);
>         if (removedBlock == null) {
>           this.blockNumber.decrementAndGet();
>         }
>       } else {
>         return false;
>       }
>       ...
> {code}
> I think the problem is here. We remove a BucketEntry that should not be 
> removed by us, but we do not put it back and also do not do any clean up.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to