Return-Path: Delivered-To: apmail-hadoop-hdfs-dev-archive@minotaur.apache.org Received: (qmail 88137 invoked from network); 19 Aug 2010 16:58:40 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 19 Aug 2010 16:58:40 -0000 Received: (qmail 76210 invoked by uid 500); 19 Aug 2010 16:58:40 -0000 Delivered-To: apmail-hadoop-hdfs-dev-archive@hadoop.apache.org Received: (qmail 76001 invoked by uid 500); 19 Aug 2010 16:58:39 -0000 Mailing-List: contact hdfs-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-dev@hadoop.apache.org Delivered-To: mailing list hdfs-dev@hadoop.apache.org Received: (qmail 75883 invoked by uid 99); 19 Aug 2010 16:58:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Aug 2010 16:58:39 +0000 X-ASF-Spam-Status: No, hits=-1996.4 required=10.0 tests=ALL_TRUSTED,FS_REPLICA X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Aug 2010 16:58:38 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o7JGwIXD005209 for ; Thu, 19 Aug 2010 16:58:18 GMT Message-ID: <33136188.450171282237098521.JavaMail.jira@thor> Date: Thu, 19 Aug 2010 12:58:18 -0400 (EDT) From: "Hairong Kuang (JIRA)" To: hdfs-dev@hadoop.apache.org Subject: [jira] Resolved: (HDFS-86) Corrupted blocks get deleted but not replicated 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-86?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hairong Kuang resolved HDFS-86. ------------------------------- Resolution: Invalid > Corrupted blocks get deleted but not replicated > ----------------------------------------------- > > Key: HDFS-86 > URL: https://issues.apache.org/jira/browse/HDFS-86 > Project: Hadoop HDFS > Issue Type: Bug > Reporter: Hairong Kuang > Assignee: Hairong Kuang > Attachments: blockInvalidate.patch > > > When I test the patch to HADOOP-1345 on a two node dfs cluster, I see that dfs correctly delete the corrupted replica and successfully retry reading from the other correct replica, but the block does not get replicated. The block remains with only 1 replica until the next block report comes in. > In my testcase, since the dfs cluster has only 2 datanodes, the target of replication is the same as the target of block invalidation. After poking the logs, I found out that the namenode sent the replication request before the block invalidation request. > This is because the namenode does not invalidate a block well. In FSNamesystem.invalidateBlock, it first puts the invalidate request in a queue and then immediately removes the replica from its state, which triggers the choosing a target for the block. When requests are sent back to the target datanode as a reply to a heartbeat message, the replication requests have higher priority than the invalidate requests. > This problem could be solved if a namenode removes an invalidated replica from its state only after the invalidate request is sent to the datanode. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.