amogh-jahagirdar commented on code in PR #11819: URL: https://github.com/apache/iceberg/pull/11819#discussion_r1891022575
########## core/src/main/java/org/apache/iceberg/TableMetadata.java: ########## @@ -1299,11 +1299,7 @@ public Builder removeRef(String name) { private Builder resetMainBranch() { this.currentSnapshotId = -1; - SnapshotRef ref = refs.remove(SnapshotRef.MAIN_BRANCH); - if (ref != null) { - changes.add(new MetadataUpdate.RemoveSnapshotRef(SnapshotRef.MAIN_BRANCH)); - } - + setBranchSnapshot(-1, SnapshotRef.MAIN_BRANCH); Review Comment: Leaving this in draft, there's a good argument that we should update the removeRef(Main) behavior to not do the snapshotlog.clear() but in the past I was worried about behavior which relied on that. -- 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-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org