Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 63EA217633 for ; Wed, 8 Apr 2015 23:19:13 +0000 (UTC) Received: (qmail 29028 invoked by uid 500); 8 Apr 2015 23:19:13 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 28978 invoked by uid 500); 8 Apr 2015 23:19:13 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 28966 invoked by uid 99); 8 Apr 2015 23:19:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Apr 2015 23:19:13 +0000 Date: Wed, 8 Apr 2015 23:19:13 +0000 (UTC) From: "zhangduo (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-13301) Possible memory leak in BucketCache MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HBASE-13301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14486301#comment-14486301 ] zhangduo commented on HBASE-13301: ---------------------------------- Will commit later if no objections. [~ndimiduk] [~enis] [~apurtell] OK to commit to branches other than master? Thanks. > 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 > Fix For: 2.0.0, 1.1.0, 0.98.13, 1.0.2 > > Attachments: HBASE-13301-testcase.patch, HBASE-13301-testcase_v1.patch, HBASE-13301.patch, HBASE-13301_v1.patch, HBASE-13301_v2.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)