You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by GitBox <gi...@apache.org> on 2021/11/07 18:30:31 UTC

[GitHub] [solr] dsmiley commented on pull request #376: SOLR-15635: don't repeat close hooks if SRI cleared twice

dsmiley commented on pull request #376:
URL: https://github.com/apache/solr/pull/376#issuecomment-962659255


   Thanks for pushing forward on this Mikhail!
   
   I ran tests and found that `org.apache.solr.client.solrj.io.stream.CloudAuthStreamTest#testDaemonUpdateStreamInsufficientCredentials` failed -- somehow setRequestInfo was being called with an already-closed SRI.  The call occurred in `org.apache.solr.common.util.ExecutorUtil.InheritableThreadLocalProvider#set` for SRI.  It appears that daemonStream has a lifespan that surpasses the parent request.  That makes sense -- it'a a daemon.  Maybe that executor shouldn't inherit the SRI because it's in the background and will exceed the parent request?  I lean this way.  Any opinion @joel-bernstein ?  Or we could switch to a refCount approach so that this case and maybe others will close only once it's removed from the last SRI ThreadLocal stack.  I just started playing with that but I fear there is a race between the original request closing down and the new daemon thread in the pool grabbing a reference to the SRI that will be closed in any millisecond... either could win to increase/de
 crease the refCount, meaning that sometimes the SRI would be inherited and sometimes not -- clearly not good.


-- 
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-unsubscribe@solr.apache.org

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



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