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

chunhui shen commented on HBASE-11678:
--------------------------------------

[~stack]
We also encountered this bug recently. 
The entry will not been removed from ramCache if RAMQueueEntry#writeToCache 
throws exception, it will cause OOM.

About the patch, we should remove the failed entries from ramCache since these 
entries may always be failed. e.g. the size of entries bigger than BucketCache 
supported(2MB as default, see BucketAllocator#allocateBlock).

So, we should add removing code after doDrain:
{code}
+            if (LOG.isDebugEnabled() && countBefore != countAfter) {
+              LOG.debug("Failed drain all: countBefore=" + countBefore + ", 
countAfter=" +
+                countAfter);
+            }

+ for(RAMQueueEntry ramEntry : entries){
+ ramCache.remove(ramEntry.getKey());
+ }
{code}

> BucketCache ramCache fills heap after running a few hours
> ---------------------------------------------------------
>
>                 Key: HBASE-11678
>                 URL: https://issues.apache.org/jira/browse/HBASE-11678
>             Project: HBase
>          Issue Type: Bug
>          Components: BlockCache
>    Affects Versions: 0.99.0, 0.98.5, 2.0.0
>            Reporter: stack
>            Assignee: stack
>            Priority: Critical
>         Attachments: 
> 0001-When-we-failed-add-an-entry-failing-with-a-CacheFull.patch
>
>
> Testing BucketCache, my heap filled after running for hours. Dumping heap, 
> culprit is the ramCache Map in BucketCache.  Tried running with more writer 
> threads but made no difference.  Trying to figure now how our accounting is 
> going wonky.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to