JingsongLi commented on code in PR #8450:
URL: https://github.com/apache/paimon/pull/8450#discussion_r3520021665


##########
paimon-core/src/main/java/org/apache/paimon/operation/FileStoreCommitImpl.java:
##########
@@ -1400,6 +1406,25 @@ public boolean rollbackToAsLatest(Snapshot 
targetSnapshot) {
         return success;
     }
 
+    private void createRollbackToAsLatestTagIfNeeded(Snapshot targetSnapshot) {
+        for (Snapshot taggedSnapshot : tagManager.tags().keySet()) {
+            if (taggedSnapshot.id() == targetSnapshot.id()) {

Review Comment:
   Fixed, thanks. The skip condition now only accepts an existing tag on the 
target snapshot when `tagTimeRetained == null`; expiring tags still trigger 
creation of a non-expiring `rollback-to-as-latest-*` protection tag. I also 
moved the tag creation out of `FileStoreCommitImpl` into `TableCommitImpl` so 
the lower-level commit implementation does not depend on `TagManager`. The 
regression test now covers an existing `Duration.ZERO` tag before rollback.



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

Reply via email to