Uploaded image for project: 'Apache Storm'
  1. Apache Storm
  2. STORM-2213

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.0.0, 1.1.0, 1.0.3
    • storm-multilang
    • None

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              kabhwan Jungtaek Lim
              kabhwan Jungtaek Lim
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h