You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ma...@apache.org on 2020/09/03 15:06:44 UTC

[lucene-solr] 01/02: @718 Small tweaks.

This is an automated email from the ASF dual-hosted git repository.

markrmiller pushed a commit to branch reference_impl_dev
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git

commit ad28bd38f7ac6b4e70000bc69f81fdd97c08281d
Author: markrmiller@gmail.com <ma...@gmail.com>
AuthorDate: Thu Sep 3 09:42:06 2020 -0500

    @718 Small tweaks.
---
 solr/core/src/java/org/apache/solr/cloud/ZkCollectionTerms.java      | 2 --
 .../cloud/api/collections/CollectionsAPIAsyncDistributedZkTest.java  | 5 ++---
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/solr/core/src/java/org/apache/solr/cloud/ZkCollectionTerms.java b/solr/core/src/java/org/apache/solr/cloud/ZkCollectionTerms.java
index 25d2b27..73e3ce0 100644
--- a/solr/core/src/java/org/apache/solr/cloud/ZkCollectionTerms.java
+++ b/solr/core/src/java/org/apache/solr/cloud/ZkCollectionTerms.java
@@ -44,7 +44,6 @@ class ZkCollectionTerms implements AutoCloseable {
 
   public ZkShardTerms getShard(String shardId) {
     synchronized (terms) {
-      if (closed) throw new AlreadyClosedException();
       if (!terms.containsKey(shardId)) terms.put(shardId, new ZkShardTerms(collection, shardId, zkClient));
       return terms.get(shardId);
     }
@@ -52,7 +51,6 @@ class ZkCollectionTerms implements AutoCloseable {
 
   public void register(String shardId, String coreNodeName) {
     synchronized (terms)  {
-      if (closed) throw new AlreadyClosedException();
       getShard(shardId).registerTerm(coreNodeName);
     }
   }
diff --git a/solr/core/src/test/org/apache/solr/cloud/api/collections/CollectionsAPIAsyncDistributedZkTest.java b/solr/core/src/test/org/apache/solr/cloud/api/collections/CollectionsAPIAsyncDistributedZkTest.java
index 6bdf8f4..afdb676 100644
--- a/solr/core/src/test/org/apache/solr/cloud/api/collections/CollectionsAPIAsyncDistributedZkTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/api/collections/CollectionsAPIAsyncDistributedZkTest.java
@@ -89,14 +89,14 @@ public class CollectionsAPIAsyncDistributedZkTest extends SolrCloudTestCase {
 
     state = CollectionAdminRequest.addReplicaToShard("testasynccollectioncreation", "shard1")
       .processAndWait(client, MAX_TIMEOUT_SECONDS);
-    assertSame("Add replica did not complete", RequestStatusState.COMPLETED, state);
+      assertSame("Add replica did not complete", RequestStatusState.COMPLETED, state);
 
     state = CollectionAdminRequest.splitShard("testasynccollectioncreation")
         .setShardName("shard1")
         .processAndWait(client, MAX_TIMEOUT_SECONDS * 2);
     assertEquals("Shard split did not complete. Last recorded state: " + state, RequestStatusState.COMPLETED, state);
 
-  }
+    }
 
   @Test
   public void testAsyncRequests() throws Exception {
@@ -269,7 +269,6 @@ public class CollectionsAPIAsyncDistributedZkTest extends SolrCloudTestCase {
           }
         });
       }
-      es.shutdown();
       assertTrue(es.awaitTermination(10, TimeUnit.SECONDS));
       assertEquals(1, numSuccess.get());
       assertEquals((TEST_NIGHTLY ? 10 : 3) - 1, numFailure.get());