diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 40d727c06ff..bd7c5851469 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -29,6 +29,9 @@ Release 0.23.2 - UNRELEASED HDFS-776. Fix exception handling in Balancer. (Uma Maheswara Rao G via szetszwo) + HDFS-2815. Namenode sometimes oes not come out of safemode during + NN crash + restart. (Uma Maheswara Rao via suresh) + Release 0.23.1 - 2012-02-08 INCOMPATIBLE CHANGES diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java index cf71d59985e..8b15aca7e8f 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java @@ -1908,7 +1908,6 @@ public class FSNamesystem implements Namesystem, FSClusterStats, boolean enforcePermission) throws AccessControlException, SafeModeException, UnresolvedLinkException, IOException { - boolean deleteNow = false; ArrayList collectedBlocks = new ArrayList(); writeLock(); @@ -1926,10 +1925,6 @@ public class FSNamesystem implements Namesystem, FSClusterStats, if (!dir.delete(src, collectedBlocks)) { return false; } - deleteNow = collectedBlocks.size() <= BLOCK_DELETION_INCREMENT; - if (deleteNow) { // Perform small deletes right away - removeBlocks(collectedBlocks); - } } finally { writeUnlock(); } @@ -1938,9 +1933,7 @@ public class FSNamesystem implements Namesystem, FSClusterStats, writeLock(); try { - if (!deleteNow) { - removeBlocks(collectedBlocks); // Incremental deletion of blocks - } + removeBlocks(collectedBlocks); // Incremental deletion of blocks } finally { writeUnlock(); }