diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index 38cd54529cc..1129ff12f92 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -228,6 +228,8 @@ Bug Fixes * SOLR-12355: Fixes hash conflict in HashJoinStream and OuterHashJoinStream (Dennis Gove) +* SOLR-12377: Don't spin off overseer when Zk controller is closed (Mikhail Khludnev) + Optimizations ---------------------- diff --git a/solr/core/src/java/org/apache/solr/cloud/ElectionContext.java b/solr/core/src/java/org/apache/solr/cloud/ElectionContext.java index ae5c452bed1..5ee5bdd2c5f 100644 --- a/solr/core/src/java/org/apache/solr/cloud/ElectionContext.java +++ b/solr/core/src/java/org/apache/solr/cloud/ElectionContext.java @@ -847,7 +847,7 @@ final class OverseerElectionContext extends ElectionContext { log.warn("Wait interrupted ", e); } } - if (overseer.getZkController() == null || overseer.getZkController().getCoreContainer() == null || !overseer.getZkController().getCoreContainer().isShutDown()) { + if (!overseer.getZkController().isClosed() && !overseer.getZkController().getCoreContainer().isShutDown()) { overseer.start(id); } } diff --git a/solr/core/src/test/org/apache/solr/cloud/TestLeaderElectionZkExpiry.java b/solr/core/src/test/org/apache/solr/cloud/TestLeaderElectionZkExpiry.java index 17cfbe30f6c..b890777437b 100644 --- a/solr/core/src/test/org/apache/solr/cloud/TestLeaderElectionZkExpiry.java +++ b/solr/core/src/test/org/apache/solr/cloud/TestLeaderElectionZkExpiry.java @@ -41,7 +41,6 @@ public class TestLeaderElectionZkExpiry extends SolrTestCaseJ4 { private static final int MIN_NODES = 4; @Test - @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // 17-Mar-2018 public void testLeaderElectionWithZkExpiry() throws Exception { String zkDir = createTempDir("zkData").toFile().getAbsolutePath(); Path ccDir = createTempDir("testLeaderElectionWithZkExpiry-solr");