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 88CDB11AAB for ; Wed, 20 Aug 2014 08:20:31 +0000 (UTC) Received: (qmail 94295 invoked by uid 500); 20 Aug 2014 08:20:26 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 94232 invoked by uid 500); 20 Aug 2014 08:20:26 -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 94062 invoked by uid 99); 20 Aug 2014 08:20:26 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Aug 2014 08:20:26 +0000 Date: Wed, 20 Aug 2014 08:20:26 +0000 (UTC) From: "Vinayakumar B (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-6870) Blocks and INodes could leak for Rename with overwrite flag 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-6870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14103599#comment-14103599 ] Vinayakumar B commented on HDFS-6870: ------------------------------------- patch looks good. +1 > Blocks and INodes could leak for Rename with overwrite flag > ----------------------------------------------------------- > > Key: HDFS-6870 > URL: https://issues.apache.org/jira/browse/HDFS-6870 > Project: Hadoop HDFS > Issue Type: Bug > Components: namenode > Reporter: Yi Liu > Assignee: Yi Liu > Attachments: HDFS-6870.001.patch > > > Following code in FSDirectory#unprotectedRenameTo doesn't collect blocks and INodes for non snapshot path. > {code} > if (removedDst != null) { > undoRemoveDst = false; > if (removedNum > 0) { > BlocksMapUpdateInfo collectedBlocks = new BlocksMapUpdateInfo(); > List removedINodes = new ChunkedArrayList(); > filesDeleted = removedDst.cleanSubtree(Snapshot.CURRENT_STATE_ID, > dstIIP.getLatestSnapshotId(), collectedBlocks, removedINodes, > true).get(Quota.NAMESPACE); > getFSNamesystem().removePathAndBlocks(src, collectedBlocks, > removedINodes, false); > } > } > {code} -- This message was sent by Atlassian JIRA (v6.2#6252)