Github user d2r commented on a diff in the pull request: https://github.com/apache/storm/pull/838#discussion_r45654094 --- Diff: storm-core/src/clj/backtype/storm/util.clj --- @@ -1062,6 +1062,22 @@ (defn hashmap-to-persistent [^HashMap m] (zipmap (.keySet m) (.values m))) +(defn retry-on-exception + "Retries specific function on exception based on retries count" + [retries task-description f & args] + (let [res (try {:value (apply f args)} + (catch Exception e + (if (= 0 retries) --- End diff -- Would like to check for `(not (pos?` or `<= 0` here in case we get a negative value for `retries`. We would get a LOT of log messages until in underflowed and came back to 0.
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. ---