mirror of https://github.com/apache/lucene.git
SOLR-5644: SplitShard does not handle not finding a shard leader well
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1565555 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3b997b7e52
commit
459aca19a2
|
@ -290,6 +290,9 @@ Bug Fixes
|
||||||
|
|
||||||
* SOLR-5693: Running on HDFS does work correctly with NRT search. (Mark Miller)
|
* SOLR-5693: Running on HDFS does work correctly with NRT search. (Mark Miller)
|
||||||
|
|
||||||
|
* SOLR-5644: SplitShard does not handle not finding a shard leader well.
|
||||||
|
(Mark Miller, Anshum Gupta via shalin)
|
||||||
|
|
||||||
Optimizations
|
Optimizations
|
||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
|
|
|
@ -832,7 +832,13 @@ public class OverseerCollectionProcessor implements Runnable, ClosableThread {
|
||||||
}
|
}
|
||||||
|
|
||||||
// find the leader for the shard
|
// find the leader for the shard
|
||||||
Replica parentShardLeader = clusterState.getLeader(collectionName, slice);
|
Replica parentShardLeader = null;
|
||||||
|
try {
|
||||||
|
parentShardLeader = zkStateReader.getLeaderRetry(collectionName, slice, 10000);
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
Thread.currentThread().interrupt();
|
||||||
|
}
|
||||||
|
|
||||||
DocRouter.Range range = parentSlice.getRange();
|
DocRouter.Range range = parentSlice.getRange();
|
||||||
if (range == null) {
|
if (range == null) {
|
||||||
range = new PlainIdRouter().fullRange();
|
range = new PlainIdRouter().fullRange();
|
||||||
|
|
|
@ -526,7 +526,8 @@ public class ZkStateReader {
|
||||||
}
|
}
|
||||||
Thread.sleep(50);
|
Thread.sleep(50);
|
||||||
}
|
}
|
||||||
throw new SolrException(ErrorCode.SERVICE_UNAVAILABLE, "No registered leader was found, collection:" + collection + " slice:" + shard);
|
throw new SolrException(ErrorCode.SERVICE_UNAVAILABLE, "No registered leader was found after waiting for "
|
||||||
|
+ timeout + "ms " + ", collection: " + collection + " slice: " + shard);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue