amogh-jahagirdar commented on code in PR #8397:
URL: https://github.com/apache/iceberg/pull/8397#discussion_r1314030808
##########
core/src/main/java/org/apache/iceberg/SnapshotProducer.java:
##########
@@ -436,6 +439,14 @@ public void commit() {
}
}
+ private void cleanupAfterFailure(RuntimeException exception) {
+ if (!strictCleanup || exception instanceof CleanableFailure) {
+ Exceptions.suppressAndThrow(exception, this::cleanAll);
+ }
+
+ throw exception;
Review Comment:
Good point, it's not a good idea to have this helper method throw a runtime
exception, it's less explicit to a reader since they'd have to actually step
into the helper which is being called in the catch block. I'll fix this up
--
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]