HBASE-10506 Fail-fast if client connection is lost before the real call be executed in RPC layer

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1567841 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
liangxie 2014-02-13 03:44:44 +00:00
parent d8c71dcddc
commit c14dd4f515
1 changed files with 7 additions and 1 deletions

View File

@ -67,6 +67,12 @@ public class CallRunner {
public void run() { public void run() {
try { try {
if (!call.connection.channel.isOpen()) {
if (RpcServer.LOG.isDebugEnabled()) {
RpcServer.LOG.debug(Thread.currentThread().getName() + ": skipped " + call);
}
return;
}
this.status.setStatus("Setting up call"); this.status.setStatus("Setting up call");
this.status.setConnection(call.connection.getHostAddress(), call.connection.getRemotePort()); this.status.setConnection(call.connection.getHostAddress(), call.connection.getRemotePort());
if (RpcServer.LOG.isDebugEnabled()) { if (RpcServer.LOG.isDebugEnabled()) {
@ -147,4 +153,4 @@ public class CallRunner {
RpcServer.MONITORED_RPC.set(status); RpcServer.MONITORED_RPC.set(status);
return status; return status;
} }
} }