You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by no...@apache.org on 2021/02/15 06:42:16 UTC

[lucene-solr] branch jira/solr15138_3 created (now 086a01f)

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

noble pushed a change to branch jira/solr15138_3
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git.


      at 086a01f  fixing the shardsplit tests

This branch includes the following new commits:

     new 086a01f  fixing the shardsplit tests

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[lucene-solr] 01/01: fixing the shardsplit tests

Posted by no...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 086a01f452e87598be1f4802940f0c7227612c4a
Author: noblepaul <no...@gmail.com>
AuthorDate: Mon Feb 15 17:41:52 2021 +1100

    fixing the shardsplit tests
---
 .../solr/cloud/api/collections/CreateCollectionCmd.java       | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/solr/core/src/java/org/apache/solr/cloud/api/collections/CreateCollectionCmd.java b/solr/core/src/java/org/apache/solr/cloud/api/collections/CreateCollectionCmd.java
index 6d9e67e..957d272 100644
--- a/solr/core/src/java/org/apache/solr/cloud/api/collections/CreateCollectionCmd.java
+++ b/solr/core/src/java/org/apache/solr/cloud/api/collections/CreateCollectionCmd.java
@@ -188,6 +188,7 @@ public class CreateCollectionCmd implements OverseerCollectionMessageHandler.Cmd
         ocmh.zkStateReader.getZkClient().create(collectionPath, data, CreateMode.PERSISTENT, true);
         clusterState = clusterState.copyWith(collectionName, command.collection);
         newColl = command.collection;
+        ocmh.overseer.submit(new RefreshCollectionMessage(collectionName));
       } else {
         ocmh.overseer.offerStateUpdate(Utils.toJSON(message));
 
@@ -319,6 +320,9 @@ public class CreateCollectionCmd implements OverseerCollectionMessageHandler.Cmd
           coresToCreate.put(coreName, sreq);
         }
       }
+      if(isPRS) {
+        ocmh.overseer.submit(new RefreshCollectionMessage(collectionName));
+      }
 
       if(!isLegacyCloud) {
         // wait for all replica entries to be created
@@ -350,11 +354,10 @@ public class CreateCollectionCmd implements OverseerCollectionMessageHandler.Cmd
           Thread.sleep(100);
           prs = PerReplicaStates.fetch(collectionPath, ocmh.zkStateReader.getZkClient(), null);
         }
-        if (prs.allActive()) {
-          // we have successfully found all replicas to be ACTIVE
-        } else {
+        if (!prs.allActive()) {
           failure = true;
-        }
+        }  // we have successfully found all replicas to be ACTIVE
+
         // Now ask Overseer to fetch the latest state of collection
         // from ZK
         ocmh.overseer.submit(new RefreshCollectionMessage(collectionName));