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

   I get crazy when I see this code (before and after). 😜
   
   In general I would rewrite that in a different way to not use a test index 
to initialize the code. Can't we figure out what the class is in a better way, 
so the initializer does not need to do interruptible things?
   
   About the initialization and the code: There are multiple issues like 
missing synchronization. It may not be an issue but it's unfortunately an 
anti-pattern. The problem is also that the optimizer cannot assume that the 
returned value is constant.
   
   Finally: Lucene explicitly says that interrupting a search thread is not 
supported and may cause other havoc. 
   
   -1 to merge this. Better rewrite the code not not fo crazy stuff in an 
static initialization block.


-- 
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