mirror of
https://github.com/apache/lucene.git
synced 2025-02-24 11:16:35 +00:00
SOLR-8254: HttpSolrCore.getCoreByCollection() can throw NPE
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1713468 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4921f13576
commit
1057db3e14
@ -351,6 +351,9 @@ Bug Fixes
|
||||
* SOLR-8255: MiniSolrCloudCluster needs to use a thread-safe list to keep track
|
||||
of its child nodes (Alan Woodward)
|
||||
|
||||
* SOLR-8254: HttpSolrCore.getCoreByCollection() can throw NPE (Alan Woodward,
|
||||
Mark Miller)
|
||||
|
||||
Optimizations
|
||||
----------------------
|
||||
|
||||
|
@ -783,10 +783,8 @@ public class HttpSolrCall {
|
||||
for (Map.Entry<String, Slice> entry : entries) {
|
||||
// first see if we have the leader
|
||||
Replica leaderProps = clusterState.getLeader(collection, entry.getKey());
|
||||
if (liveNodes.contains(leaderProps.getNodeName()) && leaderProps.getState() == Replica.State.ACTIVE) {
|
||||
if (leaderProps != null) {
|
||||
core = checkProps(leaderProps);
|
||||
}
|
||||
if (leaderProps != null && liveNodes.contains(leaderProps.getNodeName()) && leaderProps.getState() == Replica.State.ACTIVE) {
|
||||
core = checkProps(leaderProps);
|
||||
if (core != null) {
|
||||
return core;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user