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 97099963B for ; Tue, 6 Mar 2012 22:58:20 +0000 (UTC) Received: (qmail 32353 invoked by uid 500); 6 Mar 2012 22:58:20 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 32302 invoked by uid 500); 6 Mar 2012 22:58:20 -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 32292 invoked by uid 99); 6 Mar 2012 22:58:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Mar 2012 22:58:20 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Mar 2012 22:58:19 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 46687C6EE for ; Tue, 6 Mar 2012 22:57:59 +0000 (UTC) Date: Tue, 6 Mar 2012 22:57:59 +0000 (UTC) From: "Eli Collins (Commented) (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: <20250936.30127.1331074679289.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <400508306.3912.1328125138622.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (HDFS-2872) Add sanity checks during edits loading that generation stamps are non-decreasing 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-2872?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13223759#comment-13223759 ] Eli Collins commented on HDFS-2872: ----------------------------------- Some nits, otherwise looks great. - I'd throw IOE instead of InvalidGenStampException to be consisten with the rest of the method - You don't need to use StringBuilder since Java optimizes string concats and this code path is rarely run - The patch has uses tabs instead of spaces > Add sanity checks during edits loading that generation stamps are non-decreasing > -------------------------------------------------------------------------------- > > Key: HDFS-2872 > URL: https://issues.apache.org/jira/browse/HDFS-2872 > Project: Hadoop HDFS > Issue Type: Improvement > Components: name-node > Affects Versions: 1.0.0 > Reporter: Todd Lipcon > Assignee: Colin Patrick McCabe > Attachments: HDFS-2872-branch-1.patch, HDFS-2872-branch-1.patch2, HDFS-2872.patch > > > In 0.23 and later versions, we have a txid per edit, and the loading process verifies that there are no gaps. Lacking this in 1.0, we can use generation stamps as a proxy - the OP_SET_GENERATION_STAMP opcode should never result in a decreased genstamp. If it does, that would indicate that the edits are corrupt, or older edits are being applied to a newer checkpoint, for example. -- 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