Prechádzať zdrojové kódy

HDFS-5028. LeaseRenewer throws ConcurrentModificationException when timeout. Contributed by zhaoyunjiong

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-1@1509569 13f79535-47bb-0310-9956-ffa450edef68
Tsz-wo Sze 11 rokov pred
rodič
commit
1f3e451bbf

+ 3 - 0
CHANGES.txt

@@ -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

+ 2 - 2
src/hdfs/org/apache/hadoop/hdfs/LeaseRenewer.java

@@ -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;