zhoujinsong commented on issue #4290:
URL: https://github.com/apache/amoro/issues/4290#issuecomment-5066899100
Hi,
Thanks a lot for reporting this issue and providing the detail informarion.
I think you are right; the Iceberg Rest Catalog Server may not give back the
right response when committing fails due to some errors(like a SQLException
caused by the database not being available).
We should return `CommitFailedException` to the client when an error happens
on the server:
```
try {
commitTableInternal(tableMetadata, base, metadata,
newMetadataFileLocation);
org.apache.amoro.server.table.TableMetadata updatedMetadata = doCommit();
checkCommitSuccess(updatedMetadata, newMetadataFileLocation);
} catch (Exception e) {
LOG.error("Commit internal iceberg table failed, try to delete the staged
metadata files", e);
try {
io.deleteFile(newMetadataFileLocation);
} catch (Exception ignore) {
LOG.warn("Delete staged metadata files failed, ignore it", ignore);
}
throw new CommitFailedException(e);
} finally {
this.tableMetadata = null;
}
```
Are you interested in fixing the issue?
--
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]