You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ap...@apache.org on 2018/07/30 21:04:03 UTC

[4/4] hbase git commit: HBASE-20974 Backport HBASE-20583 (SplitLogWorker should handle FileNotFoundException when split a wal) to branch-1 (Pankaj Kumar)

HBASE-20974 Backport HBASE-20583 (SplitLogWorker should handle FileNotFoundException when split a wal) to branch-1 (Pankaj Kumar)


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

Branch: refs/heads/branch-1.2
Commit: 5eb4c5668841f501481bf85d54fde34bccaa4e96
Parents: b3fd08e
Author: Andrew Purtell <ap...@apache.org>
Authored: Mon Jul 30 12:34:45 2018 -0700
Committer: Andrew Purtell <ap...@apache.org>
Committed: Mon Jul 30 13:36:45 2018 -0700

----------------------------------------------------------------------
 .../org/apache/hadoop/hbase/regionserver/SplitLogWorker.java   | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/5eb4c566/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SplitLogWorker.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SplitLogWorker.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SplitLogWorker.java
index eeffa8b..b3e9f76 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SplitLogWorker.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SplitLogWorker.java
@@ -18,6 +18,7 @@
  */
 package org.apache.hadoop.hbase.regionserver;
 
+import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.InterruptedIOException;
 import java.net.ConnectException;
@@ -109,6 +110,11 @@ public class SplitLogWorker implements Runnable {
           LOG.warn("log splitting of " + filename + " interrupted, resigning", iioe);
           return Status.RESIGNED;
         } catch (IOException e) {
+          if (e instanceof FileNotFoundException) {
+            // A wal file may not exist anymore. Nothing can be recovered so move on
+            LOG.warn("WAL " + filename + " does not exist anymore", e);
+            return Status.DONE;
+          }
           Throwable cause = e.getCause();
           if (e instanceof RetriesExhaustedException && (cause instanceof NotServingRegionException
                   || cause instanceof ConnectException