From 250a867de268b597b840cc38c4d6fe465d54a511 Mon Sep 17 00:00:00 2001 From: Christine Poerschke Date: Fri, 19 Aug 2016 10:01:45 +0100 Subject: [PATCH] SOLR-9391: LBHttpSolrClient.request now correctly returns Rsp.server when previously skipped servers were successfully tried. --- solr/CHANGES.txt | 3 +++ .../org/apache/solr/client/solrj/impl/LBHttpSolrClient.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index fccfa434a54..91347a5dafb 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -218,6 +218,9 @@ Bug Fixes * SOLR-9032: Admin UI now correctly implements Create Alias command (Upayavira, Alexandre Rafalovitch) +* SOLR-9391: LBHttpSolrClient.request now correctly returns Rsp.server when + previously skipped servers were successfully tried. (Christine Poerschke) + Optimizations ---------------------- 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 eaf593e4591..c65a3283897 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 @@ -358,7 +358,6 @@ public class LBHttpSolrClient extends SolrClient { } continue; } - rsp.server = serverStr; try { MDC.put("LBHttpSolrClient.url", serverStr); HttpSolrClient client = makeSolrClient(serverStr); @@ -410,6 +409,7 @@ public class LBHttpSolrClient extends SolrClient { boolean isZombie, String zombieKey) throws SolrServerException, IOException { Exception ex = null; try { + rsp.server = client.getBaseURL(); rsp.rsp = client.request(req.getRequest(), (String) null); if (isZombie) { zombieServers.remove(zombieKey);