You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2022/08/24 21:29:20 UTC

[GitHub] [lucene] uschindler commented on pull request #11718: Fix classloading deadlock in analysis factories / AnalysisSPILoader initialization

uschindler commented on PR #11718:
URL: https://github.com/apache/lucene/pull/11718#issuecomment-1226396597

   This fix is more or less a copy of the SPI loader code we use in Codec, PostingsFormat, DocValuesFormat,...
   
   The general issue is: Nowhere in Java you should have a static initializer in a superclass that initializes instances of subclasses. This will deadlock if two threads load different subclasses at same time.
   
   See discussions in older issues about this. We had the same issue also with TermsEnum that @danmuzi found.
   
   The problem was not yet visible in Elasticsearch as the analysis factories are not used there in the same way like codecs components. We should  still fix this, the issue #11701 was marked as critical.


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

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


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