dsmiley commented on a change in pull request #115:
URL: https://github.com/apache/solr/pull/115#discussion_r631165486



##########
File path: solr/core/src/java/org/apache/solr/request/SolrQueryRequestBase.java
##########
@@ -144,19 +146,31 @@ public IndexSchema getSchema() {
 
   @Override
   public Tracer getTracer() {
-    if (core != null) {
-      return core.getCoreContainer().getTracer(); // this is the common path
-    }
     final HttpSolrCall call = getHttpSolrCall();
     if (call != null) {
       final Tracer tracer = (Tracer) 
call.getReq().getAttribute(Tracer.class.getName());
       if (tracer != null) {
         return tracer;
       }
     }
+    if (core != null) {
+      return core.getCoreContainer().getTracer();

Review comment:
       If _hypothetically_ (maybe in a test or some interesting custom plugins) 
have a Tracer on the request that is different than a more static/global 
tracer, then we should prefer the request tracer.  Very hypothetical!




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

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to