JingsongLi commented on code in PR #2942:
URL: https://github.com/apache/incubator-paimon/pull/2942#discussion_r1513838474
##########
paimon-core/src/main/java/org/apache/paimon/table/ExpireSnapshotsImpl.java:
##########
@@ -215,10 +204,15 @@ public int expireUntil(long earliestId, long
endExclusiveId) {
}
Snapshot snapshot = snapshotManager.snapshot(id);
- snapshotDeletion.cleanUnusedManifests(snapshot, skippingSet);
+ snapshotDeletion.cleanUnusedManifests(snapshot, skippingSet,
false);
- // delete snapshot last
-
snapshotManager.fileIO().deleteQuietly(snapshotManager.snapshotPath(id));
+ // move snapshot metadata to changelog
+ try {
+ snapshotManager.moveToChangelog(id);
+ snapshotManager.commitLongLivedChangelogLatestHint(id);
Review Comment:
If we have to do it later, it is hard to keep forward compatibility.
It is better to provide a simple version now.
--
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]