hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r536296 - in /lucene/hadoop/trunk: CHANGES.txt src/java/org/apache/hadoop/dfs/FSNamesystem.java
Date Tue, 08 May 2007 18:52:04 GMT
Author: cutting
Date: Tue May  8 11:52:03 2007
New Revision: 536296

URL: http://svn.apache.org/viewvc?view=rev&rev=536296
Log:
HADOOP-1255.  Fix a bug where the namenode falls into an infinite loop trying to remove a
dead node.  Contributed by Hairong.

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=536296&r1=536295&r2=536296
==============================================================================
--- lucene/hadoop/trunk/CHANGES.txt (original)
+++ lucene/hadoop/trunk/CHANGES.txt Tue May  8 11:52:03 2007
@@ -362,6 +362,9 @@
 
 107. HADOOP-1310.  Fix unchecked warnings in aggregate code.  (tomwhite)
 
+108. HADOOP-1255.  Fix a bug where the namenode falls into an infinite
+     loop trying to remove a dead node.  (Hairong Kuang via cutting)
+
 
 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=536296&r1=536295&r2=536296
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/FSNamesystem.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/FSNamesystem.java Tue May  8 11:52:03
2007
@@ -1494,10 +1494,12 @@
         
       // also treat the registration message as a heartbeat
       synchronized(heartbeats) {
-        heartbeats.add(nodeS);
-        //update its timestamp
-        nodeS.updateHeartbeat(0L, 0L, 0);
-        nodeS.isAlive = true;
+        if( !heartbeats.contains(nodeS)) {
+          heartbeats.add(nodeS);
+          //update its timestamp
+          nodeS.updateHeartbeat(0L, 0L, 0);
+          nodeS.isAlive = true;
+        }
       }
       return;
     } 



Mime
View raw message