Skip to content

Apache Lucene open-source search software

SOLR-6651: Fix wrong timeout logged in waitForReplicasToComeUp

Shalin Shekhar Mangar13e8aa61fcca
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 90763906a9d..8badfce9a17 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -363,6 +363,8 @@ Other Changes
* SOLR-6578: Update commons-io dependency to the latest 2.4 version
(Steve Rowe, Shawn Heisey)
+* SOLR-6651: Fix wrong timeout logged in waitForReplicasToComeUp. (shalin)
+
================== 4.10.1 ==================
Bug Fixes
diff --git a/solr/core/src/java/org/apache/solr/cloud/ElectionContext.java b/solr/core/src/java/org/apache/solr/cloud/ElectionContext.java
index fdedab8be90..e079940ae6a 100644
--- a/solr/core/src/java/org/apache/solr/cloud/ElectionContext.java
+++ b/solr/core/src/java/org/apache/solr/cloud/ElectionContext.java
@@ -424,9 +424,11 @@ final class ShardLeaderElectionContext extends ShardLeaderElectionContextBase {
return;
} else {
if (cnt % 40 == 0) {
- log.info("Waiting until we see more replicas up for shard " + shardId + ": total="
- + slices.getReplicasMap().size() + " found=" + found
- + " timeoutin=" + (timeoutAt - System.nanoTime() / (float)(10^9)) + "ms");
+ log.info("Waiting until we see more replicas up for shard {}: total={}"
+ + " found={}" + found
+ + " timeoutin={}ms",
+ shardId, slices.getReplicasMap().size(), found,
+ TimeUnit.MILLISECONDS.convert(timeoutAt - System.nanoTime(), TimeUnit.NANOSECONDS));
}
}