You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2019/04/17 23:08:00 UTC

[jira] [Commented] (SOLR-13408) Cannot start/stop DaemonStream repeatedly, other API improvements

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

ASF subversion and git services commented on SOLR-13408:
--------------------------------------------------------

Commit a9771a58495b319b36b32381c786d9d9801e64ea in lucene-solr's branch refs/heads/master from erick
[ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=a9771a5 ]

SOLR-13408: Cannot start/stop DaemonStream repeatedly, other API improvements


> Cannot start/stop DaemonStream repeatedly, other API improvements
> -----------------------------------------------------------------
>
>                 Key: SOLR-13408
>                 URL: https://issues.apache.org/jira/browse/SOLR-13408
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: streaming expressions
>    Affects Versions: 7.7, 8.0, master (9.0)
>            Reporter: Erick Erickson
>            Assignee: Erick Erickson
>            Priority: Major
>         Attachments: SOLR-13408.patch, SOLR-13408.patch, SOLR-13408.patch
>
>
> If I create a DaemonStream then use the API commands to stop it then start it repeatedly, after the first time it's stopped/started, it cannot be stopped again.
> DaemonStream.close() checks whether a local variable "closed" is true, and if so does nothing. Otherwise it closes the stream then sets "closed" to true.
> However, when the stream is started again, "closed" is not set to false, therefore the next time you try to stop the deamon, nothing happens and it continues to run. One other consequence of this is that you can have orphan threads running in the background. Say I
> {code:java}
> stop the daemon
> start it again
> create another one with the same ID
> {code}
> When the new one is created, this code is executed over in StreamHandler.handleRequestBody:
> {code:java}
> daemons.remove(daemonStream.getId()).close();
> {code}
> which will not terminate the stream thread as above. Then the open() method executes this:
> {code:java}
> this.streamRunner = new StreamRunner(runInterval, id);
> {code}
> leaving the thread running.
> Finally, there's an NPE if I try to start a non-existent daemon.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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