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/02/16 06:07:41 UTC

[GitHub] [iceberg] jackye1995 commented on a change in pull request #4138: Core: use setBranchSnapshot to commit SetSnapshotOperation

jackye1995 commented on a change in pull request #4138:
URL: https://github.com/apache/iceberg/pull/4138#discussion_r807570547



##########
File path: core/src/main/java/org/apache/iceberg/SetSnapshotOperation.java
##########
@@ -113,7 +113,7 @@ public void commit() {
         .run(taskOps -> {
           Snapshot snapshot = apply();
           TableMetadata updated = TableMetadata.buildFrom(base)
-              .setCurrentSnapshot(snapshot.snapshotId())
+              .setBranchSnapshot(snapshot.snapshotId(), SnapshotRef.MAIN_BRANCH)

Review comment:
       what do you mean by handle rollback? It's in this same class and committed here. The snapshot at L115 after `apply` is the one either rolled back or set by user.




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