Author: szetszwo
Date: Fri Aug  2 07:18:36 2013
New Revision: 1509569

URL: http://svn.apache.org/r1509569
Log:
HDFS-5028. LeaseRenewer throws ConcurrentModificationException when timeout.  
Contributed by zhaoyunjiong

Modified:
    hadoop/common/branches/branch-1/CHANGES.txt
    
hadoop/common/branches/branch-1/src/hdfs/org/apache/hadoop/hdfs/LeaseRenewer.java

Modified: hadoop/common/branches/branch-1/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/common/branches/branch-1/CHANGES.txt?rev=1509569&r1=1509568&r2=1509569&view=diff
==============================================================================
--- hadoop/common/branches/branch-1/CHANGES.txt (original)
+++ hadoop/common/branches/branch-1/CHANGES.txt Fri Aug  2 07:18:36 2013
@@ -114,6 +114,9 @@ Release 1.3.0 - unreleased
     HADOOP-9801. Configuration#writeXml uses platform defaulting encoding, 
which
     may mishandle multi-byte characters. (cnauroth)
 
+    HDFS-5028. LeaseRenewer throws ConcurrentModificationException when 
timeout.
+    (zhaoyunjiong via szetszwo)
+
 Release 1.2.1 - 2013.07.06
 
   INCOMPATIBLE CHANGES

Modified: 
hadoop/common/branches/branch-1/src/hdfs/org/apache/hadoop/hdfs/LeaseRenewer.java
URL: 
http://svn.apache.org/viewvc/hadoop/common/branches/branch-1/src/hdfs/org/apache/hadoop/hdfs/LeaseRenewer.java?rev=1509569&r1=1509568&r2=1509569&view=diff
==============================================================================
--- 
hadoop/common/branches/branch-1/src/hdfs/org/apache/hadoop/hdfs/LeaseRenewer.java
 (original)
+++ 
hadoop/common/branches/branch-1/src/hdfs/org/apache/hadoop/hdfs/LeaseRenewer.java
 Fri Aug  2 07:18:36 2013
@@ -403,8 +403,8 @@ class LeaseRenewer {
           LOG.warn("Failed to renew lease for " + clientsString() + " for "
               + (getRenewalTime()/1000) + " seconds.  Aborting ...", ie);
           synchronized (this) {
-            for(DFSClient c : dfsclients) {
-              c.abort();
+            while (!dfsclients.isEmpty()) {
+              dfsclients.get(0).abort();
             }
           }
           break;


Reply via email to