diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 28f0c46cd1..42814c19fd 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -687,6 +687,9 @@ Branch-2 ( Unreleased changes ) HDFS-3856. TestHDFSServerPorts failure is causing surefire fork failure. (eli) + HDFS-3860. HeartbeatManager#Monitor may wrongly hold the writelock of + namesystem. (Jing Zhao via atm) + BREAKDOWN OF HDFS-3042 SUBTASKS HDFS-2185. HDFS portion of ZK-based FailoverController (todd) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/HeartbeatManager.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/HeartbeatManager.java index 73926010a4..449619ced7 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/HeartbeatManager.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/HeartbeatManager.java @@ -223,10 +223,10 @@ class HeartbeatManager implements DatanodeStatistics { if (!allAlive) { // acquire the fsnamesystem lock, and then remove the dead node. namesystem.writeLock(); - if (namesystem.isInSafeMode()) { - return; - } try { + if (namesystem.isInSafeMode()) { + return; + } synchronized(this) { dm.removeDeadDatanode(dead); }