[ 
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:40 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, in the continuous push streaming use 
case, 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(). 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, in the continuous push streaming use 
case, calling close()  will suffice. 


> Faulty DaemonStream shutdown procedures
> ---------------------------------------
>
>                 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 run fails everytime due to faulty DaemonStream shutdown 
> procedures.
> 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to