[
https://issues.apache.org/jira/browse/STORM-593?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14386940#comment-14386940
]
ASF GitHub Bot commented on STORM-593:
--------------------------------------
Github user nathanmarz commented on the pull request:
https://github.com/apache/storm/pull/349#issuecomment-87742572
Without the r/w lock the following can happen:
1. Sender S grabs a socket to worker A for task B
2. Refresh connections learns task B is now on worker C, changes the
connection, and closes the old socket
3. Sender S tries to send data on a closed socket
An atom does not protect against this.
> No need of rwlock for clojure atom
> -----------------------------------
>
> Key: STORM-593
> URL: https://issues.apache.org/jira/browse/STORM-593
> Project: Apache Storm
> Issue Type: Improvement
> Affects Versions: 0.10.0
> Reporter: xiajun
> Assignee: xiajun
>
> cached-node+port->socket in worker-data is atom, there on need for rwlock
> endpoint-socket-lock to protect cached-node+port->socket. And after use
> rwlock, there will be competition between refresh-connections and message
> send.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)