Apache Lucene open-source search software
SOLR-5601: Use zkStateReader.getLeaderRetry to find the leader of a newly created temp collection
Shalin Shekhar Mangar4612f80e8d71
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txtindex d6705daebb4..c3fa58bf1c0 100644--- a/solr/CHANGES.txt+++ b/solr/CHANGES.txt@@ -83,7 +83,7 @@ Detailed Change ListNew Features-----------------------* SOLR-5308: A new 'migrate' collection API to split all documents with a+* SOLR-5308: SOLR-5601: A new 'migrate' collection API to split all documents with aroute key into another collection (shalin)* SOLR-5441: Expose number of transaction log files and their size via JMX.diff --git a/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionProcessor.java b/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionProcessor.javaindex 9078602614a..9192445d778 100644--- a/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionProcessor.java+++ b/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionProcessor.java@@ -1191,7 +1191,7 @@ public class OverseerCollectionProcessor implements Runnable, ClosableThread {// refresh cluster stateclusterState = zkStateReader.getClusterState();Slice tempSourceSlice = clusterState.getCollection(tempSourceCollectionName).getSlices().iterator().next();- Replica tempSourceLeader = clusterState.getLeader(tempSourceCollectionName, tempSourceSlice.getName());+ Replica tempSourceLeader = zkStateReader.getLeaderRetry(tempSourceCollectionName, tempSourceSlice.getName(), 60000);String tempCollectionReplica1 = tempSourceCollectionName + "_" + tempSourceSlice.getName() + "_replica1";String coreNodeName = waitForCoreNodeName(clusterState.getCollection(tempSourceCollectionName),