Browse Source

Merging HDFS-606 change r955398 from 0.20-append to 0.20-security

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20-security@1160441 13f79535-47bb-0310-9956-ffa450edef68
Suresh Srinivas 14 years ago
parent
commit
f52fc55996
2 changed files with 8 additions and 0 deletions
  1. 3 0
      CHANGES.txt
  2. 5 0
      src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java

+ 3 - 0
CHANGES.txt

@@ -42,6 +42,9 @@ Release 0.20.205.0 - unreleased
     HDFS-561. Fix write pipeline READ_TIMEOUT.
     (Todd Lipcon via dhruba)
 
+    HDFS-606. Fix ConcurrentModificationException in invalidateCorruptReplicas.
+    (Todd Lipcon via dhruba)
+
   IMPROVEMENTS
 
     MAPREDUCE-2187. Reporter sends progress during sort/merge. (Anupam Seth via

+ 5 - 0
src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java

@@ -3407,6 +3407,11 @@ public class FSNamesystem implements FSConstants, FSNamesystemMBean,
     boolean gotException = false;
     if (nodes == null)
       return;
+    // Make a copy of this list, since calling invalidateBlock will modify
+    // the original (avoid CME)
+    nodes = new ArrayList<DatanodeDescriptor>(nodes);
+    NameNode.stateChangeLog.debug("NameNode.invalidateCorruptReplicas: " +
+        "invalidating corrupt replicas on " + nodes.size() + "nodes");
     for (Iterator<DatanodeDescriptor> it = nodes.iterator(); it.hasNext(); ) {
       DatanodeDescriptor node = it.next();
       try {