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 2020/11/20 18:44:04 UTC
[GitHub] [iceberg] jacques-n commented on a change in pull request #1796: Core: Add table property to disable garbage collection
jacques-n commented on a change in pull request #1796:
URL: https://github.com/apache/iceberg/pull/1796#discussion_r527902661
##########
File path: core/src/main/java/org/apache/iceberg/RemoveSnapshots.java
##########
@@ -78,6 +81,13 @@ public void accept(String file) {
RemoveSnapshots(TableOperations ops) {
this.ops = ops;
this.base = ops.current();
+
+ ValidationException.check(
+ PropertyUtil.propertyAsBoolean(base.properties(), GC_ENABLED, GC_ENABLED_DEFAULT),
+ "Not allowed to expire snapshots as the garbage collection is disabled for this table. " +
+ "Make sure this table is the exclusive owner of its data files before allowing garbage collection. " +
+ "If the table was created using the SNAPSHOT operation, it is not safe to expire snapshots in it since " +
+ "this may remove files in the original table.");
Review comment:
Hmm... I'm struggling a bit with someone being allowed to update this in certain cases. It seems like a very sharp edge to expose/suggest.
----------------------------------------------------------------
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