lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From romseyg...@apache.org
Subject lucene-solr:master: SOLR-8323: Handle removal of legacy collections
Date Sat, 14 May 2016 18:09:25 GMT
Repository: lucene-solr
Updated Branches:
  refs/heads/master 963c6522b -> c0d23a741


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/c0d23a74
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/c0d23a74
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/c0d23a74

Branch: refs/heads/master
Commit: c0d23a741e9f2c787ab322e29c67108e5fd5c692
Parents: 963c652
Author: Alan Woodward <alan.woodward@romseysoftware.co.uk>
Authored: Sat May 14 19:08:21 2016 +0100
Committer: Alan Woodward <alan.woodward@romseysoftware.co.uk>
Committed: Sat May 14 19:08:21 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/c0d23a74/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);


Mime
View raw message