uschindler commented on issue #11701:
URL: https://github.com/apache/lucene/issues/11701#issuecomment-1226293731

   Hi,
   this is exactly the same issue we have seen with Codecs and PostingsFormats. 
The problem is the following: The base class of all analysis factories 
(TokenizerFactory, TokenFilterFactory, and CharFilterFactory) has a static 
initializer that runs the SPI lookup. This causes all subclasses to be 
initialized. If another thread is doing the same it happens that the deadlock 
occurs.
   
   A workaround was implemented for Codecs and other components in Lucene core, 
but not yet for analysis components:
   
https://github.com/apache/lucene/blob/main/lucene/core/src/java/org/apache/lucene/codecs/Codec.java#L40-L59
   
   This must be done in the three base classes in same way. Actually as there 
is no "default analyzer" the extra checks can be ommitted. It is just important 
to move the static field into a separate class outside of analysis class 
hierarchy.
   
   I will tkae care of this issue. In which verison did you see this? We may 
backport it to 8.x series but I would fix the issue for versions 9.x first.


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

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


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

Reply via email to