Apache Lucene open-source search software
SOLR-7370: FSHDFSUtils#recoverFileLease tries to recover the lease every one second after the first four second wait.
Mark Robert Miller64ed335455fd
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txtindex 214b6e33ff9..8b0b183bb58 100644--- a/solr/CHANGES.txt+++ b/solr/CHANGES.txt@@ -98,6 +98,9 @@ Bug Fixes* SOLR-7066: autoAddReplicas feature has bug when selecting replacement nodes. (Mark Miller)+* SOLR-7370: FSHDFSUtils#recoverFileLease tries to recover the lease every one second after+ the first four second wait. (Mark Miller)+Optimizations----------------------diff --git a/solr/core/src/java/org/apache/solr/util/FSHDFSUtils.java b/solr/core/src/java/org/apache/solr/util/FSHDFSUtils.javaindex b21af298f23..206ce8216a7 100644--- a/solr/core/src/java/org/apache/solr/util/FSHDFSUtils.java+++ b/solr/core/src/java/org/apache/solr/util/FSHDFSUtils.java@@ -91,7 +91,7 @@ public class FSHDFSUtils {// This should be set to how long it'll take for us to timeout against primary datanode if it// is dead. We set it to 61 seconds, 1 second than the default READ_TIMEOUT in HDFS, the// default value for DFS_CLIENT_SOCKET_TIMEOUT_KEY.- long subsequentPause = conf.getInt("solr.hdfs.lease.recovery.dfs.timeout", 61 * 1000);+ long subsequentPause = TimeUnit.NANOSECONDS.convert(conf.getInt("solr.hdfs.lease.recovery.dfs.timeout", 61 * 1000), TimeUnit.MILLISECONDS);Method isFileClosedMeth = null;// whether we need to look for isFileClosed method