HBASE-21237 Use CompatRemoteProcedureResolver to dispatch open/close region requests to RS

This commit is contained in:
Allan Yang 2018-09-28 09:41:31 +08:00
parent eb27251265
commit 0290f57c3a
1 changed files with 4 additions and 8 deletions

View File

@ -109,16 +109,12 @@ public class RSProcedureDispatcher
protected void remoteDispatch(final ServerName serverName,
final Set<RemoteProcedure> remoteProcedures) {
final int rsVersion = master.getServerManager().getVersionNumber(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)) {
if (rsVersion == 0 && !master.getServerManager().isServerOnline(serverName)) {
submitTask(new DeadRSRemoteCall(serverName, remoteProcedures));
} else {
LOG.info(String.format(
"Fallback to compat rpc execution for serverName=%s version=%s",
serverName, rsVersion));
// 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.
submitTask(new CompatRemoteProcedureResolver(serverName, remoteProcedures));
}
}