mirror of https://github.com/apache/lucene.git
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:
parent
a055f02e8a
commit
9b46f41aa2
|
@ -78,8 +78,8 @@ Detailed Change List
|
||||||
New Features
|
New Features
|
||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
* SOLR-5308: SOLR-5601: A new 'migrate' collection API to split all documents with a
|
* SOLR-5308: SOLR-5601: SOLR-5710: A new 'migrate' collection API to split all
|
||||||
route key into another collection (shalin)
|
documents with a route key into another collection (shalin)
|
||||||
|
|
||||||
* SOLR-5441: Expose number of transaction log files and their size via JMX.
|
* SOLR-5441: Expose number of transaction log files and their size via JMX.
|
||||||
(Rafał Kuć via shalin)
|
(Rafał Kuć via shalin)
|
||||||
|
|
|
@ -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());
|
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: "
|
log.info("Asking target leader node: " + targetLeader.getNodeName() + " core: "
|
||||||
+ targetLeader.getStr("core") + " to buffer updates");
|
+ targetLeader.getStr("core") + " to buffer updates");
|
||||||
|
@ -1397,7 +1397,7 @@ public class OverseerCollectionProcessor implements Runnable, ClosableThread {
|
||||||
log.info("Routing rule added successfully");
|
log.info("Routing rule added successfully");
|
||||||
|
|
||||||
// Create temp core on source shard
|
// 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
|
// create a temporary collection with just one node on the shard leader
|
||||||
String configName = zkStateReader.readConfigName(sourceCollection.getName());
|
String configName = zkStateReader.readConfigName(sourceCollection.getName());
|
||||||
|
@ -1413,7 +1413,7 @@ public class OverseerCollectionProcessor implements Runnable, ClosableThread {
|
||||||
// refresh cluster state
|
// refresh cluster state
|
||||||
clusterState = zkStateReader.getClusterState();
|
clusterState = zkStateReader.getClusterState();
|
||||||
Slice tempSourceSlice = clusterState.getCollection(tempSourceCollectionName).getSlices().iterator().next();
|
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 tempCollectionReplica1 = tempSourceCollectionName + "_" + tempSourceSlice.getName() + "_replica1";
|
||||||
String coreNodeName = waitForCoreNodeName(clusterState.getCollection(tempSourceCollectionName),
|
String coreNodeName = waitForCoreNodeName(clusterState.getCollection(tempSourceCollectionName),
|
||||||
|
|
Loading…
Reference in New Issue