Bläddra i källkod

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

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1509565 13f79535-47bb-0310-9956-ffa450edef68
Tsz-wo Sze 11 år sedan
förälder
incheckning
c04a7d974a

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

@@ -288,6 +288,9 @@ Release 2.1.1-beta - UNRELEASED
 
   BUG FIXES
 
+    HDFS-5028. LeaseRenewer throws ConcurrentModificationException when timeout.
+    (zhaoyunjiong via szetszwo)
+
 Release 2.1.0-beta - 2013-08-06
 
   INCOMPATIBLE CHANGES

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

@@ -449,8 +449,8 @@ class LeaseRenewer {
           LOG.warn("Failed to renew lease for " + clientsString() + " for "
               + (elapsed/1000) + " seconds.  Aborting ...", ie);
           synchronized (this) {
-            for(DFSClient c : dfsclients) {
-              c.abort();
+            while (!dfsclients.isEmpty()) {
+              dfsclients.get(0).abort();
             }
           }
           break;