You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ma...@apache.org on 2020/07/27 14:14:35 UTC
[lucene-solr] 01/02: @377 Try to avoid NPE.
This is an automated email from the ASF dual-hosted git repository.
markrmiller pushed a commit to branch reference_impl
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
commit 38914b70ec8b9386fd9f9f34385988d5322192f7
Author: markrmiller@gmail.com <ma...@gmail.com>
AuthorDate: Mon Jul 27 09:13:54 2020 -0500
@377 Try to avoid NPE.
---
solr/core/src/java/org/apache/solr/cloud/overseer/NodeMutator.java | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/solr/core/src/java/org/apache/solr/cloud/overseer/NodeMutator.java b/solr/core/src/java/org/apache/solr/cloud/overseer/NodeMutator.java
index 1d63264..7819db5 100644
--- a/solr/core/src/java/org/apache/solr/cloud/overseer/NodeMutator.java
+++ b/solr/core/src/java/org/apache/solr/cloud/overseer/NodeMutator.java
@@ -44,8 +44,11 @@ public class NodeMutator {
log.debug("DownNode state invoked for node: {}", nodeName);
- for (DocCollection docCollection : clusterState.getCollectionsMap().values()) {
- String collection = docCollection.getName();
+ for (String collection : clusterState.getCollectionStates().keySet()) {
+ DocCollection docCollection = clusterState.getCollectionOrNull(collection);
+ if (docCollection == null) {
+ continue;
+ }
Map<String,Slice> slicesCopy = new LinkedHashMap<>(docCollection.getSlicesMap());