hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s..@apache.org
Subject svn commit: r727890 - in /hadoop/core/branches/branch-0.18: CHANGES.txt src/hdfs/org/apache/hadoop/dfs/FSNamesystem.java
Date Fri, 19 Dec 2008 01:59:53 GMT
Author: shv
Date: Thu Dec 18 17:59:53 2008
New Revision: 727890

URL: http://svn.apache.org/viewvc?rev=727890&view=rev
Log:
HADOOP-4904. Merge -r 727873:727874 from trunk to branch 0.18.

Modified:
    hadoop/core/branches/branch-0.18/CHANGES.txt
    hadoop/core/branches/branch-0.18/src/hdfs/org/apache/hadoop/dfs/FSNamesystem.java

Modified: hadoop/core/branches/branch-0.18/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.18/CHANGES.txt?rev=727890&r1=727889&r2=727890&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.18/CHANGES.txt (original)
+++ hadoop/core/branches/branch-0.18/CHANGES.txt Thu Dec 18 17:59:53 2008
@@ -113,6 +113,8 @@
     HADOOP-4840. TestNodeCount sometimes fails with NullPointerException.
     (hairong)
 
+    HADOOP-4904. Fix deadlock while leaving safe mode. (shv)
+
 Release 0.18.2 - 2008-11-03
 
   BUG FIXES

Modified: hadoop/core/branches/branch-0.18/src/hdfs/org/apache/hadoop/dfs/FSNamesystem.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.18/src/hdfs/org/apache/hadoop/dfs/FSNamesystem.java?rev=727890&r1=727889&r2=727890&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.18/src/hdfs/org/apache/hadoop/dfs/FSNamesystem.java (original)
+++ hadoop/core/branches/branch-0.18/src/hdfs/org/apache/hadoop/dfs/FSNamesystem.java Thu
Dec 18 17:59:53 2008
@@ -3998,8 +3998,13 @@
         }
       }
       // leave safe mode and stop the monitor
-      if(safeMode != null)
-        safeMode.leave(true);
+      try {
+        leaveSafeMode(true);
+      } catch(SafeModeException es) { // should never happen
+        String msg = "SafeModeMonitor may not run during distributed upgrade.";
+        assert false : msg;
+        throw new RuntimeException(msg, es);
+      }
       smmthread = null;
     }
   }
@@ -4088,7 +4093,7 @@
    * Leave safe mode.
    * @throws IOException
    */
-  synchronized void leaveSafeMode(boolean checkForUpgrades) throws IOException {
+  synchronized void leaveSafeMode(boolean checkForUpgrades) throws SafeModeException {
     if (!isInSafeMode()) {
       NameNode.stateChangeLog.info("STATE* Safe mode is already OFF."); 
       return;



Mime
View raw message