JingsongLi commented on code in PR #1810:
URL: https://github.com/apache/incubator-paimon/pull/1810#discussion_r1293145823
##########
paimon-core/src/main/java/org/apache/paimon/tag/TagAutoCreation.java:
##########
@@ -115,6 +115,8 @@ private TagAutoCreation(
}
public void run() {
+ // avoid snapshot has been expired
+ nextSnapshot = Math.max(snapshotManager.earliestSnapshotId(),
nextSnapshot);
Review Comment:
```
public void run() {
while (true) {
if (snapshotManager.snapshotExists(nextSnapshot)) {
tryToTag(snapshotManager.snapshot(nextSnapshot));
nextSnapshot++;
} else {
Long earliest = snapshotManager.earliestSnapshotId();
if (earliest != null && earliest > nextSnapshot) {
nextSnapshot = earliest;
} else {
break;
}
}
}
}
```
--
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]