iamsanjay commented on code in PR #2689:
URL: https://github.com/apache/solr/pull/2689#discussion_r1766118550


##########
solr/core/src/java/org/apache/solr/core/CoreContainer.java:
##########
@@ -2563,6 +2581,11 @@ public PlacementPluginFactory<? extends 
PlacementPluginConfig> getPlacementPlugi
     return this.distributedCollectionCommandRunner;
   }
 
+  /** Returns default http solr client. */
+  public SolrClient getDefaultHttpClient() {

Review Comment:
   I've observed that some classes take implementation classes as references, 
which makes them harder to change. For example, SolrClientCache initially used 
the Apache Http Client, but when Http2SolrClient was introduced, a new 
constructor was needed. Similarly, SolrClientCloudManager uses 
CloudLegacySolrClient, which complicates future changes. We might eventually 
need to introduce a SolrClientCloudManager2 to accommodate CloudSolrClient.
   



##########
solr/core/src/java/org/apache/solr/core/CoreContainer.java:
##########
@@ -2563,6 +2581,11 @@ public PlacementPluginFactory<? extends 
PlacementPluginConfig> getPlacementPlugi
     return this.distributedCollectionCommandRunner;
   }
 
+  /** Returns default http solr client. */
+  public SolrClient getDefaultHttpClient() {

Review Comment:
   The main point is that sticking to interfaces makes future changes easier.
   I've observed that some classes take implementation classes as references, 
which makes them harder to change. For example, SolrClientCache initially used 
the Apache Http Client, but when Http2SolrClient was introduced, a new 
constructor was needed. Similarly, SolrClientCloudManager uses 
CloudLegacySolrClient, which complicates future changes. We might eventually 
need to introduce a SolrClientCloudManager2 to accommodate CloudSolrClient.
   



-- 
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: issues-unsubscr...@solr.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to