lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sar...@apache.org
Subject lucene-solr:branch_6_0: SOLR-8875: Fix null clusterState from ZkStateWriter. Revert my sanity check asserts in Overseer. (cherry picked from commit 3bbf8aa)
Date Fri, 20 May 2016 12:31:56 GMT
Repository: lucene-solr
Updated Branches:
  refs/heads/branch_6_0 308b50816 -> a2732fd6f


SOLR-8875: Fix null clusterState from ZkStateWriter. Revert my sanity check asserts in Overseer.
(cherry picked from commit 3bbf8aa)


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/a2732fd6
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/a2732fd6
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/a2732fd6

Branch: refs/heads/branch_6_0
Commit: a2732fd6f0899097defced1b8ee86dbc0099ac8d
Parents: 308b508
Author: David Smiley <dsmiley@apache.org>
Authored: Tue Apr 5 14:15:31 2016 -0400
Committer: Steve Rowe <sarowe@apache.org>
Committed: Fri May 20 08:31:33 2016 -0400

----------------------------------------------------------------------
 solr/CHANGES.txt                                                 | 3 +++
 solr/core/src/java/org/apache/solr/cloud/Overseer.java           | 1 +
 .../src/java/org/apache/solr/cloud/overseer/ZkStateWriter.java   | 4 ++--
 3 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a2732fd6/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 5d064a7..dfa1fe8 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -43,6 +43,9 @@ Bug Fixes
 * SOLR-8902: Make sure ReturnFields only returns the requested fields from (fl=) evn when
   DocumentTransformers ask for getExtraRequestFields()  (ryan)
 
+* SOLR-8875: SolrCloud Overseer clusterState could unexpectedly be null resulting in NPE.
+  (Scott Blum via David Smiley)
+
 Other Changes
 ----------------------
 * SOLR-7516: Improve javadocs for JavaBinCodec, ObjectResolver and enforce the single-usage
policy.

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a2732fd6/solr/core/src/java/org/apache/solr/cloud/Overseer.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/cloud/Overseer.java b/solr/core/src/java/org/apache/solr/cloud/Overseer.java
index 0e5bded..f25cab7 100644
--- a/solr/core/src/java/org/apache/solr/cloud/Overseer.java
+++ b/solr/core/src/java/org/apache/solr/cloud/Overseer.java
@@ -151,6 +151,7 @@ public class Overseer implements Closeable {
             continue; // not a no, not a yes, try ask again
           }
 
+          //TODO consider removing 'refreshClusterState' and simply check if clusterState
is null
           if (refreshClusterState) {
             try {
               reader.updateClusterState();

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a2732fd6/solr/core/src/java/org/apache/solr/cloud/overseer/ZkStateWriter.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/cloud/overseer/ZkStateWriter.java b/solr/core/src/java/org/apache/solr/cloud/overseer/ZkStateWriter.java
index 9fb3ada..ec67ed7 100644
--- a/solr/core/src/java/org/apache/solr/cloud/overseer/ZkStateWriter.java
+++ b/solr/core/src/java/org/apache/solr/cloud/overseer/ZkStateWriter.java
@@ -16,6 +16,7 @@
  */
 package org.apache.solr.cloud.overseer;
 
+import java.lang.invoke.MethodHandles;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Set;
@@ -35,8 +36,6 @@ import org.slf4j.LoggerFactory;
 
 import static java.util.Collections.singletonMap;
 
-import java.lang.invoke.MethodHandles;
-
 /**
  * ZkStateWriter is responsible for writing updates to the cluster state stored in ZooKeeper
for
  * both stateFormat=1 collection (stored in shared /clusterstate.json in ZK) and stateFormat=2
collections
@@ -84,6 +83,7 @@ public class ZkStateWriter {
 
     this.reader = zkStateReader;
     this.stats = stats;
+    this.clusterState = zkStateReader.getClusterState();
   }
 
   /**


Mime
View raw message