ConeyLiu commented on code in PR #9230: URL: https://github.com/apache/iceberg/pull/9230#discussion_r1419062959
########## core/src/main/java/org/apache/iceberg/MergingSnapshotProducer.java: ########## @@ -895,7 +895,7 @@ private void cleanUncommittedAppends(Set<ManifestFile> committed) { } } - this.cachedNewDataManifests = committedNewDataManifests; + this.cachedNewDataManifests = null; Review Comment: I think @nastra this solution is much better and solid. We should not set `cachedNewDataManifests ` to null directly. Consider the following case: ``` 1. Transaction transaction = table.newTransaction(); 2. transaction.newAppend().appendFile(...).commit(); // generate new manifest file 3. // transaction operation failed 4. transaction.commitTransaction(); // failed to commit ``` With the changes in this PR, the new manifest files generated by step 2 will not be deleted in step 4. I think the failed UTs could be verified this. -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org