From d5a2081b8bb3be2c51db06803eba7ac7e7c4035f Mon Sep 17 00:00:00 2001 From: Mark Robert Miller Date: Wed, 6 Feb 2013 15:37:41 +0000 Subject: [PATCH] bail early on closed git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1443022 13f79535-47bb-0310-9956-ffa450edef68 --- solr/core/src/java/org/apache/solr/cloud/ZkController.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/solr/core/src/java/org/apache/solr/cloud/ZkController.java b/solr/core/src/java/org/apache/solr/cloud/ZkController.java index 928deb2f916..ac388b9824c 100644 --- a/solr/core/src/java/org/apache/solr/cloud/ZkController.java +++ b/solr/core/src/java/org/apache/solr/cloud/ZkController.java @@ -1194,6 +1194,11 @@ public final class ZkController { int retries = 6; for (int i = 0; i < retries; i++) { try { + if (isClosed) { + throw new SolrException(ErrorCode.SERVICE_UNAVAILABLE, + "We have been closed"); + } + // go straight to zk, not the cloud state - we must have current info leaderProps = getLeaderProps(collection, shard, 30000); break;