You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@iceberg.apache.org by GitBox <gi...@apache.org> on 2018/12/06 05:29:55 UTC

[GitHub] rdsr commented on a change in pull request #22: ExpireSnapshots: do not commit when no snapshots are expired.

rdsr commented on a change in pull request #22: ExpireSnapshots: do not commit when no snapshots are expired.
URL: https://github.com/apache/incubator-iceberg/pull/22#discussion_r239332049
 
 

 ##########
 File path: core/src/main/java/com/netflix/iceberg/RemoveSnapshots.java
 ##########
 @@ -115,7 +115,10 @@ public void commit() {
         .onlyRetryOn(CommitFailedException.class)
         .run(item -> {
           TableMetadata updated = internalApply();
-          ops.commit(base, updated);
+          // only commit the updated metadata if at least one snapshot was removed
+          if (updated.snapshots().size() != base.snapshots().size()) {
 
 Review comment:
   Would it be more precise to check for `if (updated.snapshots().size() < base.snapshots().size())`?
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


With regards,
Apache Git Services