JingsongLi commented on code in PR #7429:
URL: https://github.com/apache/paimon/pull/7429#discussion_r2944146592
##########
paimon-core/src/main/java/org/apache/paimon/operation/ChangelogDeletion.java:
##########
@@ -63,25 +63,24 @@ public ChangelogDeletion(
public void cleanUnusedDataFiles(Changelog changelog,
Predicate<ExpireFileEntry> skipper) {
if (changelog.changelogManifestList() != null) {
deleteAddedDataFiles(changelog.changelogManifestList());
- }
-
- if (manifestList.exists(changelog.deltaManifestList())) {
- cleanUnusedDataFiles(changelog.deltaManifestList(), skipper);
+ } else {
+ if (manifestList.exists(changelog.deltaManifestList())) {
+ cleanUnusedDataFiles(changelog.deltaManifestList(), skipper);
+ }
}
}
@Override
public void cleanUnusedManifests(Changelog changelog, Set<String>
skippingSet) {
if (changelog.changelogManifestList() != null) {
cleanUnusedManifestList(changelog.changelogManifestList(),
skippingSet);
- }
-
- if (manifestList.exists(changelog.deltaManifestList())) {
- cleanUnusedManifestList(changelog.deltaManifestList(),
skippingSet);
- }
-
- if (manifestList.exists(changelog.baseManifestList())) {
- cleanUnusedManifestList(changelog.baseManifestList(), skippingSet);
+ } else {
+ if (manifestList.exists(changelog.deltaManifestList())) {
+ cleanUnusedManifestList(changelog.deltaManifestList(),
skippingSet);
+ }
+ if (manifestList.exists(changelog.baseManifestList())) {
+ cleanUnusedManifestList(changelog.baseManifestList(),
skippingSet);
Review Comment:
Why clean base here, it is very dangerous.
--
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]