hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dhr...@apache.org
Subject svn commit: r627254 - /hadoop/core/trunk/src/java/org/apache/hadoop/ipc/Server.java
Date Wed, 13 Feb 2008 05:53:10 GMT
Author: dhruba
Date: Tue Feb 12 21:53:08 2008
New Revision: 627254

URL: http://svn.apache.org/viewvc?rev=627254&view=rev
Log:
Fix a bug in the IPC responder thread while cancelling keys from the
socket selector.


Modified:
    hadoop/core/trunk/src/java/org/apache/hadoop/ipc/Server.java

Modified: hadoop/core/trunk/src/java/org/apache/hadoop/ipc/Server.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/java/org/apache/hadoop/ipc/Server.java?rev=627254&r1=627253&r2=627254&view=diff
==============================================================================
--- hadoop/core/trunk/src/java/org/apache/hadoop/ipc/Server.java (original)
+++ hadoop/core/trunk/src/java/org/apache/hadoop/ipc/Server.java Tue Feb 12 21:53:08 2008
@@ -550,21 +550,21 @@
         Iterator<Call> iter = responseQueue.listIterator(0);
         while (iter.hasNext()) {
           call = iter.next();
-          if (call.response.position() > 0) {
-            /* We should probably use a different a different start time 
-             * than receivedTime. receivedTime starts when the RPC
-             * was first read.
-             * We have written a partial response. will close the
-             * connection for now.
-             */
-            close = true;
-            break;
-          }
           if (now > call.receivedTime + maxCallStartAge) {
             LOG.info(getName() + ", call " + call +
                      ": response discarded for being too old (" +
                      (now - call.receivedTime) + ")");
             iter.remove();
+            if (call.response.position() > 0) {
+              /* We should probably use a different start time 
+               * than receivedTime. receivedTime starts when the RPC
+               * was first read.
+               * We have written a partial response. will close the
+               * connection for now.
+               */
+              close = true;
+              break;
+            }            
           }
         }
       }



Mime
View raw message