You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ro...@apache.org on 2016/05/14 18:10:10 UTC
lucene-solr:branch_6x: SOLR-8323: Handle removal of legacy collections
Repository: lucene-solr
Updated Branches:
refs/heads/branch_6x 06ebd4fd7 -> b5c369a77
SOLR-8323: Handle removal of legacy collections
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/b5c369a7
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/b5c369a7
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/b5c369a7
Branch: refs/heads/branch_6x
Commit: b5c369a773689955aa9bbd1b0bce3b7d1d96cb1b
Parents: 06ebd4f
Author: Alan Woodward <al...@romseysoftware.co.uk>
Authored: Sat May 14 19:08:21 2016 +0100
Committer: Alan Woodward <al...@romseysoftware.co.uk>
Committed: Sat May 14 19:10:03 2016 +0100
----------------------------------------------------------------------
.../src/java/org/apache/solr/common/cloud/ZkStateReader.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/b5c369a7/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java b/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
index 7c6b244..fe04d35 100644
--- a/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
@@ -519,7 +519,8 @@ public class ZkStateReader implements Closeable {
continue;
// legacy collections are always in-memory
DocCollection oldState = ref.get();
- DocCollection newState = loadedData.getCollectionStates().get(coll).get();
+ ClusterState.CollectionRef newRef = loadedData.getCollectionStates().get(coll);
+ DocCollection newState = newRef == null ? null : newRef.get();
if (!collWatch.stateWatchers.isEmpty()
&& !Objects.equals(oldState, newState)) {
notifyStateWatchers(liveNodes, coll, newState);