vyatkinv commented on code in PR #4320:
URL: https://github.com/apache/solr/pull/4320#discussion_r3299084703


##########
solr/core/src/java/org/apache/solr/handler/StreamHandler.java:
##########
@@ -111,15 +112,16 @@ public void inform(SolrCore core) {
     if (coreContainer.isZooKeeperAware()) {
       defaultCollection = core.getCoreDescriptor().getCollectionName();
       defaultZkhost = 
core.getCoreContainer().getZkController().getZkServerAddress();
-      streamFactory.withCollectionZkHost(defaultCollection, defaultZkhost);
-      streamFactory.withDefaultZkHost(defaultZkhost);
+      var solrConnection = 
CloudSolrClient.CloudSolrClientConnection.parse(defaultZkhost);
+      streamFactory.withCollectionSolrConnection(defaultCollection, 
solrConnection);
+      streamFactory.withDefaultSolrConnection(solrConnection);

Review Comment:
   Why? The first line sets the default collection and connection to it, and 
the second line sets the default connection for all other collections if 
`solrConnection` is not specified in the expression itself.
   If we remove any of them, the behavior will change.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to