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

This commit is contained in:
Shalin Shekhar Mangar 2017-03-23 19:33:45 +05:30
parent 09739b66cb
commit aee74077fd
3 changed files with 9 additions and 15 deletions

View File

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

View File

@ -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,

View File

@ -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 {