Skip to content

armgit / solr

Public Imported from GitHub
0

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.java
index 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.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 {
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.Cmd
coresToCreate.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 them
if (!isPRS && ocmh.getDistributedClusterStateUpdater().isDistributedStateUpdate()) {