From 2df3175e88cf01a0e50856cbf7b78fcef101335f Mon Sep 17 00:00:00 2001 From: "markrmiller@gmail.com" Date: Wed, 15 Jul 2020 11:52:40 -0500 Subject: [PATCH] #176 - Improve Overseer election version of same thing. --- .../java/org/apache/solr/cloud/OverseerElectionContext.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/solr/core/src/java/org/apache/solr/cloud/OverseerElectionContext.java b/solr/core/src/java/org/apache/solr/cloud/OverseerElectionContext.java index 256cb13f90d6..e6979ae8f5f8 100644 --- a/solr/core/src/java/org/apache/solr/cloud/OverseerElectionContext.java +++ b/solr/core/src/java/org/apache/solr/cloud/OverseerElectionContext.java @@ -44,7 +44,8 @@ public OverseerElectionContext(final String zkNodeName, SolrZkClient zkClient, O @Override void runLeaderProcess(ElectionContext context, boolean weAreReplacement, int pauseBeforeStartMs) throws KeeperException, InterruptedException, IOException { - if (isClosed) { + if (isClosed || zkClient.isClosed()) { + log.info("Bailing on becoming leader, we are closed"); return; }