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 2019/11/14 19:42:32 UTC

[GitHub] [incubator-iceberg] yathindranath commented on a change in pull request #631: Add mechanism to expire old metadata versions

yathindranath commented on a change in pull request #631: Add mechanism to expire old metadata versions
URL: https://github.com/apache/incubator-iceberg/pull/631#discussion_r346510637
 
 

 ##########
 File path: core/src/main/java/org/apache/iceberg/BaseMetastoreTableOperations.java
 ##########
 @@ -98,8 +98,11 @@ public void commit(TableMetadata base, TableMetadata metadata) {
       LOG.info("Nothing to commit.");
       return;
     }
+    TableMetadata updated = (base != null && base.file() != null) ?
+            metadata.addPreviousMetadata(base.file().location(), base.lastUpdatedMillis()) : metadata;
 
 Review comment:
   @rdblue Initially thought of handling in the `TableMetadata`, but I went with `TableOperations` because it just two places to track previous versions. Otherwise every method and new method in future should add current file location.
   
   But I agree, should be handled in the `TableMetadata`, will change it.

----------------------------------------------------------------
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


With regards,
Apache Git Services

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