rdblue commented on code in PR #19030:
URL: https://github.com/apache/iceberg/pull/19030#discussion_r4636961306


##########
core/src/main/java/org/apache/iceberg/SnapshotProducer.java:
##########
@@ -562,10 +603,10 @@ public void commit() {
             cleanUncommitted(committedManifestPaths(saved));
           }
 
-          // also clean up unused manifest lists created by multiple attempts
-          for (String manifestList : manifestsByManifestList.keySet()) {
-            if (!saved.manifestListLocation().equals(manifestList)) {
-              deleteFile(manifestList);
+          // also clean up unused root files created by multiple attempts
+          for (String rootLocation : rootToManifestLocations.keySet()) {

Review Comment:
   Besides changes to `apply`, the only other change is to handle metadata file 
cleanup. This is done the same way, except that `manifestsByManifestList` is 
now used for all versions and renamed to `rootToManifestLocations`. The root 
location (manifest list or root manifest) points to a set of manifest locations 
that it contains.
   
   The root file that gets committed is used to fetch the manifest paths it 
contains and those are passed to `cleanUncommitted`.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to