From f6c05faccfc0167508da4ccf99b42e44c085b1b8 Mon Sep 17 00:00:00 2001 From: Allan Yang Date: Fri, 28 Sep 2018 14:06:54 +0800 Subject: [PATCH] Revert "HBASE-21237 Use CompatRemoteProcedureResolver to dispatch open/close region requests to RS" --- .../master/procedure/RSProcedureDispatcher.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/RSProcedureDispatcher.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/RSProcedureDispatcher.java index 141b85585b9..638f9d3461b 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/RSProcedureDispatcher.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/RSProcedureDispatcher.java @@ -109,12 +109,16 @@ public class RSProcedureDispatcher protected void remoteDispatch(final ServerName serverName, final Set remoteProcedures) { final int rsVersion = master.getServerManager().getVersionNumber(serverName); - if (rsVersion == 0 && !master.getServerManager().isServerOnline(serverName)) { + if (rsVersion >= RS_VERSION_WITH_EXEC_PROCS) { + LOG.trace("Using procedure batch rpc execution for serverName={} version={}", serverName, + rsVersion); + submitTask(new ExecuteProceduresRemoteCall(serverName, remoteProcedures)); + } else if (rsVersion == 0 && !master.getServerManager().isServerOnline(serverName)) { submitTask(new DeadRSRemoteCall(serverName, remoteProcedures)); } else { - // See HBASE-21237, fallback to CompatRemoteProcedureResolver for now. Since - // ExecuteProceduresRemoteCall will group all the open/close requests. If one - // fails, master will regard all the requests as failure and then cause some trouble. + LOG.info(String.format( + "Fallback to compat rpc execution for serverName=%s version=%s", + serverName, rsVersion)); submitTask(new CompatRemoteProcedureResolver(serverName, remoteProcedures)); } }