hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
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 GMT
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) {



Mime
View raw message