rdblue commented on a change in pull request #2621:
URL: https://github.com/apache/iceberg/pull/2621#discussion_r637606872
##########
File path:
core/src/main/java/org/apache/iceberg/actions/BaseRewriteDataFilesAction.java
##########
@@ -262,12 +264,16 @@ public RewriteDataFilesActionResult execute() {
return tasksGroupedByPartition.asMap();
}
- private void replaceDataFiles(Iterable<DataFile> deletedDataFiles,
Iterable<DataFile> addedDataFiles) {
+ @VisibleForTesting
+ void replaceDataFiles(Iterable<DataFile> deletedDataFiles,
Iterable<DataFile> addedDataFiles) {
try {
RewriteFiles rewriteFiles = table.newRewrite();
rewriteFiles.rewriteFiles(Sets.newHashSet(deletedDataFiles),
Sets.newHashSet(addedDataFiles));
commit(rewriteFiles);
- } catch (Exception e) {
+ } catch (CommitStateUnknownException e) {
+ LOG.warn("Failed to check commit status: skipping data file deletion.",
e);
+ throw e;
+ } catch (Exception e) {
Review comment:
Looks like formatting is incorrect here: there are two spaces between
`}` and `catch` for both clauses and that is causing git to detect that the
catch statement for `Exception` has changed when it actually hasn't. Can you
fix those, please? We try to minimize changes that can cause git conflicts.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]