Return-Path: Delivered-To: apmail-hadoop-hbase-dev-archive@minotaur.apache.org Received: (qmail 77496 invoked from network); 22 Mar 2010 18:03:51 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 22 Mar 2010 18:03:51 -0000 Received: (qmail 13237 invoked by uid 500); 22 Mar 2010 18:03:50 -0000 Delivered-To: apmail-hadoop-hbase-dev-archive@hadoop.apache.org Received: (qmail 13200 invoked by uid 500); 22 Mar 2010 18:03:50 -0000 Mailing-List: contact hbase-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hbase-dev@hadoop.apache.org Delivered-To: mailing list hbase-dev@hadoop.apache.org Received: (qmail 13192 invoked by uid 99); 22 Mar 2010 18:03:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Mar 2010 18:03:50 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED 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, 22 Mar 2010 18:03:48 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 47837234C1EF for ; Mon, 22 Mar 2010 18:03:27 +0000 (UTC) Message-ID: <2099053430.409071269281007291.JavaMail.jira@brutus.apache.org> Date: Mon, 22 Mar 2010 18:03:27 +0000 (UTC) From: "Cosmin Lehene (JIRA)" To: hbase-dev@hadoop.apache.org Subject: [jira] Created: (HBASE-2358) Store doReconstructionLog will fail if oldlogfile.log is empty and won't load region 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 Store doReconstructionLog will fail if oldlogfile.log is empty and won't load region ------------------------------------------------------------------------------------ Key: HBASE-2358 URL: https://issues.apache.org/jira/browse/HBASE-2358 Project: Hadoop HBase Issue Type: Bug Components: regionserver Affects Versions: 0.20.3 Environment: Any Reporter: Cosmin Lehene Assignee: Cosmin Lehene Fix For: 0.21.0 doReconstructionLog doesn't handle empty files correctly: {code} FileStatus stat = this.fs.getFileStatus(reconstructionLog); if (stat.getLen() <= 0) { LOG.warn("Passed reconstruction log " + reconstructionLog + " is zero-length. Deleting existing file"); fs.delete(reconstructionLog, false); return -1; } {code} Notice it actually compares the length of the array instead of the file length. It should call getLen() and delete the file afterwards {code} FileStatus stat = this.fs.getFileStatus(reconstructionLog); if (stat.getLen() <= 0) { LOG.warn("Passed reconstruction log " + reconstructionLog + " is zero-length. Deleting existing file"); fs.delete(reconstructionLog, false); return -1; } {code} Also. This is a situation that shouldn't happen as an empty oldlogfile.log should be deleted when HMaster does the split in HLog.splitLog(). I couldn't figure what would make it leave it there as I also see in the logs that other empty logs are deleted. This might expose a thornier situation. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.