hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rang...@apache.org
Subject svn commit: r644423 - in /hadoop/core/trunk: CHANGES.txt src/java/org/apache/hadoop/ipc/Server.java
Date Thu, 03 Apr 2008 17:52:22 GMT
Author: rangadi
Date: Thu Apr  3 10:52:21 2008
New Revision: 644423

URL: http://svn.apache.org/viewvc?rev=644423&view=rev
Log:
HADOOP-3010. Fix ConcurrentModificationException in ipc.Server.Responder. (rangadi)

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

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=644423&r1=644422&r2=644423&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Thu Apr  3 10:52:21 2008
@@ -443,6 +443,9 @@
     HADOOP-3118.  Fix Namenode NPE while loading fsimage after a cluster 
     upgrade from older disk format. (dhruba)
 
+    HADOOP-3010. Fix ConcurrentModificationException in ipc.Server.Responder.
+    (rangadi)
+
 Release 0.16.2 - 2008-04-02
 
   BUG FIXES

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=644423&r1=644422&r2=644423&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 Thu Apr  3 10:52:21 2008
@@ -465,13 +465,15 @@
           // long time, discard them.
           //
           LOG.debug("Checking for old call responses.");
-          iter = writeSelector.keys().iterator();
-          while (iter.hasNext()) {
-            SelectionKey key = iter.next();
-            try {
-              doPurge(key, now);
-            } catch (IOException e) {
-              LOG.warn("Error in purging old calls " + e);
+          synchronized (writeSelector.keys()) {
+            iter = writeSelector.keys().iterator();
+            while (iter.hasNext()) {
+              SelectionKey key = iter.next();
+              try {
+                doPurge(key, now);
+              } catch (IOException e) {
+                LOG.warn("Error in purging old calls " + e);
+              }
             }
           }
         } catch (OutOfMemoryError e) {



Mime
View raw message