rdblue commented on a change in pull request #2932:
URL: https://github.com/apache/iceberg/pull/2932#discussion_r686110434
##########
File path:
core/src/main/java/org/apache/iceberg/actions/BaseRewriteDataFilesAction.java
##########
@@ -271,11 +273,13 @@ public RewriteDataFilesActionResult execute() {
private void replaceDataFiles(Iterable<DataFile> deletedDataFiles,
Iterable<DataFile> addedDataFiles,
long startingSnapshotId) {
try {
- RewriteFiles rewriteFiles = table.newRewrite()
- .validateFromSnapshot(startingSnapshotId)
- .rewriteFiles(Sets.newHashSet(deletedDataFiles),
Sets.newHashSet(addedDataFiles));
- commit(rewriteFiles);
+ doReplace(deletedDataFiles, addedDataFiles, startingSnapshotId);
+ } catch (CommitStateUnknownException e) {
+ LOG.warn("Commit state unknown for files: {}, cannot clean up files
because they may have been committed " +
+ "successfully.", Lists.newArrayList(addedDataFiles), e);
+ throw e;
} catch (Exception e) {
+ LOG.warn("Failed to rewrite, files {} will be delete",
Lists.newArrayList(addedDataFiles));
Review comment:
Let's remove the file list here as well. Instead, use "Failed to commit
rewrite, cleaning up rewritten files"
--
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]