You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sh...@apache.org on 2020/02/09 12:35:47 UTC

[lucene-solr] branch jira/solr-13996 updated: SOLR-13996: Removed explicit whitelist host checking for the short circuiting case because the hosts have already been checked in CloudReplicaSource

This is an automated email from the ASF dual-hosted git repository.

shalin pushed a commit to branch jira/solr-13996
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/jira/solr-13996 by this push:
     new adb5ae2  SOLR-13996: Removed explicit whitelist host checking for the short circuiting case because the hosts have already been checked in CloudReplicaSource
adb5ae2 is described below

commit adb5ae24340543e4046b81543d6443e0201624be
Author: Shalin Shekhar Mangar <sh...@apache.org>
AuthorDate: Sun Feb 9 17:58:42 2020 +0530

    SOLR-13996: Removed explicit whitelist host checking for the short circuiting case because the hosts have already been checked in CloudReplicaSource
---
 .../org/apache/solr/handler/component/CloudReplicaSource.java     | 4 ++--
 .../java/org/apache/solr/handler/component/HttpShardHandler.java  | 8 --------
 2 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/solr/core/src/java/org/apache/solr/handler/component/CloudReplicaSource.java b/solr/core/src/java/org/apache/solr/handler/component/CloudReplicaSource.java
index fb0285c..5ff8ec9 100644
--- a/solr/core/src/java/org/apache/solr/handler/component/CloudReplicaSource.java
+++ b/solr/core/src/java/org/apache/solr/handler/component/CloudReplicaSource.java
@@ -59,7 +59,7 @@ class CloudReplicaSource implements ReplicaSource {
     }
   }
 
-  private void withClusterState(final Builder builder, SolrParams params) {
+  private void withClusterState(Builder builder, SolrParams params) {
     ClusterState clusterState = builder.zkStateReader.getClusterState();
     String shardKeys = params.get(ShardParams._ROUTE_);
 
@@ -98,7 +98,7 @@ class CloudReplicaSource implements ReplicaSource {
     }
   }
 
-  private void withShardsParam(final Builder builder, String shardsParam) {
+  private void withShardsParam(Builder builder, String shardsParam) {
     List<String> sliceOrUrls = StrUtils.splitSmart(shardsParam, ",", true);
     this.slices = new String[sliceOrUrls.size()];
     this.replicas = new List[sliceOrUrls.size()];
diff --git a/solr/core/src/java/org/apache/solr/handler/component/HttpShardHandler.java b/solr/core/src/java/org/apache/solr/handler/component/HttpShardHandler.java
index c1224b5..ca6dddf 100644
--- a/solr/core/src/java/org/apache/solr/handler/component/HttpShardHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/component/HttpShardHandler.java
@@ -18,7 +18,6 @@ package org.apache.solr.handler.component;
 
 import java.io.IOException;
 import java.net.ConnectException;
-import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
@@ -312,13 +311,6 @@ public class HttpShardHandler extends ShardHandler {
       rb.slices = replicaSource.getSliceNames().toArray(new String[replicaSource.getSliceCount()]);
 
       if (canShortCircuit(rb.slices, onlyNrt, params, cloudDescriptor)) {
-        if (hostChecker.isWhitelistHostCheckingEnabled() && hostChecker.hasExplicitWhitelist()) {
-          /*
-           * We only need to check the host whitelist if there is an explicit whitelist (other than all the live nodes)
-           * when the "shards" indicate cluster state elements only
-           */
-          hostChecker.checkWhitelist(zkController.getClusterState(), shards, Collections.singletonList(rb.shortCircuitedURL));
-        }
         rb.isDistrib = false;
         rb.shortCircuitedURL = ZkCoreNodeProps.getCoreUrl(zkController.getBaseUrl(), coreDescriptor.getName());
         return;