This is an automated email from the ASF dual-hosted git repository.

amoghj pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iceberg.git


The following commit(s) were added to refs/heads/master by this push:
     new 31651e892f Core: Enable strict metadata cleanup by default (#8599)
31651e892f is described below

commit 31651e892f8f94841f2c3d48038825368659d13a
Author: Amogh Jahagirdar <[email protected]>
AuthorDate: Wed Sep 20 12:04:48 2023 -0700

    Core: Enable strict metadata cleanup by default (#8599)
---
 core/src/main/java/org/apache/iceberg/TableOperations.java          | 5 +++--
 core/src/main/java/org/apache/iceberg/rest/RESTTableOperations.java | 5 -----
 2 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/core/src/main/java/org/apache/iceberg/TableOperations.java 
b/core/src/main/java/org/apache/iceberg/TableOperations.java
index 6822809d79..ddf1154171 100644
--- a/core/src/main/java/org/apache/iceberg/TableOperations.java
+++ b/core/src/main/java/org/apache/iceberg/TableOperations.java
@@ -121,9 +121,10 @@ public interface TableOperations {
    * Whether to clean up uncommitted metadata files only when a commit fails 
with a {@link
    * CleanableFailure} exception.
    *
-   * <p>This defaults to false: any unexpected exception will cause metadata 
files to be cleaned up.
+   * <p>This defaults to true: cleanup will only occur for exceptions marked 
as {@link
+   * CleanableFailure}
    */
   default boolean requireStrictCleanup() {
-    return false;
+    return true;
   }
 }
diff --git 
a/core/src/main/java/org/apache/iceberg/rest/RESTTableOperations.java 
b/core/src/main/java/org/apache/iceberg/rest/RESTTableOperations.java
index 75c8bdd69f..0ce1afd93a 100644
--- a/core/src/main/java/org/apache/iceberg/rest/RESTTableOperations.java
+++ b/core/src/main/java/org/apache/iceberg/rest/RESTTableOperations.java
@@ -240,9 +240,4 @@ class RESTTableOperations implements TableOperations {
       }
     };
   }
-
-  @Override
-  public boolean requireStrictCleanup() {
-    return true;
-  }
 }

Reply via email to