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 3BB30D59C for ; Tue, 6 Nov 2012 02:56:15 +0000 (UTC) Received: (qmail 28958 invoked by uid 500); 6 Nov 2012 02:56:14 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 28844 invoked by uid 500); 6 Nov 2012 02:56:14 -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 28560 invoked by uid 99); 6 Nov 2012 02:56:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Nov 2012 02:56:13 +0000 Date: Tue, 6 Nov 2012 02:56:13 +0000 (UTC) From: "Aaron T. Myers (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: <935402231.72072.1352170573701.JavaMail.jiratomcat@arcas> In-Reply-To: <661656592.66588.1352073492142.JavaMail.jiratomcat@arcas> Subject: [jira] [Commented] (HDFS-4150) Update inode in blocksMap when deleting original/snapshot file 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-4150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13491158#comment-13491158 ] Aaron T. Myers commented on HDFS-4150: -------------------------------------- Hi Jing, in general the patch looks pretty good to me. I just have one little concern. There's two places where this patch contains code like this: {code} if (originalBlockInfo != null && toDelete == originalBlockInfo.getBlockCollection()) { {code} I'm concerned by the use of "==" here, instead of ".equals" or the like. Are we in fact guaranteed that the same actual object reference will be used in both places? (I think this is probably fine as-is, I just want to make sure.) Also, you might want to add a comment above this code saying why replacing the BlockCollection in the blocks map is appropriate in this case, i.e. in the case of a snapshot existing which still references this block. > Update inode in blocksMap when deleting original/snapshot file > -------------------------------------------------------------- > > Key: HDFS-4150 > URL: https://issues.apache.org/jira/browse/HDFS-4150 > Project: Hadoop HDFS > Issue Type: Sub-task > Components: data-node, name-node > Reporter: Jing Zhao > Assignee: Jing Zhao > Attachments: HDFS-4150.000.patch, HDFS-4150.001.patch, HDFS-4150.002.patch > > > When deleting a file/directory, instead of directly removing all the corresponding blocks, we should update inodes in blocksMap if there are snapshots for them. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira