[ 
https://issues.apache.org/jira/browse/BEAM-13206?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Anonymous updated BEAM-13206:
-----------------------------
    Status: Triage Needed  (was: Resolved)

> Consolidate multiple levels of retries for AWS IOs
> --------------------------------------------------
>
>                 Key: BEAM-13206
>                 URL: https://issues.apache.org/jira/browse/BEAM-13206
>             Project: Beam
>          Issue Type: Improvement
>          Components: io-java-aws
>            Reporter: Moritz Mack
>            Assignee: Moritz Mack
>            Priority: P3
>              Labels: stale-assigned
>             Fix For: 2.38.0
>
>
> The current implementation of retries at the Beam IO level for AWS IOs is 
> misleading and for that reason potentially harmful.
> The AWS SDK automatically performs retries by default. In combination with 
> retries implemented by various AWS IOs the number of requests under error 
> might unexpectedly explode.
> Instead of re-implementing retries on the IO level, respective retry 
> configuration could be pushed down into the AWS client, e.g. changing the 
> client providers to accept the RetryConfiguration as parameter.
> With that we would get a consistent and transparent behavior. And at the same 
> time we'd be able to remove lots of boilerplate code from the IOs.
> Also, the default retry predicate is simply wrong and does not correctly 
> check for any status code that can be retried. Yet another reason to remove 
> any custom retry logic and push it down into the SDK. E.g. for DynamoDBIO, 
> but same for SnsIO
> {code:java}
> private static class DefaultRetryPredicate implements RetryPredicate {
>   private static final ImmutableSet<Integer> ELIGIBLE_CODES =
>       ImmutableSet.of(HttpStatus.SC_SERVICE_UNAVAILABLE);
>   @Override
>   public boolean test(Throwable throwable) {
>     return (throwable instanceof IOException
>         || (throwable instanceof InternalErrorException)
>         || (throwable instanceof InternalErrorException
>             && ELIGIBLE_CODES.contains(((InternalErrorException) 
> throwable).getStatusCode())));
>   }
> } {code}
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to