Browse Source

HDFS-11352. Potential deadlock in NN when failing over. Contributed by Eric Krogen.

Akira Ajisaka 8 years ago
parent
commit
8aff157e2d

+ 3 - 0
hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt

@@ -18,6 +18,9 @@ Release 2.6.6 - UNRELEASED
     HDFS-11290. TestFSNameSystemMBean should wait until JMX cache is cleared.
     (Eric Krogen via aajisaka)
 
+    HDFS-11352. Potential deadlock in NN when failing over.
+    (Eric Krogen via aajisaka)
+
 Release 2.6.5 - 2016-10-08
 
   INCOMPATIBLE CHANGES

+ 1 - 1
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java

@@ -5368,7 +5368,7 @@ public class FSNamesystem implements Namesystem, FSClusterStats,
   @Metric({"TransactionsSinceLastCheckpoint",
       "Number of transactions since last checkpoint"})
   public long getTransactionsSinceLastCheckpoint() {
-    return getEditLog().getLastWrittenTxId() -
+    return getEditLog().getLastWrittenTxIdWithoutLock() -
         getFSImage().getStorage().getMostRecentCheckpointTxId();
   }