You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by li...@apache.org on 2014/02/13 04:46:06 UTC

svn commit: r1567842 - /hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/CallRunner.java

Author: liangxie
Date: Thu Feb 13 03:46:06 2014
New Revision: 1567842

URL: http://svn.apache.org/r1567842
Log:
HBASE-10506 Fail-fast if client connection is lost before the real call be executed in RPC layer

Modified:
    hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/CallRunner.java

Modified: hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/CallRunner.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/CallRunner.java?rev=1567842&r1=1567841&r2=1567842&view=diff
==============================================================================
--- hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/CallRunner.java (original)
+++ hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/CallRunner.java Thu Feb 13 03:46:06 2014
@@ -67,6 +67,12 @@ public class CallRunner {
 
   public void run() {
     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.setConnection(call.connection.getHostAddress(), call.connection.getRemotePort());
       if (RpcServer.LOG.isDebugEnabled()) {
@@ -147,4 +153,4 @@ public class CallRunner {
     RpcServer.MONITORED_RPC.set(status);
     return status;
   }
-}
\ No newline at end of file
+}