lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markrmil...@apache.org
Subject svn commit: r1443022 - /lucene/dev/trunk/solr/core/src/java/org/apache/solr/cloud/ZkController.java
Date Wed, 06 Feb 2013 15:37:41 GMT
Author: markrmiller
Date: Wed Feb  6 15:37:41 2013
New Revision: 1443022

URL: http://svn.apache.org/viewvc?rev=1443022&view=rev
Log:
bail early on closed

Modified:
    lucene/dev/trunk/solr/core/src/java/org/apache/solr/cloud/ZkController.java

Modified: lucene/dev/trunk/solr/core/src/java/org/apache/solr/cloud/ZkController.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/java/org/apache/solr/cloud/ZkController.java?rev=1443022&r1=1443021&r2=1443022&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/java/org/apache/solr/cloud/ZkController.java (original)
+++ lucene/dev/trunk/solr/core/src/java/org/apache/solr/cloud/ZkController.java Wed Feb  6
15:37:41 2013
@@ -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;



Mime
View raw message