hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tomwh...@apache.org
Subject svn commit: r521148 - in /lucene/hadoop/trunk: CHANGES.txt src/java/org/apache/hadoop/dfs/FSNamesystem.java
Date Thu, 22 Mar 2007 08:14:50 GMT
Author: tomwhite
Date: Thu Mar 22 01:14:49 2007
New Revision: 521148

URL: http://svn.apache.org/viewvc?view=rev&rev=521148
Log:
HADOOP-1135.  Fix bug in block report processing which may cause the namenode to delete blocks.
 Contributed by Dhruba Borthakur.

Modified:
    lucene/hadoop/trunk/CHANGES.txt
    lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/FSNamesystem.java

Modified: lucene/hadoop/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/CHANGES.txt?view=diff&rev=521148&r1=521147&r2=521148
==============================================================================
--- lucene/hadoop/trunk/CHANGES.txt (original)
+++ lucene/hadoop/trunk/CHANGES.txt Thu Mar 22 01:14:49 2007
@@ -1,6 +1,12 @@
 Hadoop Change Log
 
 
+Trunk (unreleased changes)
+
+ 1. HADOOP-1135.  Fix bug in block report processing which may cause
+    the namenode to delete blocks.  (Dhruba Borthakur via tomwhite)
+
+
 Release 0.12.1 - 2007-03-17
 
  1. HADOOP-1035.  Fix a StackOverflowError in FSDataSet.

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/FSNamesystem.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/FSNamesystem.java?view=diff&rev=521148&r1=521147&r2=521148
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/FSNamesystem.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/FSNamesystem.java Thu Mar 22 01:14:49
2007
@@ -2051,14 +2051,14 @@
             // they are added to recentInvalidateSets and will be sent out
             // thorugh succeeding heartbeat responses.
             //
-            if (obsolete.size() > FSConstants.BLOCK_INVALIDATE_CHUNK) {
+            if (! dir.isValidBlock(b) && ! pendingCreateBlocks.contains(b)) {
+              if (obsolete.size() > FSConstants.BLOCK_INVALIDATE_CHUNK) {
                 addToInvalidates(b, node);
-            } else {
-                if (! dir.isValidBlock(b) && ! pendingCreateBlocks.contains(b)) {
-                  obsolete.add(b);
-                  NameNode.stateChangeLog.debug("BLOCK* NameSystem.processReport: "
+              } else {
+                obsolete.add(b);
+              }
+              NameNode.stateChangeLog.debug("BLOCK* NameSystem.processReport: "
                         +"ask "+nodeID.getName()+" to delete "+b.getBlockName() );
-                }
             }
         }
         return (Block[]) obsolete.toArray(new Block[obsolete.size()]);



Mime
View raw message