dsmiley commented on code in PR #3985:
URL: https://github.com/apache/solr/pull/3985#discussion_r2649732717
##########
solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java:
##########
@@ -134,37 +119,28 @@ public void init(FilterConfig config) throws
ServletException {
}
} finally {
log.trace("SolrDispatchFilter.init() done");
- init.countDown();
}
}
- /** The CoreContainer. It's ready for use, albeit could shut down whenever.
Never null. */
- public CoreContainer getCores() throws UnavailableException {
- return containerProvider.getCoreContainer();
- }
-
@Override
- @SuppressForbidden(
- reason =
- "Set the thread contextClassLoader for all 3rd party dependencies
that we cannot control")
public void doFilter(HttpServletRequest request, HttpServletResponse
response, FilterChain chain)
throws IOException, ServletException {
+ // internal version of doFilter that tracks if we are in a retry
+ doFilterRetry(closeShield(request), closeShield(response), chain, false);
+ }
- try (var mdcSnapshot = MDCSnapshot.create()) {
- assert null != mdcSnapshot; // prevent compiler warning
- MDCLoggingContext.reset();
- MDCLoggingContext.setNode(getCores());
-
Thread.currentThread().setContextClassLoader(getCores().getResourceLoader().getClassLoader());
+ /*
- doFilterRetry(closeShield(request), closeShield(response), chain, false);
- }
- }
+ Wait? Where did X go??? (I hear you ask). First: look for a servlet filter
to which request wrapping
Review Comment:
I appreciate the comment but I think it could be worded more directly to the
point.
"NOTE: Remember Solr has a series of Servlet filters in advance doing
miscellaneous things like MDC, excludePatterns, ..."
The above comment would be searchablel.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]