From 3acc96edbf3f389a780face80d778c57087199d3 Mon Sep 17 00:00:00 2001 From: Akira Ajisaka Date: Tue, 24 Jan 2017 14:55:27 +0900 Subject: [PATCH] HDFS-11352. Potential deadlock in NN when failing over. Contributed by Erik Krogen. --- .../org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java index c7f8508bc79..96bcfefd408 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java @@ -4768,7 +4768,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean, @Metric({"TransactionsSinceLastCheckpoint", "Number of transactions since last checkpoint"}) public long getTransactionsSinceLastCheckpoint() { - return getEditLog().getLastWrittenTxId() - + return getEditLog().getLastWrittenTxIdWithoutLock() - getFSImage().getStorage().getMostRecentCheckpointTxId(); }