SOLR-15138: Send an intra-process message after ZkClient#create() call

This commit is contained in:
Ishan Chattopadhyaya 2021-02-15 12:22:22 +05:30
parent 8f56ae0a4b
commit 83ccf23fa2
1 changed files with 4 additions and 0 deletions

View File

@ -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()) {