rdblue commented on a change in pull request #4135:
URL: https://github.com/apache/iceberg/pull/4135#discussion_r807429704
##########
File path: core/src/main/java/org/apache/iceberg/SnapshotProducer.java
##########
@@ -283,7 +283,10 @@ public void commit() {
Snapshot newSnapshot = apply();
newSnapshotId.set(newSnapshot.snapshotId());
TableMetadata updated;
- if (stageOnly) {
+ if (base.snapshot(newSnapshot.snapshotId()) != null) {
+ // this is a rollback operation
+ updated = base.replaceCurrentSnapshot(newSnapshot.snapshotId());
+ } else if (stageOnly) {
Review comment:
Can you port the changes from the other fix? That removed methods from
`TableMetadata` rather than adding new ones. I think it would be best to keep
0.13.x and master in sync rather than having slightly different fixes.
Thanks, @sririshindra!
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]