You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@storm.apache.org by "Jungtaek Lim (JIRA)" <ji...@apache.org> on 2016/11/22 08:52:59 UTC

[jira] [Created] (STORM-2213) ShellSpout has race condition when ShellSpout is being inactive longer than heartbeat timeout

Jungtaek Lim created STORM-2213:
-----------------------------------

             Summary: ShellSpout has race condition when ShellSpout is being inactive longer than heartbeat timeout  
                 Key: STORM-2213
                 URL: https://issues.apache.org/jira/browse/STORM-2213
             Project: Apache Storm
          Issue Type: Bug
          Components: storm-multilang
            Reporter: Jungtaek Lim
            Assignee: Jungtaek Lim


I brought additional guard logic for long idle ShellSpout (STORM-1928), which resolves the issue, but I found race condition from new logic.

Scenario:

1. lastHeartbeat is not updated more than timeout because of inactivity
2. querySubprocess() is called
3. waitingOnSubprocess is set to true
4. 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.



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