GitHub user srdo opened a pull request:

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

    STORM-3120: Clean up leftover null checks in Time, ensure idle thread…

    …s get to run when cluster time is advanced
    
    https://issues.apache.org/jira/browse/STORM-3120
    
    Some of the Time code didn't make sense, e.g. checking for null on the 
final THREAD_SLEEP_TIMES_NANOS map. It was left over from an earlier refactor 
of Time. Cleaned it up, and deleted the deprecated Time methods. Also made sure 
that when simulated time is advanced, idle threads are removed from the 
THREAD_SLEEP_TIMES_NANOS immediately. When the LocalCluster waits for the 
topology to be idle, it checks whether all timer threads are in the 
THREAD_SLEEP_TIMES_NANOS map. It looks to me like there was no guarantee that 
sleeping threads actually got a chance to run when time was advanced, because 
they remained in the THREAD_SLEEP_TIMES_NANOS map until they happened to be 
scheduled. With bad luck, a thread might end up being counted as idle when it 
just hadn't exited the Time.sleepUntilNanos loop yet.

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

    $ git pull https://github.com/srdo/storm STORM-3120

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

    https://github.com/apache/storm/pull/2734.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 #2734
    
----
commit 47009495913316dcfe0a034c8d70868101cad7ab
Author: Stig Rohde Døssing <srdo@...>
Date:   2018-06-24T10:47:42Z

    STORM-3120: Clean up leftover null checks in Time, ensure idle threads get 
to run when cluster time is advanced

----


---

Reply via email to