trino
trino copied to clipboard
Avoid cleaning up metadata files in case of AWS Glue failure
Description
This is a follow-up of https://github.com/trinodb/trino/pull/14118
In case of dealing with an RuntimeException while commiting an Iceberg transaction, the Iceberg framework will clean up the metadata file corresponding to the transaction. In case of a metastore client timeout operation the Iceberg library can therefore delete metadata files which eventually get referenced from the configuration of the table persisted on the metastore for the table which leaves the table in a corrupt state.
Throw CommitStateUnknownException when dealing
with AWS Glue exceptions to ensure that the
table is not left in a corrupt state after the erroneous completion of the DML operation.
Non-technical explanation
Avoid deleting metadata files in case of a Glue operation failure because these files may eventually get referenced from the AWS Glue metastore configuration of the Iceberg table.
Release notes
( ) This is not user-visible and no release notes are required. ( ) Release notes are required, please propose a release note for me. (x) Release notes are required, with the following suggested text:
# Iceberg
* Avoid cleaning up metadata files in case of AWS Glue failure