hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject hbase git commit: HBASE-14317 Stuck FSHLog: bad disk (HDFS-8960) and can't roll WAL; addendum2 -- found a fix testing the branch-1 patch
Date Fri, 04 Sep 2015 07:40:45 GMT
Repository: hbase
Updated Branches:
  refs/heads/master 54717a631 -> ec4d719f1


HBASE-14317 Stuck FSHLog: bad disk (HDFS-8960) and can't roll WAL; addendum2 -- found a fix
testing the branch-1 patch


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/ec4d719f
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/ec4d719f
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/ec4d719f

Branch: refs/heads/master
Commit: ec4d719f1927576d3de321c2e380e4c4acd099db
Parents: 54717a6
Author: stack <stack@apache.org>
Authored: Fri Sep 4 00:40:32 2015 -0700
Committer: stack <stack@apache.org>
Committed: Fri Sep 4 00:40:32 2015 -0700

----------------------------------------------------------------------
 .../apache/hadoop/hbase/regionserver/wal/FSHLog.java | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/ec4d719f/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java
index 5708c30..c421f5c 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java
@@ -878,8 +878,19 @@ public class FSHLog implements WAL {
         // Let the writer thread go regardless, whether error or not.
         if (zigzagLatch != null) {
           zigzagLatch.releaseSafePoint();
-          // It will be null if we failed our wait on safe point above.
-          if (syncFuture != null) blockOnSync(syncFuture);
+          // syncFuture will be null if we failed our wait on safe point above. Otherwise,
if
+          // latch was obtained successfully, the sync we threw in either trigger the latch
or it
+          // got stamped with an exception because the WAL was damaged and we could not sync.
Now
+          // the write pipeline has been opened up again by releasing the safe point, process
the
+          // syncFuture we got above. This is probably a noop but it may be stale exception
from
+          // when old WAL was in place. Catch it if so.
+          if (syncFuture != null) {
+            try {
+              blockOnSync(syncFuture);
+            } catch (IOException ioe) {
+              if (LOG.isTraceEnabled()) LOG.trace("Stale sync exception", ioe);
+            }
+          }
         }
       } finally {
         scope.close();


Mime
View raw message