hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tomwh...@apache.org
Subject svn commit: r527409 - in /lucene/hadoop/trunk: CHANGES.txt src/java/org/apache/hadoop/dfs/FSNamesystem.java
Date Wed, 11 Apr 2007 08:26:23 GMT
Author: tomwhite
Date: Wed Apr 11 01:26:19 2007
New Revision: 527409

URL: http://svn.apache.org/viewvc?view=rev&rev=527409
Log:
HADOOP-1136.  Fix ArrayIndexOutOfBoundsException in FSNamesystem add() method.  Contributed
by Hairong Kuang.

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=527409&r1=527408&r2=527409
==============================================================================
--- lucene/hadoop/trunk/CHANGES.txt (original)
+++ lucene/hadoop/trunk/CHANGES.txt Wed Apr 11 01:26:19 2007
@@ -147,6 +147,10 @@
 45. HADOOP-1211.  Remove deprecated constructor and unused static 
     members in DataNode class.  (Konstantin Shvachko via tomwhite)
 
+46. HADOOP-1136.  Fix ArrayIndexOutOfBoundsException in 
+    FSNamesystem$UnderReplicatedBlocks add() method.  
+    (Hairong Kuang via tomwhite)
+
 
 Release 0.12.3 - 2007-04-06
 

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=527409&r1=527408&r2=527409
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/FSNamesystem.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/FSNamesystem.java Wed Apr 11 01:26:19
2007
@@ -463,7 +463,7 @@
          */
         synchronized boolean add(
             Block block, int curReplicas, int expectedReplicas) {
-            if(expectedReplicas <= curReplicas) {
+            if(curReplicas<=0 || expectedReplicas <= curReplicas) {
                 return false;
             }
             int priLevel = getPriority(block, curReplicas, expectedReplicas);



Mime
View raw message