GitHub user HeartSaVioR opened a pull request:

    https://github.com/apache/storm/pull/542

    STORM-794 Modify Spout async loop to treat activate/deactivate ASAP

    Currently when overflow buffer is not empty or pending is equal or greater 
than max spout pending, Spout doesn't handle activate / deactivate.
    
    I've met this scenario with Trident topology, max spout pending is 10, 
$batch's complete latency is about to 20 sec.
    Please refer https://issues.apache.org/jira/browse/STORM-794 for more 
description.
    
    After applying this patch to 0.9.3, issue is resolved, though it still 
handles already emitted batches. 
    
    >> deactivate
    ```
    2015-05-04 16:35:52.127 INFO  [Thread-12-spout0][RecollectSpout] batchId 
<46253> start
    2015-05-04 16:35:53.538 INFO  [Thread-16-$mastercoord-bg0][executor] 
Deactivating spout $mastercoord-bg0:(1)
    2015-05-04 16:35:54.130 INFO  [Thread-12-spout0][RecollectSpout] batchId 
<46244> end
    2015-05-04 16:35:54.130 INFO  [Thread-12-spout0][RecollectSpout] batchId 
<46254> start
    ...
    2015-05-04 16:36:10.153 INFO  [Thread-12-spout0][RecollectSpout] batchId 
<46262> start
    ...
    2015-05-04 16:36:12.297 INFO  [Thread-12-spout0][RecollectSpout] batchId 
<46262> end
    ... no more batch emitted (46253 + 10 = 46263, no txid 46263 found)
    ```
    
    >> activate
    ```
    2015-05-04 16:42:23.715 INFO  [Thread-16-$mastercoord-bg0][executor] 
Activating spout $mastercoord-bg0:(1)
    ...
    2015-05-04 16:42:23.721 INFO  [Thread-12-spout0][RecollectSpout] batchId 
<46263> start
    2015-05-04 16:42:25.159 INFO  [Thread-12-spout0][RecollectSpout] batchId 
<46264> start
    2015-05-04 16:42:27.162 INFO  [Thread-12-spout0][RecollectSpout] batchId 
<46265> start
    ```

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/HeartSaVioR/storm STORM-794

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/storm/pull/542.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #542
    
----
commit 39aaa4c29242d42cd30097176d08d66bad99661d
Author: Jungtaek Lim <[email protected]>
Date:   2015-05-04T07:25:54Z

    Modify Spout async loop to treat deactivate ASAP

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to