singhpk234 commented on code in PR #15792:
URL: https://github.com/apache/iceberg/pull/15792#discussion_r3006931047


##########
aws/src/main/java/org/apache/iceberg/aws/s3/S3InputStream.java:
##########
@@ -55,6 +55,12 @@ class S3InputStream extends SeekableInputStream implements 
RangeReadable {
   private static final List<Class<? extends Throwable>> RETRYABLE_EXCEPTIONS =
       ImmutableList.of(SSLException.class, SocketTimeoutException.class, 
SocketException.class);
 
+  private static boolean isPrematureConnectionClose(Throwable ex) {
+    return ex.getClass().getSimpleName().equals("ConnectionClosedException")
+        && ex.getMessage() != null
+        && ex.getMessage().startsWith("Premature end of Content-Length 
delimited message body");

Review Comment:
   is there a better way to identify this rather than inspecting on exception 
message (it looks to fragile to me)



-- 
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