Bartekszost commented on code in PR #17846:
URL: https://github.com/apache/iceberg/pull/17846#discussion_r3892837197


##########
core/src/main/java/org/apache/iceberg/rest/RESTCatalogProperties.java:
##########
@@ -58,6 +58,27 @@ private RESTCatalogProperties() {}
   public static final long REST_SCAN_PLANNING_POLL_TIMEOUT_MS_DEFAULT =
       TimeUnit.MINUTES.toMillis(5);
 
+  // Extra poll attempts after the first fetch of a submitted plan. Must be >= 
0; 0 means a single
+  // fetch attempt with no retries.
+  public static final String REST_SCAN_PLANNING_POLL_NUM_RETRIES =
+      "rest-scan-planning.poll-num-retries";
+  public static final int REST_SCAN_PLANNING_POLL_NUM_RETRIES_DEFAULT = 10;
+
+  public static final String REST_SCAN_PLANNING_POLL_MIN_WAIT_MS =
+      "rest-scan-planning.poll-min-wait-ms";
+  public static final long REST_SCAN_PLANNING_POLL_MIN_WAIT_MS_DEFAULT =
+      TimeUnit.SECONDS.toMillis(1);
+
+  public static final String REST_SCAN_PLANNING_POLL_MAX_WAIT_MS =
+      "rest-scan-planning.poll-max-wait-ms";
+  public static final long REST_SCAN_PLANNING_POLL_MAX_WAIT_MS_DEFAULT =
+      TimeUnit.MINUTES.toMillis(1);
+
+  // Exponential backoff multiplier between poll attempts. Must be >= 1.0.
+  public static final String REST_SCAN_PLANNING_POLL_SCALE_FACTOR =
+      "rest-scan-planning.poll-scale-factor";
+  public static final double REST_SCAN_PLANNING_POLL_SCALE_FACTOR_DEFAULT = 
2.0;

Review Comment:
   The case is server-side plans that stay `SUBMITTED` long enough that the 
client hits the hardcoded retry budget before the plan finishes. #15863 made 
the timeout configurable, but `Tasks.retry(10)` can still stop polling first, 
so we added `poll-num-retries`.
   
   The task endpoint pages `plan-tasks` once results exist; it does not help 
while status is still `SUBMITTED`.
   
   If you want I can revert back to just adding `poll-num-retries` and keep the 
others default.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to