You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by apetresc <gi...@git.apache.org> on 2014/03/21 22:17:56 UTC

[GitHub] incubator-storm pull request: Fix race condition in Time.java

GitHub user apetresc opened a pull request:

    https://github.com/apache/incubator-storm/pull/50

    Fix race condition in Time.java

    Some of my test runs were occasionally failing with a NullPointerException on `backtype.storm.utils.Time.java:64`.
    
    After a bit of investigation, it seems there's a race condition here; if we disable simulating mode while a thread is currently sleeping, then when it wakes up it won't re-check if it's still in "simulating" mode, it'll try to remove the sleep time, and get the NPE.
    
    Refs [STORM-260](https://issues.apache.org/jira/browse/STORM-260).

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

    $ git pull https://github.com/apetresc/incubator-storm patch-1

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

    https://github.com/apache/incubator-storm/pull/50.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 #50
    
----
commit 28e65a82bfcd60f38c93115974f6a8653756f9b5
Author: Adrian Petrescu <ap...@gmail.com>
Date:   2014-03-21T21:17:40Z

    Fix race condition in Time.java
    
    Some of my test runs were occasionally failing with a NullPointerException on `backtype.storm.utils.Time.java:64`.
    
    After a bit of investigation, it seems there's a race condition here; if we disable simulating mode while a thread is currently sleeping, then when it wakes up it won't re-check if it's still in "simulating" mode, it'll try to remove the sleep time, and get the NPE.
    
    Refs [STORM-260](https://issues.apache.org/jira/browse/STORM-260).

----


---
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] incubator-storm pull request: Fix race condition in Time.java

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

    https://github.com/apache/incubator-storm/pull/50


---
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] incubator-storm pull request: Fix race condition in Time.java

Posted by apetresc <gi...@git.apache.org>.
Github user apetresc commented on the pull request:

    https://github.com/apache/incubator-storm/pull/50#issuecomment-38327183
  
    The NPE was happening on a `mvn test` from a fresh checkout of v0.9.1-incubating, so maybe there's some flaw in the way the test suite shuts down the topology as well. But this patch also fixed it.


---
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] incubator-storm pull request: Fix race condition in Time.java

Posted by ptgoetz <gi...@git.apache.org>.
Github user ptgoetz commented on the pull request:

    https://github.com/apache/incubator-storm/pull/50#issuecomment-39997672
  
    +1


---
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] incubator-storm pull request: Fix race condition in Time.java

Posted by nathanmarz <gi...@git.apache.org>.
Github user nathanmarz commented on the pull request:

    https://github.com/apache/incubator-storm/pull/50#issuecomment-38327057
  
    Are you enabling/disabling simulation mode when a topology is already running? Simulation mode was meant to be started before launching a simulated cluster/topology and then turned off after the topology/cluster has been shut down.
    
    That said, there's nothing harmful about this patch, so I'm +1 on it.


---
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] incubator-storm pull request: Fix race condition in Time.java

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

    https://github.com/apache/incubator-storm/pull/50#issuecomment-38491935
  
    Looks fine to me too.  +1


---
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.
---