You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Joel Bernstein (JIRA)" <ji...@apache.org> on 2016/03/11 18:33:39 UTC

[jira] [Comment Edited] (SOLR-8832) Reproducible DaemonStream test failures

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

Joel Bernstein edited comment on SOLR-8832 at 3/11/16 5:33 PM:
---------------------------------------------------------------

The test failures were occurring due to faulty shutdown behavior in the DaemonStream.

This patch makes the following changes:

1) Removes the interrupt on shutdown. The interrupt was just faulty and causing the internal thread to exit during unsafe times. Now shutdown just flags the internal thread so that it will exit it's loop after completing a full run of the internal stream. 

2) Adds a shutdown method to the DaemonStream. When the DaemonStreams internal queue is enabled for continuous pull streaming, the contract for shutdown is:
     a) call DaemonStream.shutdown(). This signals the internal thread to shutdown after it finishes it's run.
     b) call DaemonStream.read() until the EOF Tuple is read. This will clear the internal queue and unblock the internal stream if it's blocked on the queue.
     c) Call DaemonStream.close();

If the internal queue is not enabled, continuous push streaming, calling close()  will suffice. 



was (Author: joel.bernstein):
The test failures were occurring due to faulty shutdown behavior in the DaemonStream.

This patch makes the following changes:

1) Removes the interrupt on shutdown. The interrupt was just faulty and causing the internal thread to exit during unsafe times. Now shutdown just flags the internal thread so that it will exit it's loop after completing a full run of the internal stream. 

2) Adds a shutdown method to the DaemonStream. When the DaemonStreams internal queue is enabled for continuous pull streaming, the contract for shutdown is:
     a) call DaemonStream.shutdown();
     b) call DaemonStream.read() until the EOF Tuple is read. This will clear the internal queue and unblock the internal stream if it's blocked on the queue.
     c) Call DaemonStream.close();

If the internal queue is not enabled, continuous push streaming, calling close()  will suffice. 


> Reproducible DaemonStream test failures
> ---------------------------------------
>
>                 Key: SOLR-8832
>                 URL: https://issues.apache.org/jira/browse/SOLR-8832
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 6.0
>            Reporter: Joel Bernstein
>            Assignee: Joel Bernstein
>         Attachments: SOLR-8832.patch, SOLR-8832.patch
>
>
> The following test fails every time:
> ant test  -Dtestcase=StreamExpressionTest -Dtests.method=testAll -Dtests.seed=A8E5206069146FC0 -Dtests.multiplier=3 -Dtests.slow=true -Dtests.locale=lv-LV -Dtests.timezone=America/Iqaluit -Dtests.asserts=true -Dtests.file.encoding=ISO-8859-1



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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