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

[jira] [Commented] (LUCENE-9967) ReplicaNode.start NPE on exception with no message

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

Michael McCandless commented on LUCENE-9967:
--------------------------------------------

Whoa, thank you for the fix [~stevenschlansker] – I'll commit that.

It's rather scary that this exception handler is trying to parse the (string) exception message and then just prints exception messages to the console.  But we can improve that separately – your change is clearly progress :)

> ReplicaNode.start NPE on exception with no message
> --------------------------------------------------
>
>                 Key: LUCENE-9967
>                 URL: https://issues.apache.org/jira/browse/LUCENE-9967
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: modules/replicator
>    Affects Versions: 8.8.2
>         Environment: Java 16.0.1, Fedora Linux 33
>            Reporter: Steven Schlansker
>            Priority: Major
>              Labels: easyfix, patch
>         Attachments: LUCENE-9967.patch
>
>
> We are starting a new project and trying to implement Lucene near real time replication.
> While stubbing out some code such that it throws an exception, we found that Lucene's error handling itself fails when the exception has no message:
>  
> {code:java}
>     } catch (Throwable t) {
>       if (t.getMessage().startsWith("replica cannot start") == false) {{code}
>  
> This obscures the actual root cause exception source (you cannot see it without a debugger) and replaces it with a useless NPE.



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