Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id DDA38200B29 for ; Thu, 30 Jun 2016 21:12:11 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id DA8FC160A6B; Thu, 30 Jun 2016 19:12:11 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 54C66160A06 for ; Thu, 30 Jun 2016 21:12:11 +0200 (CEST) Received: (qmail 88698 invoked by uid 500); 30 Jun 2016 19:12:10 -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 88679 invoked by uid 99); 30 Jun 2016 19:12:10 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Jun 2016 19:12:10 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 39A942C029F for ; Thu, 30 Jun 2016 19:12:10 +0000 (UTC) Date: Thu, 30 Jun 2016 19:12:10 +0000 (UTC) From: "Ted Yu (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-16157) The incorrect block cache count and size are caused by removing duplicate block key in the HBase LruBlockCache MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 30 Jun 2016 19:12:12 -0000 [ https://issues.apache.org/jira/browse/HBASE-16157?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15357668#comment-15357668 ] Ted Yu commented on HBASE-16157: -------------------------------- {code} 514 boolean find = map.remove(block.getCacheKey()) != null; {code} nit: name the variable found. You can use the following annotation for the two helper methods: {code} import com.google.common.annotations.VisibleForTesting; {code} > The incorrect block cache count and size are caused by removing duplicate block key in the HBase LruBlockCache > -------------------------------------------------------------------------------------------------------------- > > Key: HBASE-16157 > URL: https://issues.apache.org/jira/browse/HBASE-16157 > Project: HBase > Issue Type: Bug > Reporter: ChiaPing Tsai > Priority: Trivial > Attachments: HBASE-16157-v1.patch > > > {code:title=LruBlockCache.java|borderStyle=solid} > // Check return value from the Map#remove before updating the metrics > protected long evictBlock(LruCachedBlock block, boolean evictedByEvictionProcess) { > map.remove(block.getCacheKey()); > updateSizeMetrics(block, true); > ... > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)