storm-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From revans2 <...@git.apache.org>
Subject [GitHub] incubator-storm pull request: STORM-63 remove timeout drpc request...
Date Tue, 25 Feb 2014 17:45:51 GMT
Github user revans2 commented on a diff in the pull request:

    https://github.com/apache/incubator-storm/pull/33#discussion_r10046618
  
    --- Diff: storm-core/src/clj/backtype/storm/daemon/drpc.clj ---
    @@ -59,6 +63,8 @@
                                 (when-let [sem (@id->sem id)]
                                   (swap! id->result assoc id (DRPCExecutionException.
"Request timed out"))
                                   (.release sem))
    +                              (.remove (acquire-queue request-queues (@id->function
id)) (@id->request id))
    +                              (log-warn "Timeout DRPC request id: " id " start at " start)
                                 (cleanup id)
    --- End diff --
    
    I think there is a race condition here, although you didn't cause it.  Between releasing
the sem, cleaning up the atoms and fetching the result.  It looks like it is possible on a
timeout that the sem will be released but by the time the thrift thread actually wakes up
the result may have been removed, causing a null to be returned instead of an exception being
thrown.
    
    I am mostly curious if you have seen this happen in practice, because you are fixing issues
related to timeouts.  Either way I think I will file a JIRA for this.


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

Mime
View raw message