wwj6591812 commented on code in PR #4467: URL: https://github.com/apache/paimon/pull/4467#discussion_r1831934781
########## paimon-core/src/main/java/org/apache/paimon/table/AbstractFileStoreTable.java: ########## @@ -625,14 +630,19 @@ public void rollbackTo(String tagName) { checkArgument(tagManager.tagExists(tagName), "Rollback tag '%s' doesn't exist.", tagName); Snapshot taggedSnapshot = tagManager.taggedSnapshot(tagName); + SnapshotManager snapshotManager = snapshotManager(); Review Comment: Add a blank line. ########## paimon-core/src/main/java/org/apache/paimon/table/AbstractFileStoreTable.java: ########## @@ -512,6 +512,11 @@ public void rollbackTo(long snapshotId) { "Rollback snapshot '%s' doesn't exist.", snapshotId); + // fast return + if (new Long(snapshotId).equals(snapshotManager.latestSnapshotId())) { Review Comment: I think new Long has a little strange. Why not: Long latestSnapshotId = snapshotManager.latestSnapshotId(); if (latestSnapshotId == null) { exception or error log } if (taggedSnapshot.id() == latestSnapshotId) { fast return } -- 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...@paimon.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org