From commits-return-72918-archive-asf-public=cust-asf.ponee.io@hbase.apache.org Fri May 18 08:32:16 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 4E522180648 for ; Fri, 18 May 2018 08:32:16 +0200 (CEST) Received: (qmail 33085 invoked by uid 500); 18 May 2018 06:32:14 -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 33072 invoked by uid 99); 18 May 2018 06:32:14 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 May 2018 06:32:14 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 45F34E0614; Fri, 18 May 2018 06:32:14 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: zghao@apache.org To: commits@hbase.apache.org Message-Id: <8017eac89d274f53b44682a6920dcc56@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: hbase git commit: HBASE-20583 SplitLogWorker should handle FileNotFoundException when split a wal Date: Fri, 18 May 2018 06:32:14 +0000 (UTC) Repository: hbase Updated Branches: refs/heads/branch-2.0 36db2cb28 -> a342d0278 HBASE-20583 SplitLogWorker should handle FileNotFoundException when split a wal Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/a342d027 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/a342d027 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/a342d027 Branch: refs/heads/branch-2.0 Commit: a342d0278b0009d543b924f0e38e55c5899628bd Parents: 36db2cb Author: Guanghao Zhang Authored: Wed May 16 07:52:32 2018 +0800 Committer: Guanghao Zhang Committed: Fri May 18 14:31:31 2018 +0800 ---------------------------------------------------------------------- .../org/apache/hadoop/hbase/regionserver/SplitLogWorker.java | 6 ++++++ 1 file changed, 6 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/a342d027/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 0046b67..a1c2030 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; @@ -105,6 +106,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 {} does not exist anymore", filename, e); + return Status.DONE; + } Throwable cause = e.getCause(); if (e instanceof RetriesExhaustedException && (cause instanceof NotServingRegionException || cause instanceof ConnectException