You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iceberg.apache.org by bl...@apache.org on 2019/04/03 17:18:35 UTC

[incubator-iceberg] branch master updated: Update Tasks to retry at least once, log timeouts. (#142)

This is an automated email from the ASF dual-hosted git repository.

blue pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-iceberg.git


The following commit(s) were added to refs/heads/master by this push:
     new b80b6d5  Update Tasks to retry at least once, log timeouts. (#142)
b80b6d5 is described below

commit b80b6d5b217b3bf50488b02c36026f22473eff64
Author: Ryan Blue <rd...@users.noreply.github.com>
AuthorDate: Wed Apr 3 10:18:31 2019 -0700

    Update Tasks to retry at least once, log timeouts. (#142)
---
 core/src/main/java/org/apache/iceberg/util/Tasks.java | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/core/src/main/java/org/apache/iceberg/util/Tasks.java b/core/src/main/java/org/apache/iceberg/util/Tasks.java
index 6a47e52..3475e85 100644
--- a/core/src/main/java/org/apache/iceberg/util/Tasks.java
+++ b/core/src/main/java/org/apache/iceberg/util/Tasks.java
@@ -397,7 +397,10 @@ public class Tasks {
 
         } catch (Exception e) {
           long durationMs = System.currentTimeMillis() - start;
-          if (attempt >= maxAttempts || durationMs > maxDurationMs) {
+          if (attempt >= maxAttempts || (durationMs > maxDurationMs && attempt > 1)) {
+            if (durationMs > maxDurationMs) {
+              LOG.info("Stopping retries after {} ms", durationMs);
+            }
             throw e;
           }