You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2021/05/23 22:00:55 UTC

[GitHub] [iceberg] rdblue commented on a change in pull request #2621: Core: Skip delete data files when commit-state is unknown.

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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org