diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index c860341aba..c01fdd441f 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -1980,6 +1980,9 @@ Release 0.23.5 - UNRELEASED HDFS-3990. NN's health report has severe performance problems (daryn) + HDFS-4181. LeaseManager tries to double remove and prints extra messages + (Kihwal Lee via daryn) + BUG FIXES HDFS-3829. TestHftpURLTimeouts fails intermittently with JDK7 (Trevor diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/LeaseManager.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/LeaseManager.java index 4dbee88d6f..13fff598f4 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/LeaseManager.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/LeaseManager.java @@ -135,7 +135,9 @@ synchronized Lease addLease(String holder, String src) { synchronized void removeLease(Lease lease, String src) { sortedLeasesByPath.remove(src); if (!lease.removePath(src)) { - LOG.error(src + " not found in lease.paths (=" + lease.paths + ")"); + if (LOG.isDebugEnabled()) { + LOG.debug(src + " not found in lease.paths (=" + lease.paths + ")"); + } } if (!lease.hasPath()) { @@ -440,11 +442,14 @@ private synchronized void checkLeases() { oldest.getPaths().toArray(leasePaths); for(String p : leasePaths) { try { - if(fsnamesystem.internalReleaseLease(oldest, p, HdfsServerConstants.NAMENODE_LEASE_HOLDER)) { - LOG.info("Lease recovery for " + p + " is complete. File closed."); - removing.add(p); - } else { - LOG.info("Started block recovery " + p + " lease " + oldest); + boolean completed = fsnamesystem.internalReleaseLease(oldest, p, + HdfsServerConstants.NAMENODE_LEASE_HOLDER); + if (LOG.isDebugEnabled()) { + if (completed) { + LOG.debug("Lease recovery for " + p + " is complete. File closed."); + } else { + LOG.debug("Started block recovery " + p + " lease " + oldest); + } } } catch (IOException e) { LOG.error("Cannot release the path " + p + " in the lease "