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

Throw TrinoException when Iceberg commit fails #23008

Merged

Conversation

pajaks
Copy link
Member

@pajaks pajaks commented Aug 12, 2024

Description

In case Iceberg commit fails throw TrinoException with clear error type.

Additional context and related issues

Example stack trace:

  "type": "org.apache.iceberg.exceptions.ValidationException",
  "message": "Cannot commit, found new delete for replaced data file: ",
  "suppressed": [],
  "stack": [
    "org.apache.iceberg.exceptions.ValidationException.check(ValidationException.java:49)",
    "org.apache.iceberg.MergingSnapshotProducer.validateNoNewDeletesForDataFiles(MergingSnapshotProducer.java:481)",
    "org.apache.iceberg.MergingSnapshotProducer.validateNoNewDeletesForDataFiles(MergingSnapshotProducer.java:413)",
    "org.apache.iceberg.BaseRewriteFiles.validate(BaseRewriteFiles.java:140)",
    "org.apache.iceberg.SnapshotProducer.apply(SnapshotProducer.java:233)",
    "org.apache.iceberg.SnapshotProducer.lambda$commit$2(SnapshotProducer.java:384)",
    "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:382)",
    "org.apache.iceberg.BaseTransaction.applyUpdates(BaseTransaction.java:509)",
    "org.apache.iceberg.BaseTransaction.lambda$commitSimpleTransaction$3(BaseTransaction.java:425)",
    "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.BaseTransaction.commitSimpleTransaction(BaseTransaction.java:423)",
    "org.apache.iceberg.BaseTransaction.commitTransaction(BaseTransaction.java:318)",
    "io.trino.plugin.iceberg.IcebergMetadata.finishOptimize(IcebergMetadata.java:1610)",
    "io.trino.plugin.iceberg.IcebergMetadata.finishTableExecute(IcebergMetadata.java:1533)",

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 Aug 12, 2024
@github-actions github-actions bot added the iceberg Iceberg connector label Aug 12, 2024
@pajaks pajaks marked this pull request as ready for review August 12, 2024 11:50
@pajaks pajaks force-pushed the pajaks/recategorize_iceberg_optimize branch from 0134f69 to ca5c363 Compare August 13, 2024 09:27
@pajaks pajaks changed the title Throw TrinoException when Iceberg optimization fails Throw TrinoException when Iceberg commit fails Aug 13, 2024
@pajaks pajaks requested a review from ebyhr August 13, 2024 09:28
@pajaks pajaks force-pushed the pajaks/recategorize_iceberg_optimize branch from ca5c363 to 6dfbb0e Compare August 14, 2024 12:17
@pajaks pajaks requested a review from losipiuk August 14, 2024 12:21
@ebyhr
Copy link
Member

ebyhr commented Aug 15, 2024

@pajaks pajaks force-pushed the pajaks/recategorize_iceberg_optimize branch from 6dfbb0e to a22bec7 Compare August 16, 2024 09:33
@losipiuk losipiuk merged commit 8a6b159 into trinodb:master Aug 21, 2024
42 checks passed
@github-actions github-actions bot added this to the 455 milestone Aug 21, 2024
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.

4 participants