janhoy commented on a change in pull request #2472:
URL: https://github.com/apache/lucene-solr/pull/2472#discussion_r648234288
##########
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:
Ok, this is for validation of `leaderUrl` in replication handler. In
SOLR-15340 the setting is renamed to `allowUrls` which better reflects the
generic intent for it, such as validating any user/config provided URL in the
system.
As this sounds like a bug, please file a NEW Jira issue with a clear
description on how to reproduce the issue, including the Exception stacktrace
you see, so we can get a bug fix in the next bugfix release.
--
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]