You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Trejkaz (Jira)" <ji...@apache.org> on 2021/09/23 03:05:00 UTC

[jira] [Comment Edited] (LUCENE-5572) JapaneseTokenizer is sensitive to interrupts

    [ https://issues.apache.org/jira/browse/LUCENE-5572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17418917#comment-17418917 ] 

Trejkaz edited comment on LUCENE-5572 at 9/23/21, 3:04 AM:
-----------------------------------------------------------

Looking at this now, the code hasn't changed since it was dropped, so this remains an issue today.

https://github.com/apache/lucene-solr/blob/12c9b8b4bf716f7b943a8983d21f22a5f969a9a2/modules/analysis/kuromoji/src/java/org/apache/lucene/analysis/kuromoji/dict/TokenInfoDictionary.java

The gist of the issue is that a thread being interrupted causes blocking IO calls to throw InterruptedIOException. This exception then gets thrown and the singleton holder class fails to get initialised. Java then decides that the class can never be initialised, gives up and throws NoClassDefFoundError for all future calls to getInstance().



was (Author: trejkaz):
Looking at this now, the code hasn't changed since it was dropped, so this remains an issue today.


> JapaneseTokenizer is sensitive to interrupts
> --------------------------------------------
>
>                 Key: LUCENE-5572
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5572
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: modules/analysis
>    Affects Versions: 3.6.2
>            Reporter: Anthony Rasmussen
>            Priority: Minor
>
> The constructor for JapaneseTokenizer gets the following singleton instances: TokenInfoDictionary, UnknownDictionary, and ConnectionCosts. I am finding that the associated getInstanceMethods are particularly sensitive to IOExceptions.
> Perhaps, in the static initializers of these  3 singletons, there could be some sort of retry effort before throwing a RunTimeException?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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