dsmiley commented on PR #2876:
URL: https://github.com/apache/solr/pull/2876#issuecomment-2777480066

   > ServletApiRequest.getRequest() will return a non-null value once the 
request crosses an async boundary (e.g., background threads, ExecutorService, 
etc.)
   
   This wasn't clear to me so I dug a little further.  So, the standard servlet 
`HttpServletRequest`, implemented by Jetty, is `ServletApiRequest`... and many 
of it's methods call an internal `getRequest` that could return null, throwing 
an NPE.
   
   Wow... that sounds so brittle!  Basically any HttpServletRequest usage 
across Solr outside of the front door might throw NPE?!  Ouch!  Your fix for 
the tracing issue makes sense -- +1 to that.  But it seems like there's a 
bigger risk.  Any Solr code can call 
`SolrQueryRequest.getHttpSolrCall().getReq()` or 
`org.apache.solr.request.SolrRequestInfo#getUserPrincipal`.  The second could 
be early resolved I guess but the getReq might need a big fat warning.


-- 
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: issues-unsubscr...@solr.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to