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