Return-Path: X-Original-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3620D186C2 for ; Sun, 3 Jan 2016 23:09:41 +0000 (UTC) Received: (qmail 35440 invoked by uid 500); 3 Jan 2016 23:09:40 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 35384 invoked by uid 500); 3 Jan 2016 23:09:40 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-issues@hadoop.apache.org Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 35342 invoked by uid 99); 3 Jan 2016 23:09:40 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Jan 2016 23:09:40 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 046192C1F62 for ; Sun, 3 Jan 2016 23:09:40 +0000 (UTC) Date: Sun, 3 Jan 2016 23:09:40 +0000 (UTC) From: "Junping Du (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-6945) BlockManager should remove a block from excessReplicateMap and decrement ExcessBlocks metric when the block is removed 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/HDFS-6945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15080567#comment-15080567 ] Junping Du commented on HDFS-6945: ---------------------------------- I have cherry-pick the patch to branch-2.6. > BlockManager should remove a block from excessReplicateMap and decrement ExcessBlocks metric when the block is removed > ---------------------------------------------------------------------------------------------------------------------- > > Key: HDFS-6945 > URL: https://issues.apache.org/jira/browse/HDFS-6945 > Project: Hadoop HDFS > Issue Type: Bug > Components: namenode > Affects Versions: 2.5.0 > Reporter: Akira AJISAKA > Assignee: Akira AJISAKA > Priority: Critical > Labels: metrics > Fix For: 2.8.0, 2.7.2, 2.6.4 > > Attachments: HDFS-6945-003.patch, HDFS-6945-004.patch, HDFS-6945-005.patch, HDFS-6945.2.patch, HDFS-6945.patch > > > I'm seeing ExcessBlocks metric increases to more than 300K in some clusters, however, there are no over-replicated blocks (confirmed by fsck). > After a further research, I noticed when deleting a block, BlockManager does not remove the block from excessReplicateMap or decrement excessBlocksCount. > Usually the metric is decremented when processing block report, however, if the block has been deleted, BlockManager does not remove the block from excessReplicateMap or decrement the metric. > That way the metric and excessReplicateMap can increase infinitely (i.e. memory leak can occur). -- This message was sent by Atlassian JIRA (v6.3.4#6332)