amogh-jahagirdar commented on code in PR #10373:
URL: https://github.com/apache/iceberg/pull/10373#discussion_r1613626590


##########
core/src/main/java/org/apache/iceberg/BaseTransaction.java:
##########
@@ -436,6 +440,8 @@ private void commitSimpleTransaction() {
     } catch (RuntimeException e) {
       if (!ops.requireStrictCleanup() || e instanceof CleanableFailure) {
         cleanUpOnCommitFailure();
+      } else if (ops.requireStrictCleanup()) {
+        throw new CommitStateUnknownException(e);

Review Comment:
   Maybe we can have a helper function cleanupIfPossible(e, () -> 
someCleanupFunction()) to reduce the duplication here



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