Return-Path: Delivered-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Received: (qmail 66807 invoked from network); 17 Aug 2009 23:40:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 17 Aug 2009 23:40:20 -0000 Received: (qmail 20001 invoked by uid 500); 17 Aug 2009 23:40:39 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 19942 invoked by uid 500); 17 Aug 2009 23:40:39 -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 19932 invoked by uid 99); 17 Aug 2009 23:40:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Aug 2009 23:40:39 +0000 X-ASF-Spam-Status: No, hits=-1998.8 required=10.0 tests=ALL_TRUSTED,FS_REPLICA X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Aug 2009 23:40:36 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id DDE6329A0014 for ; Mon, 17 Aug 2009 16:40:14 -0700 (PDT) Message-ID: <1116343870.1250552414908.JavaMail.jira@brutus> Date: Mon, 17 Aug 2009 16:40:14 -0700 (PDT) From: "Hairong Kuang (JIRA)" To: hdfs-issues@hadoop.apache.org Subject: [jira] Updated: (HDFS-550) DataNode restarts may introduce corrupt/duplicated/lost replicas when handling detached replicas In-Reply-To: <992380908.1250551094805.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HDFS-550?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hairong Kuang updated HDFS-550: ------------------------------- Description: Current trunk first calls detach to unlinks a finalized replica before appending to this block. Unlink is done by temporally copying the block file in the "current" subtree to a directory called "detach" under the volume's daa directory and then copies it back when unlink succeeds. On datanode restarts, datanodes recover faied unlink by copying replicas under "detach" to "current". There are two bugs with this implementation: 1. The "detach" directory does not include in a snapshot. so rollback will cause the "detaching" replicas to be lost. 2. After a replica is copied to the "detach" directory, the information of its original location is lost. The current implementation erroneously assumes that the replica to be unlinked is under "current". This will make two instances of replicas with the same block id to coexist in a datanode. Also if a replica under "detach" is corrupt, the corrupt replica is moved to "current" without being detected, polluting datanode data. was: Current trunks calls first unlinks a finalized replica before appending to this block. Unlink is done by temporally copying the block file in the "current" subtree to a directory called "detach" under the volume's daa directory and then copies it back when unlink succeeds. On datanode restarts, datanodes recover faied unlink by copying replicas under "detach" to "current". There are two bugs with this implementation: 1. The "detach" directory does not include in a snapshot. so rollback will cause the "detaching" replicas to be lost. 2. After a replica is copied to the "detach" directory, the information of its original location is lost. The current implementation erroneously assumes that the replica to be unlinked is under "current". This will make two instances of replicas with the same block id coexist in a datanode. Also if the replica under "detach" is corrupt, the corrupt replica is moved to "current" without being detected, polluting datanode data. > DataNode restarts may introduce corrupt/duplicated/lost replicas when handling detached replicas > ------------------------------------------------------------------------------------------------ > > Key: HDFS-550 > URL: https://issues.apache.org/jira/browse/HDFS-550 > Project: Hadoop HDFS > Issue Type: Bug > Components: data-node > Affects Versions: 0.21.0 > Reporter: Hairong Kuang > Assignee: Hairong Kuang > Priority: Blocker > Fix For: Append Branch > > > Current trunk first calls detach to unlinks a finalized replica before appending to this block. Unlink is done by temporally copying the block file in the "current" subtree to a directory called "detach" under the volume's daa directory and then copies it back when unlink succeeds. On datanode restarts, datanodes recover faied unlink by copying replicas under "detach" to "current". > There are two bugs with this implementation: > 1. The "detach" directory does not include in a snapshot. so rollback will cause the "detaching" replicas to be lost. > 2. After a replica is copied to the "detach" directory, the information of its original location is lost. The current implementation erroneously assumes that the replica to be unlinked is under "current". This will make two instances of replicas with the same block id to coexist in a datanode. Also if a replica under "detach" is corrupt, the corrupt replica is moved to "current" without being detected, polluting datanode data. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.