You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by da...@apache.org on 2018/09/28 02:17:15 UTC
[1/2] lucene-solr:jira/http2: Krb5 does not work with proxy
authentication
Repository: lucene-solr
Updated Branches:
refs/heads/jira/http2 65fb03591 -> 1664918f9
Krb5 does not work with proxy authentication
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/0e139447
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/0e139447
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/0e139447
Branch: refs/heads/jira/http2
Commit: 0e13944789de2d35d24e02e12ed8310d4b05684f
Parents: 65fb035
Author: Cao Manh Dat <da...@apache.org>
Authored: Thu Sep 27 15:35:56 2018 +0700
Committer: Cao Manh Dat <da...@apache.org>
Committed: Thu Sep 27 15:35:56 2018 +0700
----------------------------------------------------------------------
.../org/apache/solr/client/solrj/impl/Krb5HttpClientBuilder.java | 1 -
1 file changed, 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0e139447/solr/solrj/src/java/org/apache/solr/client/solrj/impl/Krb5HttpClientBuilder.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/Krb5HttpClientBuilder.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/Krb5HttpClientBuilder.java
index 813c762..7cbe1f7 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/Krb5HttpClientBuilder.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/Krb5HttpClientBuilder.java
@@ -213,7 +213,6 @@ public class Krb5HttpClientBuilder implements HttpClientBuilderFactory {
});
http2Client.getHttpClient().setAuthenticationStore(authenticationStore);
http2Client.getProtocolHandlers().put(new SolrWWWAuthenticationProtocolHandler(http2Client.getHttpClient()));
- http2Client.getProtocolHandlers().put(new SolrProxyAuthenticationProtocolHandler(http2Client.getHttpClient()));
});
}
} else {
[2/2] lucene-solr:jira/http2: Only clients in baseUrls should be
cached
Posted by da...@apache.org.
Only clients in baseUrls should be cached
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/1664918f
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/1664918f
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/1664918f
Branch: refs/heads/jira/http2
Commit: 1664918f9902136bcce5127fcadbd83a3cd10902
Parents: 0e13944
Author: Cao Manh Dat <da...@apache.org>
Authored: Thu Sep 27 15:36:47 2018 +0700
Committer: Cao Manh Dat <da...@apache.org>
Committed: Thu Sep 27 15:36:47 2018 +0700
----------------------------------------------------------------------
.../solr/client/solrj/impl/LBHttpSolrClient.java | 15 +++++++++------
.../apache/solr/client/solrj/impl/LBSolrClient.java | 9 ---------
2 files changed, 9 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/1664918f/solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBHttpSolrClient.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBHttpSolrClient.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBHttpSolrClient.java
index af4f812..a2543cf 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBHttpSolrClient.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBHttpSolrClient.java
@@ -155,6 +155,9 @@ public class LBHttpSolrClient extends LBSolrClient {
protected LBHttpSolrClient(Builder builder) {
super(builder.baseSolrUrls);
+ for (String baseUrl: builder.baseSolrUrls) {
+ urlToClient.put(baseUrl, makeSolrClient(baseUrl));
+ }
this.clientIsInternal = builder.httpClient == null;
this.httpSolrClientBuilder = builder.httpSolrClientBuilder;
this.httpClient = builder.httpClient == null ? constructClient(builder.baseSolrUrls.toArray(new String[builder.baseSolrUrls.size()])) : builder.httpClient;
@@ -246,12 +249,12 @@ public class LBHttpSolrClient extends LBSolrClient {
@Override
protected SolrClient getClient(String baseUrl) {
- return urlToClient.computeIfAbsent(baseUrl, this::makeSolrClient);
- }
-
- @Override
- protected void removeClient(String serverStr) {
- urlToClient.remove(serverStr);
+ HttpSolrClient client = urlToClient.get(baseUrl);
+ if (client == null) {
+ return makeSolrClient(baseUrl);
+ } else {
+ return client;
+ }
}
@Override
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/1664918f/solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBSolrClient.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBSolrClient.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBSolrClient.java
index 8f9b4f8..9120b2f 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBSolrClient.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBSolrClient.java
@@ -293,9 +293,6 @@ public abstract class LBSolrClient extends SolrClient {
++numServersTried;
ex = doRequest(serverStr, req, rsp, isNonRetryable, false);
- if (!aliveServers.containsKey(serverStr) && !zombieServers.containsKey(serverStr)) {
- removeClient(serverStr);
- }
if (ex == null) {
return rsp; // SUCCESS
}
@@ -348,12 +345,6 @@ public abstract class LBSolrClient extends SolrClient {
}
}
- // In some case a client which is not belonging to server list may be created to handle Req,
- // by overriding this, subclasses will be able to remove the client from cache.
- protected void removeClient(String serverStr) {
-
- }
-
/**
* @return time allowed in nanos, returns -1 if no time_allowed is specified.
*/