You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by "prateekm (via GitHub)" <gi...@apache.org> on 2023/01/24 22:51:41 UTC

[GitHub] [samza] prateekm commented on a diff in pull request #1650: Make blob store related retry tunables configurable

prateekm commented on code in PR #1650:
URL: https://github.com/apache/samza/pull/1650#discussion_r1086022385


##########
samza-core/src/main/java/org/apache/samza/util/FutureUtil.java:
##########
@@ -143,16 +144,16 @@ public static <K, V> CompletableFuture<Map<K, V>> toFutureOfMap(
   }
 
   public static <T> CompletableFuture<T> executeAsyncWithRetries(String opName,
-      Supplier<? extends CompletionStage<T>> action,
-      Predicate<? extends Throwable> abortRetries,
-      ExecutorService executor) {
-    Duration maxDuration = Duration.ofMinutes(10);
-
-    RetryPolicy<Object> retryPolicy = new RetryPolicy<>()
-        .withMaxRetries(-1) // Sets maximum retry to unlimited from default of 3 attempts. Retries are now limited by max duration and not retry counts.
-        .withBackoff(100, 312500, ChronoUnit.MILLIS, 5) // 100 ms, 500 ms, 2500 ms, 12.5 s, 1.05 min, 5.20 min, 5.20 min
-        .withMaxDuration(maxDuration)
-        .abortOn(abortRetries) // stop retrying if predicate returns true
+      Supplier<? extends CompletionStage<T>> action, Predicate<? extends Throwable> abortRetries,
+      ExecutorService executor, BlobStoreConfig blobStoreConfig) {

Review Comment:
   Use-case-agnostic util class should not take use case specific parameters (blob store config).



-- 
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: commits-unsubscribe@samza.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org