LsomeYeah commented on code in PR #5228:
URL: https://github.com/apache/paimon/pull/5228#discussion_r1990482874


##########
paimon-core/src/main/java/org/apache/paimon/iceberg/IcebergCommitCallback.java:
##########
@@ -752,7 +752,25 @@ private void expireAllBefore(long snapshotId) throws 
IOException {
                 }
                 table.fileIO().deleteQuietly(listPath);
             }
-            table.fileIO().deleteQuietly(path);
+            deleteApplicableMetadataFiles(snapshotId);

Review Comment:
   Thanks for your explanation!
   
   I agree with the second point, but for the first point, all the snapshots in 
the old metadata file had been expired in `expireAllBefore`, relevant manifest 
list files and manifest meta files had been deleted too. In this case iceberg 
readers could not read data files properly even if the old metadata file was 
retained.
   
   Therefore, could I assume that the key reason for retaining old metadata is 
for auditing purposes(may be for tracking schema evolution or some other 
reason) in `expireAllBefore`?



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