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

Dawid Weiss commented on LUCENE-3868:
-------------------------------------

This is fairly messy in trunk; threads are interrupted either at method or at 
class level (depending on sysprop). Additionally, the interruption is done like 
this:
{code}
          t.setUncaughtExceptionHandler(null);
          Thread.setDefaultUncaughtExceptionHandler(null);
          if (!t.getName().startsWith("SyncThread")) // avoid zookeeper jre 
crash
            t.interrupt();
{code}
this doesn't restore default handler, may cause interference with other threads 
(which do have handlers), etc.

I'd rather fix it by switching to LUCENE-3808 where this is solved at the 
runner's level (and controlled via annotations).
                
> Thread interruptions shouldn't cause unhandled thread errors (or should 
> they?).
> -------------------------------------------------------------------------------
>
>                 Key: LUCENE-3868
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3868
>             Project: Lucene - Java
>          Issue Type: Bug
>            Reporter: Dawid Weiss
>            Assignee: Dawid Weiss
>            Priority: Minor
>             Fix For: 3.6, 4.0
>
>
> This is a result of pulling uncaught exception catching to a rule above 
> interrupt in internalTearDown(); check how it was before and restore previous 
> behavior?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to