Browse Source

HADOOP-10125. Merging change r1558575 from trunk

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1558952 13f79535-47bb-0310-9956-ffa450edef68
Brandon Li 11 years ago
parent
commit
e6d2096a18

+ 3 - 0
hadoop-common-project/hadoop-common/CHANGES.txt

@@ -229,6 +229,9 @@ Release 2.4.0 - UNRELEASED
 
 
     HADOOP-10146. Workaround JDK7 Process fd close bug (daryn)
     HADOOP-10146. Workaround JDK7 Process fd close bug (daryn)
 
 
+    HADOOP-10125. no need to process RPC request if the client connection
+    has been dropped (Ming Ma via brandonli)
+
 Release 2.3.0 - UNRELEASED
 Release 2.3.0 - UNRELEASED
 
 
   INCOMPATIBLE CHANGES
   INCOMPATIBLE CHANGES

+ 4 - 0
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java

@@ -1935,6 +1935,10 @@ public abstract class Server {
           if (LOG.isDebugEnabled()) {
           if (LOG.isDebugEnabled()) {
             LOG.debug(Thread.currentThread().getName() + ": " + call + " for RpcKind " + call.rpcKind);
             LOG.debug(Thread.currentThread().getName() + ": " + call + " for RpcKind " + call.rpcKind);
           }
           }
+          if (!call.connection.channel.isOpen()) {
+            LOG.info(Thread.currentThread().getName() + ": skipped " + call);
+            continue;
+          }
           String errorClass = null;
           String errorClass = null;
           String error = null;
           String error = null;
           RpcStatusProto returnStatus = RpcStatusProto.SUCCESS;
           RpcStatusProto returnStatus = RpcStatusProto.SUCCESS;