SOLR-10440: LBHttpSolrClient.doRequest is now always wrapped in a Mapped Diagnostic Context (MDC).

This commit is contained in:
Christine Poerschke 2017-04-07 11:04:41 +01:00
parent 94b83f1f7d
commit 206021578e
2 changed files with 11 additions and 3 deletions

View File

@ -201,6 +201,9 @@ Other Changes
* SOLR-10394: Rename getSortWithinGroup to getWithinGroupSort in search.grouping.Command class.
(Judith Silverman, Christine Poerschke)
* SOLR-10440: LBHttpSolrClient.doRequest is now always wrapped in a Mapped Diagnostic Context (MDC).
(Christine Poerschke)
================== 6.5.1 ==================
Bug Fixes

View File

@ -404,9 +404,14 @@ public class LBHttpSolrClient extends SolrClient {
break;
}
ex = doRequest(wrapper.client, req, rsp, isNonRetryable, true, wrapper.getKey());
if (ex == null) {
return rsp; // SUCCESS
try {
MDC.put("LBHttpSolrClient.url", wrapper.client.getBaseURL());
ex = doRequest(wrapper.client, req, rsp, isNonRetryable, true, wrapper.getKey());
if (ex == null) {
return rsp; // SUCCESS
}
} finally {
MDC.remove("LBHttpSolrClient.url");
}
}
}