SOLR-5710: Migrate collection command does not handle not finding a shard leader well

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1566385 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Shalin Shekhar Mangar 2014-02-09 19:59:58 +00:00
parent a055f02e8a
commit 9b46f41aa2
2 changed files with 5 additions and 5 deletions

View File

@ -78,8 +78,8 @@ Detailed Change List
New Features
----------------------
* SOLR-5308: SOLR-5601: A new 'migrate' collection API to split all documents with a
route key into another collection (shalin)
* SOLR-5308: SOLR-5601: SOLR-5710: A new 'migrate' collection API to split all
documents with a route key into another collection (shalin)
* SOLR-5441: Expose number of transaction log files and their size via JMX.
(Rafał Kuć via shalin)

View File

@ -1353,7 +1353,7 @@ public class OverseerCollectionProcessor implements Runnable, ClosableThread {
}
log.info("Common hash range between source shard: {} and target shard: {} = " + splitRange, sourceSlice.getName(), targetSlice.getName());
Replica targetLeader = targetSlice.getLeader();
Replica targetLeader = zkStateReader.getLeaderRetry(targetCollection.getName(), targetSlice.getName(), 10000);
log.info("Asking target leader node: " + targetLeader.getNodeName() + " core: "
+ targetLeader.getStr("core") + " to buffer updates");
@ -1397,7 +1397,7 @@ public class OverseerCollectionProcessor implements Runnable, ClosableThread {
log.info("Routing rule added successfully");
// Create temp core on source shard
Replica sourceLeader = sourceSlice.getLeader();
Replica sourceLeader = zkStateReader.getLeaderRetry(sourceCollection.getName(), sourceSlice.getName(), 10000);
// create a temporary collection with just one node on the shard leader
String configName = zkStateReader.readConfigName(sourceCollection.getName());
@ -1413,7 +1413,7 @@ public class OverseerCollectionProcessor implements Runnable, ClosableThread {
// refresh cluster state
clusterState = zkStateReader.getClusterState();
Slice tempSourceSlice = clusterState.getCollection(tempSourceCollectionName).getSlices().iterator().next();
Replica tempSourceLeader = zkStateReader.getLeaderRetry(tempSourceCollectionName, tempSourceSlice.getName(), 60000);
Replica tempSourceLeader = zkStateReader.getLeaderRetry(tempSourceCollectionName, tempSourceSlice.getName(), 120000);
String tempCollectionReplica1 = tempSourceCollectionName + "_" + tempSourceSlice.getName() + "_replica1";
String coreNodeName = waitForCoreNodeName(clusterState.getCollection(tempSourceCollectionName),