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 2022/09/08 11:34:30 UTC

[GitHub] [iceberg] Fokko commented on a diff in pull request #5718: Nessie: Prevent accidental deletion of files which are still referenced by other branches/tags

Fokko commented on code in PR #5718:
URL: https://github.com/apache/iceberg/pull/5718#discussion_r965842955


##########
nessie/src/main/java/org/apache/iceberg/nessie/NessieTableOperations.java:
##########
@@ -84,6 +85,12 @@ private TableMetadata loadTableMetadata(String metadataLocation, Reference refer
         NessieUtil.tableMetadataFromIcebergTable(io(), table, metadataLocation);
     Map<String, String> newProperties = Maps.newHashMap(deserialized.properties());
     newProperties.put(NESSIE_COMMIT_ID_PROPERTY, reference.getHash());
+    // To prevent accidental deletion of files that are still referenced by other branches/tags,
+    // setting GC_ENABLED to false. So that all Iceberg's gc operations like expire_snapshots,
+    // remove_orphan_files, drop_table with purge will fail with an error.
+    // Nessie CLI will provide a reference aware GC functionality for the expired/unreferenced
+    // files.
+    newProperties.put(TableProperties.GC_ENABLED, "false");

Review Comment:
   This way we disable the GC'ing of the tables completely. Are there cases where we still want Iceberg to do the garbage collection?



-- 
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: issues-unsubscribe@iceberg.apache.org

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