diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index d6aba02f386..e74e4ae3be0 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. 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 83c6326af4b..4c6dd51a781 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 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, 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 589ef7e7e94..c3a011c3f21 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: echoParams */ enum EchoParamStyle {