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 EC7DBDB9A for ; Wed, 27 Jun 2012 21:32:45 +0000 (UTC) Received: (qmail 38418 invoked by uid 500); 27 Jun 2012 21:32:45 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 38357 invoked by uid 500); 27 Jun 2012 21:32:45 -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 37628 invoked by uid 99); 27 Jun 2012 21:32:45 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Jun 2012 21:32:45 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id 096D3142849 for ; Wed, 27 Jun 2012 21:32:44 +0000 (UTC) Date: Wed, 27 Jun 2012 21:32:44 +0000 (UTC) From: "Todd Lipcon (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: <148695124.63845.1340832764040.JavaMail.jiratomcat@issues-vm> In-Reply-To: <4335590.3899.1331577879305.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (HDFS-3077) Quorum-based protocol for reading and writing edit logs 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-3077?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13402570#comment-13402570 ] Todd Lipcon commented on HDFS-3077: ----------------------------------- bq. This suffers from a TOCTTOU (time of check to time of use) race, since another client can come along and delete the file in between the file.exists() and new FileReader(). So since you'll need to handle the FileNotFoundException, I think you can then drop the file.exists() check. The problem is that Java throws FileNotFoundException for permissions errors or IO errors, too. And we don't want to return the default value in those cases. So I'd rather have the TOCTOU race, given that the assumption here is that the only process changing these files is the one calling this code. BTW, that code is from HDFS-3190 - probably best to comment on the JIRA associated with each piece of code. > Quorum-based protocol for reading and writing edit logs > ------------------------------------------------------- > > Key: HDFS-3077 > URL: https://issues.apache.org/jira/browse/HDFS-3077 > Project: Hadoop HDFS > Issue Type: New Feature > Components: ha, name-node > Reporter: Todd Lipcon > Assignee: Todd Lipcon > Attachments: hdfs-3077-partial.txt, hdfs-3077.txt, qjournal-design.pdf, qjournal-design.pdf > > > Currently, one of the weak points of the HA design is that it relies on shared storage such as an NFS filer for the shared edit log. One alternative that has been proposed is to depend on BookKeeper, a ZooKeeper subproject which provides a highly available replicated edit log on commodity hardware. This JIRA is to implement another alternative, based on a quorum commit protocol, integrated more tightly in HDFS and with the requirements driven only by HDFS's needs rather than more generic use cases. More details to follow. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira