Return-Path: X-Original-To: apmail-hbase-commits-archive@www.apache.org Delivered-To: apmail-hbase-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3C2AB9976 for ; Fri, 23 Sep 2011 17:38:21 +0000 (UTC) Received: (qmail 73320 invoked by uid 500); 23 Sep 2011 17:38:21 -0000 Delivered-To: apmail-hbase-commits-archive@hbase.apache.org Received: (qmail 73297 invoked by uid 500); 23 Sep 2011 17:38:21 -0000 Mailing-List: contact commits-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list commits@hbase.apache.org Received: (qmail 73289 invoked by uid 99); 23 Sep 2011 17:38:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Sep 2011 17:38:21 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Sep 2011 17:38:19 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id DBA972388A32 for ; Fri, 23 Sep 2011 17:37:59 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1174906 - in /hbase/trunk: CHANGES.txt src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java Date: Fri, 23 Sep 2011 17:37:59 -0000 To: commits@hbase.apache.org From: stack@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20110923173759.DBA972388A32@eris.apache.org> Author: stack Date: Fri Sep 23 17:37:59 2011 New Revision: 1174906 URL: http://svn.apache.org/viewvc?rev=1174906&view=rev Log: HBASE-4387 Error while syncing: DFSOutputStream is closed Modified: hbase/trunk/CHANGES.txt hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java Modified: hbase/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/hbase/trunk/CHANGES.txt?rev=1174906&r1=1174905&r2=1174906&view=diff ============================================================================== --- hbase/trunk/CHANGES.txt (original) +++ hbase/trunk/CHANGES.txt Fri Sep 23 17:37:59 2011 @@ -296,6 +296,7 @@ Release 0.92.0 - Unreleased znode version mismatch (Ramkrishna) HBASE-4446 Rolling restart RSs scenario, regions could stay in OPENING state (Ming Ma) + HBASE-4387 Error while syncing: DFSOutputStream is closed TESTS HBASE-4450 test for number of blocks read: to serve as baseline for expected Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java?rev=1174906&r1=1174905&r2=1174906&view=diff ============================================================================== --- hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java (original) +++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java Fri Sep 23 17:37:59 2011 @@ -1061,8 +1061,17 @@ public class HLog implements Syncable { try { long now = System.currentTimeMillis(); // Done in parallel for all writer threads, thanks to HDFS-895 - this.writer.sync(); + boolean syncSuccessful = true; + try { + this.writer.sync(); + } catch(IOException io) { + syncSuccessful = false; + } synchronized (this.updateLock) { + if (!syncSuccessful) { + // HBASE-4387, retry with updateLock held + this.writer.sync(); + } syncTime += System.currentTimeMillis() - now; syncOps++; if (!this.logRollRunning) {