From 063eefe3b0eed3744a840a46e3b3aa5cef5e32f6 Mon Sep 17 00:00:00 2001 From: Michael Stack Date: Mon, 4 Jun 2018 12:38:56 -0700 Subject: [PATCH] HBASE-20634 Reopen region while server crash can cause the procedure to be stuck; ADDENDUM --- .../hbase/master/replication/RefreshPeerProcedure.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/RefreshPeerProcedure.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/RefreshPeerProcedure.java index ba9bcdc02dd..10e16e9a564 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/RefreshPeerProcedure.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/RefreshPeerProcedure.java @@ -22,6 +22,7 @@ import org.apache.hadoop.hbase.ServerName; import org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv; import org.apache.hadoop.hbase.master.procedure.PeerProcedureInterface; import org.apache.hadoop.hbase.master.procedure.RSProcedureDispatcher.ServerOperation; +import org.apache.hadoop.hbase.procedure2.FailedRemoteDispatchException; import org.apache.hadoop.hbase.procedure2.Procedure; import org.apache.hadoop.hbase.procedure2.ProcedureEvent; import org.apache.hadoop.hbase.procedure2.ProcedureStateSerializer; @@ -166,10 +167,12 @@ public class RefreshPeerProcedure extends Procedure // retry dispatched = false; } - if (!env.getRemoteDispatcher().addOperationToNode(targetServer, this)) { + try { + env.getRemoteDispatcher().addOperationToNode(targetServer, this); + } catch (FailedRemoteDispatchException frde) { LOG.info("Can not add remote operation for refreshing peer {} for {} to {}, " + - "this usually because the server is already dead, " + - "give up and mark the procedure as complete", peerId, type, targetServer); + "this is usually because the server is already dead, " + + "give up and mark the procedure as complete", peerId, type, targetServer, frde); return null; } dispatched = true;