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 BE4B511885 for ; Mon, 13 May 2013 17:27:40 +0000 (UTC) Received: (qmail 24376 invoked by uid 500); 13 May 2013 17:27:18 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 24316 invoked by uid 500); 13 May 2013 17:27:18 -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 24258 invoked by uid 99); 13 May 2013 17:27:18 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 May 2013 17:27:18 +0000 Date: Mon, 13 May 2013 17:27:18 +0000 (UTC) From: "Aaron T. Myers (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-4300) TransferFsImage.downloadEditsToStorage should use a tmp file for destination 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-4300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13656151#comment-13656151 ] Aaron T. Myers commented on HDFS-4300: -------------------------------------- +1, the latest patch looks good to me. I'm going to commit this momentarily. > TransferFsImage.downloadEditsToStorage should use a tmp file for destination > ---------------------------------------------------------------------------- > > Key: HDFS-4300 > URL: https://issues.apache.org/jira/browse/HDFS-4300 > Project: Hadoop HDFS > Issue Type: Bug > Affects Versions: 2.0.2-alpha > Reporter: Todd Lipcon > Assignee: Andrew Wang > Priority: Critical > Attachments: hdfs-4300-1.patch, hdfs-4300-2.patch, hdfs-4300-3.patch, hdfs-4300-4.patch, hdfs-4300-5.patch > > > Currently, in TransferFsImage.downloadEditsToStorage, we download the edits file directly to its finalized path. So, if the transfer fails in the middle, a half-written file is left and cannot be distinguished from a correct file. So, future checkpoints by the 2NN will fail, since the file is truncated in the middle -- but it won't ever download a good copy because it thinks it already has the proper file. -- 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