Skip to content

Commit

Permalink
STORM-2912 Revert optimization of sharing tick tuple
Browse files Browse the repository at this point in the history
* since it incurs side effect and messes metrics
  • Loading branch information
HeartSaVioR committed Jan 25, 2018
1 parent c335ad3 commit 923dcc5
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions storm-core/src/clj/org/apache/storm/daemon/executor.clj
Expand Up @@ -361,13 +361,15 @@
(and (= false (storm-conf TOPOLOGY-ENABLE-MESSAGE-TIMEOUTS))
(= :spout (:type executor-data))))
(log-message "Timeouts disabled for executor " comp-id ":" (:executor-id executor-data))
(let [val [(AddressedTuple. AddressedTuple/BROADCAST_DEST (TupleImpl. context [tick-time-secs] Constants/SYSTEM_TASK_ID Constants/SYSTEM_TICK_STREAM_ID))]]
(schedule-recurring
(:user-timer worker)
tick-time-secs
tick-time-secs
(fn []
(disruptor/publish receive-queue val))))))))
(schedule-recurring
(:user-timer worker)
tick-time-secs
tick-time-secs
(fn []
;; We should create a new tick tuple for each recurrence instead of sharing object
;; More detail on https://issues.apache.org/jira/browse/STORM-2912
(let [val [(AddressedTuple. AddressedTuple/BROADCAST_DEST (TupleImpl. context [tick-time-secs] Constants/SYSTEM_TASK_ID Constants/SYSTEM_TICK_STREAM_ID))]]
(disruptor/publish receive-queue val))))))))

(defn mk-executor [worker executor-id initial-credentials]
(let [executor-data (mk-executor-data worker executor-id)
Expand Down

0 comments on commit 923dcc5

Please sign in to comment.