imario42 opened a new pull request, #14280: URL: https://github.com/apache/lucene/pull/14280
lazy initialize the ScorerUtil DEFAULT_IMPACTS_ENUM_CLASS to prevent initialization issues with this class if the thread gets interrupted. ### Description The ScorerUtils fails to initialize if a thread gets interrupted right when it executes its static initialization routine. One has to restart the JVM then to make it work again. `Caused by: java.lang.ExceptionInInitializerError: Exception org.apache.lucene.util.ThreadInterruptedException: java.lang.InterruptedException [in thread "/ng_api/infoHub/suggestions"] at org.apache.lucene.index.IndexWriter$EventQueue.close(IndexWriter.java:354) at org.apache.lucene.index.IndexWriter.rollbackInternalNoCommit(IndexWriter.java:2506) at org.apache.lucene.index.IndexWriter.rollbackInternal(IndexWriter.java:2456) at org.apache.lucene.index.IndexWriter.shutdown(IndexWriter.java:1341) at org.apache.lucene.index.IndexWriter.close(IndexWriter.java:1369) at org.apache.lucene.search.ScorerUtil.<clinit>(ScorerUtil.java:56)` I made the patch so that it will ignore double-initialization of that constant in case of multithreading. I thought it is not worth to tackle with that in that scenario. -- 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