Github user d2r commented on a diff in the pull request:

    https://github.com/apache/storm/pull/349#discussion_r27404112
  
    --- Diff: storm-core/src/clj/backtype/storm/daemon/worker.clj ---
    @@ -335,16 +333,14 @@
             drainer (TransferDrainer.)
             node+port->socket (:cached-node+port->socket worker)
             task->node+port (:cached-task->node+port worker)
    -        endpoint-socket-lock (:endpoint-socket-lock worker)
             ]
         (disruptor/clojure-handler
           (fn [packets _ batch-end?]
             (.add drainer packets)
             
             (when batch-end?
    -          (read-locked endpoint-socket-lock
    -            (let [node+port->socket @node+port->socket]
    -              (.send drainer node+port->socket)))
    +          (let [node+port->socket @node+port->socket]
    +            (.send drainer node+port->socket))
    --- End diff --
    
    @nathanmarz, I could be missing something, but I do not think we need a 
read lock here to protect against the send:
    
    There is no corresponding write-lock around `:cached-node+port->socket`.  
(I do not think we need one anyway, since it is updated via a `swap!` in 
`mk-refresh-connections`, and that should be atomic.)


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to