rdblue commented on a change in pull request #4135:
URL: https://github.com/apache/iceberg/pull/4135#discussion_r808511723
##########
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:
Yes, calling the right `setCurrentSnapshot` is a good way to backport
this. Thanks!
--
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]