SOLR-12377: Don't spin off overseer when Zk controller is closed.

enable TestLeaderElectionZkExpiry
This commit is contained in:
Mikhail Khludnev 2018-05-22 11:25:57 +03:00
parent 24c186eff9
commit 0f14e7fe5c
3 changed files with 3 additions and 2 deletions

View File

@ -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
----------------------

View File

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

View File

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