[ 
https://issues.apache.org/jira/browse/STORM-120?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13943515#comment-13943515
 ] 

ASF GitHub Bot commented on STORM-120:
--------------------------------------

GitHub user patricklucas opened a pull request:

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

    Add locking in acquire-random-range-id

    This fixes a threadsafety issue documented in STORM-120. This is an
    acceptable temporary fix, but the cause of concurrent access to this
    variable should still be identified.
    
    @revans2 suggested this fix.
    
    Refs STORM-120

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

    $ git pull https://github.com/patricklucas/incubator-storm 
STORM-120_fix_executor_threadsafety

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

    https://github.com/apache/incubator-storm/pull/49.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 #49
    
----
commit ac993b43db57e8971a9a662c208f8ac07571e44d
Author: Patrick Lucas <[email protected]>
Date:   2014-03-21T20:33:56Z

    Add locking in acquire-random-range-id
    
    This fixes a threadsafety issue documented in STORM-120. This is an
    acceptable temporary fix, but the cause of concurrent access to this
    variable should still be identified.
    
    Refs STORM-120

----


> util/acquire-random-range-id is not thread-safe
> -----------------------------------------------
>
>                 Key: STORM-120
>                 URL: https://issues.apache.org/jira/browse/STORM-120
>             Project: Apache Storm (Incubating)
>          Issue Type: Bug
>            Reporter: James Xu
>            Priority: Minor
>
> https://github.com/nathanmarz/storm/issues/724
> Concurrent calls to util/acquire-random-range-id with the same parameters can 
> result in an IndexOutOfBoundsException, as an increment in one thread may 
> occur after the bounds check in another. The resulting curr value can be >= 
> the size of the List state.
> https://github.com/nathanmarz/storm/blob/fc5fbb8b352cf91050cdde4a9f9e77e673ab7f48/storm-core/src/clj/backtype/storm/util.clj#L606



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to