jackye1995 commented on code in PR #5304:
URL: https://github.com/apache/iceberg/pull/5304#discussion_r923976221


##########
aws/src/main/java/org/apache/iceberg/aws/glue/GlueTableOperations.java:
##########
@@ -144,6 +146,10 @@ protected void doCommit(TableMetadata base, TableMetadata 
metadata) {
           "Cannot commit %s because Glue encountered a validation exception " +
               "while accessing requested resources",
           tableName());
+    } catch (S3Exception e) {
+      throw e;
+    } catch (GlueException e) {
+      throw e;

Review Comment:
   actually we can do better here, instead of catching each case, we can change 
the `catch (RuntimeException persistFailure) {` block, and check `if 
(persistFailure instanceof AwsServiceException)` then we check the 
`statusCode`. If that is 5xx then we should go to the `FAILURE` case so the 
error gets retried. Otherwise it should directly throw. This can fully prevent 
any dependent service error without us having to add different types of error 
handling as we evolve the service.



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