lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sha...@apache.org
Subject lucene-solr:master: SOLR-10281: ADMIN_PATHS is duplicated in two places and inconsistent
Date Thu, 23 Mar 2017 14:03:55 GMT
Repository: lucene-solr
Updated Branches:
  refs/heads/master 4edfc1a9c -> c221ef0fd


SOLR-10281: ADMIN_PATHS is duplicated in two places and inconsistent


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/c221ef0f
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/c221ef0f
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/c221ef0f

Branch: refs/heads/master
Commit: c221ef0fdedaa92885746b3073150f0bd558f596
Parents: 4edfc1a
Author: Shalin Shekhar Mangar <shalin@apache.org>
Authored: Thu Mar 23 19:33:45 2017 +0530
Committer: Shalin Shekhar Mangar <shalin@apache.org>
Committed: Thu Mar 23 19:33:45 2017 +0530

----------------------------------------------------------------------
 solr/CHANGES.txt                                     |  5 +++++
 .../solr/client/solrj/impl/CloudSolrClient.java      | 15 +--------------
 .../org/apache/solr/common/params/CommonParams.java  |  4 +++-
 3 files changed, 9 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c221ef0f/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index d6aba02..e74e4ae 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -123,6 +123,11 @@ Optimizations
   instance if it already is modifiable, otherwise creates a new ModifiableSolrParams instance.
   (Jörg Rathlev via Koji)
 
+Bug Fixes
+----------------------
+* SOLR-10281: ADMIN_PATHS is duplicated in two places and inconsistent. This can cause automatic
+  retries to /admin/metrics handler by the CloudSolrClient. (shalin)
+
 ==================  6.5.0 ==================
 
 Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c221ef0f/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java
index 83c6326..4c6dd51 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java
@@ -84,11 +84,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.slf4j.MDC;
 
-import static org.apache.solr.common.params.CommonParams.AUTHC_PATH;
-import static org.apache.solr.common.params.CommonParams.AUTHZ_PATH;
-import static org.apache.solr.common.params.CommonParams.COLLECTIONS_HANDLER_PATH;
-import static org.apache.solr.common.params.CommonParams.CONFIGSETS_HANDLER_PATH;
-import static org.apache.solr.common.params.CommonParams.CORES_HANDLER_PATH;
+import static org.apache.solr.common.params.CommonParams.ADMIN_PATHS;
 import static org.apache.solr.common.params.CommonParams.ID;
 
 /**
@@ -1057,15 +1053,6 @@ public class CloudSolrClient extends SolrClient {
       collection = (reqParams != null) ? reqParams.get("collection", getDefaultCollection())
: getDefaultCollection();
     return requestWithRetryOnStaleState(request, 0, collection);
   }
-  private static final Set<String> ADMIN_PATHS = new HashSet<>(Arrays.asList(
-      CORES_HANDLER_PATH,
-      COLLECTIONS_HANDLER_PATH,
-      CONFIGSETS_HANDLER_PATH,
-      AUTHC_PATH,
-      AUTHZ_PATH,
-      "/____v2/cluster/security/authentication",
-      "/____v2/cluster/security/authorization"
-      ));
 
   /**
    * As this class doesn't watch external collections on the client side,

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c221ef0f/solr/solrj/src/java/org/apache/solr/common/params/CommonParams.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/common/params/CommonParams.java b/solr/solrj/src/java/org/apache/solr/common/params/CommonParams.java
index 589ef7e..c3a011c 100644
--- a/solr/solrj/src/java/org/apache/solr/common/params/CommonParams.java
+++ b/solr/solrj/src/java/org/apache/solr/common/params/CommonParams.java
@@ -188,7 +188,9 @@ public interface CommonParams {
       CONFIGSETS_HANDLER_PATH,
       AUTHC_PATH,
       AUTHZ_PATH,
-      METRICS_PATH));
+      METRICS_PATH,
+      "/____v2/cluster/security/authentication",
+      "/____v2/cluster/security/authorization"));
 
   /** valid values for: <code>echoParams</code> */
   enum EchoParamStyle {


Mime
View raw message