cholpas commented on a change in pull request #2472:
URL: https://github.com/apache/lucene-solr/pull/2472#discussion_r648376275



##########
File path: solr/core/src/java/org/apache/solr/handler/IndexFetcher.java
##########
@@ -271,7 +274,34 @@ public IndexFetcher(@SuppressWarnings({"rawtypes"})final 
NamedList initArgs, fin
     String httpBasicAuthPassword = (String) 
initArgs.get(HttpClientUtil.PROP_BASIC_AUTH_PASS);
     myHttpClient = createHttpClient(solrCore, httpBasicAuthUser, 
httpBasicAuthPassword, useExternalCompression);
   }
-  
+
+  private void setLeaderUrl(String leaderUrl) {
+    if (leaderUrl != null) {
+      ShardHandlerFactory shardHandlerFactory = 
solrCore.getCoreContainer().getShardHandlerFactory();
+      if (shardHandlerFactory instanceof HttpShardHandlerFactory) {
+        ZkController zkController = 
solrCore.getCoreContainer().getZkController();
+        ClusterState clusterState = zkController == null ? null : 
zkController.getClusterState();
+        try {
+          ((HttpShardHandlerFactory) 
shardHandlerFactory).getWhitelistHostChecker()
+              .checkWhitelist(clusterState, null, 
Collections.singletonList(leaderUrl));

Review comment:
       Hmm, yes... I tried now tried twice to create a jira ticket and spent 
quite some time formatting it nicely. Both times (with different IPs) when 
submitting the ticket I got `Your request has been blocked. If you feel this is 
in error, please let us know at: ab...@infra.apache.org`. Srsly, wtf... I 
already sent an email there, but didn't get a response.




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

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



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

Reply via email to