Apache Solr open-source search software
SOLR-15138: Send an intra-process message after ZkClient#create() call
Ishan Chattopadhyaya83ccf23fa205
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.javaindex c10e9ca7180..1275698c188 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@@ -166,6 +166,7 @@ public class CreateCollectionCmd implements OverseerCollectionMessageHandler.Cmdocmh.zkStateReader.getZkClient().create(collectionPath, data, CreateMode.PERSISTENT, true);clusterState = clusterState.copyWith(collectionName, command.collection);newColl = command.collection;+ ocmh.overseer.submit(new RefreshCollectionMessage(collectionName));} else {if (ocmh.getDistributedClusterStateUpdater().isDistributedStateUpdate()) {// The message has been crafted by CollectionsHandler.CollectionOperation.CREATE_OP and defines the QUEUE_OPERATION@@ -300,6 +301,9 @@ public class CreateCollectionCmd implements OverseerCollectionMessageHandler.CmdcoresToCreate.put(coreName, sreq);}+ if(isPRS) {+ ocmh.overseer.submit(new RefreshCollectionMessage(collectionName));+ }// PRS collections did their own thing and we didn't create a StateChangeRecorder for themif (!isPRS && ocmh.getDistributedClusterStateUpdater().isDistributedStateUpdate()) {