You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by HeartSaVioR <gi...@git.apache.org> on 2016/11/22 09:06:39 UTC

[GitHub] storm pull request #1792: STORM-2213 ShellSpout has race condition when Shel...

GitHub user HeartSaVioR opened a pull request:

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

    STORM-2213 ShellSpout has race condition when ShellSpout is being inactive longer than heartbeat timeout

    * update heartbeat time before turn on flag 'waitingOnSubprocess'
    
    I brought additional guard logic for long idle ShellSpout ([STORM-1928](https://issues.apache.org/jira/browse/STORM-1928)), which resolved the issue, but I found race condition from new logic.
    
    Scenario:
    
    1. lastHeartbeat is not updated more than timeout because of inactivity
    1. querySubprocess() is called
    1. waitingOnSubprocess is set to true
    1. HeartbeatTimerTask.run() triggers faster than updating heartbeat (getting message from subprocess)
    
    Simplest approach is updating heartbeat before set waitingOnSubprocess to true. Last heartbeat time is no longer only from subprocess, but it doesn't harm.

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

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

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

    https://github.com/apache/storm/pull/1792.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 #1792
    
----
commit a23a6ad5dc2b673aceb8344b81ea9d3a0403eb74
Author: Jungtaek Lim <ka...@gmail.com>
Date:   2016-11-22T09:04:24Z

    STORM-2213 ShellSpout has race condition when ShellSpout is being inactive longer than heartbeat timeout
    
    * update heartbeat time before turn on flag 'waitingOnSubprocess'

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] storm pull request #1792: STORM-2213 ShellSpout has race condition when Shel...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

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


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] storm issue #1792: STORM-2213 ShellSpout has race condition when ShellSpout ...

Posted by revans2 <gi...@git.apache.org>.
Github user revans2 commented on the issue:

    https://github.com/apache/storm/pull/1792
  
    +1 looks good to me.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---