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 14:42:30 UTC

[lucene-solr] branch reference_impl updated: @718 Small tweaks.

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

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


The following commit(s) were added to refs/heads/reference_impl by this push:
     new 8ad4caa  @718 Small tweaks.
8ad4caa is described below

commit 8ad4caa32d8bf68f75e97f6b99878e8a635376b4
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());