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


##########
solr/solrj-streaming/src/java/org/apache/solr/client/solrj/io/SolrClientCache.java:
##########
@@ -76,36 +77,44 @@ public void setDefaultZKHost(String zkHost) {
     }
   }
 
-  public synchronized CloudSolrClient getCloudSolrClient(String 
connectionString) {
+  /**
+   * @deprecated use {@link 
#getCloudSolrClient(CloudSolrClient.CloudSolrClientConnection)}
+   */
+  @Deprecated
+  public CloudSolrClient getCloudSolrClient(String solrConnectionString) {
+    var solrConnection = 
CloudSolrClient.CloudSolrClientConnection.parse(solrConnectionString);
+    return getCloudSolrClient(solrConnection);
+  }
+
+  public synchronized CloudSolrClient getCloudSolrClient(
+      CloudSolrClient.CloudSolrClientConnection solrConnection) {
     ensureOpen();
-    Objects.requireNonNull(connectionString, "Connection string cannot be 
null!");
-    if (solrClients.containsKey(connectionString)) {
-      return (CloudSolrClient) solrClients.get(connectionString);
+    Objects.requireNonNull(solrConnection, "'solrConnection' cannot be null!");
+    String cacheKey = solrConnection.toString();

Review Comment:
   why not make the key a solrConnection, now that you've separated 
cloudSolrClients?



-- 
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