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

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

Github user d2r commented on the pull request:

    https://github.com/apache/storm/pull/521#issuecomment-101382574
  
    @HeartSaVioR 
    
    Thanks for taking a look. Well, I was trying to follow his comments. :)
    
    I noticed though, that the line in my `let` binding
    ```Clojure
    valid-node+ports (vals task->node+port)
    ```
    maybe should have been
    ```Clojure
    valid-node+ports (vals @task->node+port)
    ```
    with the `@`.
    
    `task->node+port` is actually an atom, however, so if we dereference it 
within the read-lock there, we should have the accurate task assignment before 
we add anything to the queue to be sent.  I believe this addresses the concern 
you cited from @nathanmarz.  The other change was to encapsulate the separate 
TransferDrainer#add, since it does not need to be a separate public method.
    
    So, @HeartSaVioR, since we have both looked at my branch already, do you 
want to take my changes into your branch and continue the discussion from 
there?  It seems like a smaller set of changes to begin with, and maybe it 
would be easier going forward?


> Workers may try to send to closed connections
> ---------------------------------------------
>
>                 Key: STORM-737
>                 URL: https://issues.apache.org/jira/browse/STORM-737
>             Project: Apache Storm
>          Issue Type: Bug
>    Affects Versions: 0.9.2-incubating
>            Reporter: Derek Dagit
>
> There is a race condition in the worker code that can allow for a send() to 
> be called on a closed connection.
> [Discussion|https://github.com/apache/storm/pull/349#issuecomment-87778672]
> The assignment mapping from task -> node+port needs to be read and used in 
> the read lock when sending, so that an accurate mapping is used that does not 
> include any connections that are closed.



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

Reply via email to