edgarRd commented on code in PR #11335:
URL: https://github.com/apache/iceberg/pull/11335#discussion_r1803884005
##########
aws/src/main/java/org/apache/iceberg/aws/s3/S3InputStream.java:
##########
@@ -66,10 +70,14 @@ class S3InputStream extends SeekableInputStream implements
RangeReadable {
private int skipSize = 1024 * 1024;
private RetryPolicy<Object> retryPolicy =
RetryPolicy.builder()
- .handle(
- ImmutableList.of(
- SSLException.class, SocketTimeoutException.class,
SocketException.class))
- .onFailure(failure -> openStream(true))
+ .handle(RETRYABLE_EXCEPTIONS)
+ .onRetry(
+ e -> {
+ LOG.warn(
+ "Retrying read from S3, reopening stream (attempt {})",
e.getAttemptCount());
+ resetForRetry();
+ })
+ .onFailure(e -> LOG.error("Failed to read from S3 after retry
policy", e.getException()))
Review Comment:
Done.
--
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]