You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2015/03/30 18:06:53 UTC
[jira] [Commented] (STORM-593) No need of rwlock for clojure atom
[ https://issues.apache.org/jira/browse/STORM-593?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14386908#comment-14386908 ]
ASF GitHub Bot commented on STORM-593:
--------------------------------------
Github user d2r commented on a diff in the pull request:
https://github.com/apache/storm/pull/349#discussion_r27404105
--- Diff: storm-core/src/clj/backtype/storm/daemon/worker.clj ---
@@ -302,9 +301,8 @@
port)
]
)))
- (write-locked (:endpoint-socket-lock worker)
- (reset! (:cached-task->node+port worker)
- (HashMap. my-assignment)))
--- End diff --
The only other place `:cached-task->node+port` is used, it is only a read in `mk-transfer-fn`. Since it is already an atom, we probably do not need this lock.
> 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)