ConeyLiu commented on code in PR #6335:
URL: https://github.com/apache/iceberg/pull/6335#discussion_r1255992620
##########
core/src/main/java/org/apache/iceberg/FastAppend.java:
##########
@@ -178,8 +184,25 @@ public Object updateEvent() {
@Override
protected void cleanUncommitted(Set<ManifestFile> committed) {
- if (newManifest != null && !committed.contains(newManifest)) {
- deleteFile(newManifest.path());
+ if (newManifests != null) {
+ // Delete those manifests are not contained in the committed set and
keep others as here.
+ // This is needed for manifests cleanup especially in transaction mode,
for example:
+ // Transaction txn = beginTransaction(...)
+ // // success operation and call this cleanUncommittedAppends
+ // txn.newFastAppend().appendFile(...).commit();
+ // some other operations ...
+ // // commit failed need to clean up those successes committed
manifests
Review Comment:
Updated
--
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]