Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error handling for delete and truncate in Iceberg #24778

Merged
merged 4 commits into from
Jan 24, 2025

Conversation

pajaks
Copy link
Member

@pajaks pajaks commented Jan 23, 2025

Description

In case Iceberg commit fails for delete or truncate throw TrinoException with clear ICEBERG_COMMIT_ERROR type.

Additional context and related issues

Example stack trace:

"org.apache.iceberg.rest.ErrorHandlers$CommitErrorHandler.accept(ErrorHandlers.java:89)",
"org.apache.iceberg.rest.ErrorHandlers$CommitErrorHandler.accept(ErrorHandlers.java:80)",
"org.apache.iceberg.rest.HTTPClient.throwFailure(HTTPClient.java:211)",
"org.apache.iceberg.rest.HTTPClient.execute(HTTPClient.java:323)",
"org.apache.iceberg.rest.HTTPClient.execute(HTTPClient.java:262)",
"org.apache.iceberg.rest.HTTPClient.post(HTTPClient.java:368)",
"org.apache.iceberg.rest.RESTClient.post(RESTClient.java:112)",
"org.apache.iceberg.rest.RESTTableOperations.commit(RESTTableOperations.java:159)",
"org.apache.iceberg.SnapshotProducer.lambda$commit$2(SnapshotProducer.java:429)",
"org.apache.iceberg.util.Tasks$Builder.runTaskWithRetry(Tasks.java:413)",
"org.apache.iceberg.util.Tasks$Builder.runSingleThreaded(Tasks.java:219)",
"org.apache.iceberg.util.Tasks$Builder.run(Tasks.java:203)",
"org.apache.iceberg.util.Tasks$Builder.run(Tasks.java:196)",
"org.apache.iceberg.SnapshotProducer.commit(SnapshotProducer.java:401)",
"org.apache.iceberg.StreamingDelete.commit(StreamingDelete.java:24)",
"io.trino.plugin.iceberg.IcebergUtil.commit(IcebergUtil.java:1074)",
"io.trino.plugin.iceberg.IcebergMetadata.executeDelete(IcebergMetadata.java:2985)",

Release notes

(x) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
( ) Release notes are required, with the following suggested text:

## Section
* Fix some things. ({issue}`issuenumber`)

@cla-bot cla-bot bot added the cla-signed label Jan 23, 2025
@pajaks pajaks requested a review from ebyhr January 23, 2025 11:11
@github-actions github-actions bot added the iceberg Iceberg connector label Jan 23, 2025
@pajaks pajaks requested a review from losipiuk January 23, 2025 11:12
Copy link
Member

@ebyhr ebyhr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see only TestIcebergV2.testEnvironmentContext failed in the 1st attempt. Please find the relevant flaky test issue and leave a link to a failed job instead of rerunning all tests.

@ebyhr ebyhr merged commit 1fcc005 into trinodb:master Jan 24, 2025
44 checks passed
@github-actions github-actions bot added this to the 469 milestone Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed iceberg Iceberg connector
Development

Successfully merging this pull request may close these issues.

2 participants