SOLR-8875: Fix null clusterState from ZkStateWriter. Revert my sanity check asserts in Overseer.

This commit is contained in:
David Smiley 2016-04-05 14:15:31 -04:00
parent ee98f6ab8d
commit 3bbf8aaa8a
3 changed files with 6 additions and 2 deletions

View File

@ -101,6 +101,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)
Optimizations
----------------------
* SOLR-8722: Don't force a full ZkStateReader refresh on every Overseer operation.

View File

@ -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();

View File

@ -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();
}
/**