Github user revans2 commented on a diff in the pull request:
— 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"))
+ (.remove (acquire-queue request-queues (@id->function id)) (@id->request id))
+ (log-warn "Timeout DRPC request id: " id " start at " start)
— 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.