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

Add iceberg.jdbc-catalog.retryable-status-codes configuration property. #24066

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

asolovey
Copy link

@asolovey asolovey commented Nov 8, 2024

Allows retrying additional, JDBC driver and database specific errors
such as Postgres status codes 57000,57P03,57P04 if using Postgres.

Add iceberg.jdbc-catalog.retryable-status-codes configuration property.

Description

Iceberg JDBC catalog uses internal connection pool which supports retrying transient
connection errors which improves Iceberg catalog resilience.

By default, only a limited set of status codes is supported: https://github.com/apache/iceberg/blob/main/core/src/main/java/org/apache/iceberg/jdbc/JdbcClientPool.java#L50

These codes are database-agnostic and do not include database-specific transient errors.

To configure additional status codes, Iceberg JDBC Catalog supports retryable_status_codes configuration
property: https://github.com/apache/iceberg/blob/main/core/src/main/java/org/apache/iceberg/jdbc/JdbcClientPool.java#L73

This PR adds this property to the Trino Iceberg catalog properties so it can be configured.

Additional context and related issues

Partially fixes #23095.

Release notes

(x) Release notes are required, with the following suggested text:

## Iceberg
* Add `iceberg.jdbc-catalog.retryable-status-codes` configuration property in JDBC catalog
   to allow configuring additional, database-specific status codes to retry on JDBC connection errors.  ({issue}`23095`)

Allows retrying additional, JDBC driver and database specific errors
such as Postgres status codes `57000,57P03,57P04` if using Postgres.
Copy link

cla-bot bot commented Nov 8, 2024

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

@github-actions github-actions bot added docs iceberg Iceberg connector labels Nov 8, 2024
@ebyhr ebyhr self-requested a review November 8, 2024 03:18
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.

Did you submit CLA?

@@ -563,6 +563,14 @@ directory.
* - `iceberg.jdbc-catalog.schema-version`
- JDBC catalog schema version.
Valid values are `V0` or `V1`. Defaults to `V1`.
* - `iceberg.jdbc-catalog.retryable-status-codes`
Copy link
Member

Choose a reason for hiding this comment

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

Add iceberg.jdbc-catalog.retryable-status-codes configuration property.

Please follow the commit message guideline: https://trino.io/development/process#contribution-process

Do not end the subject line with a period.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs iceberg Iceberg connector
Development

Successfully merging this pull request may close these issues.

Iceberg JDBC catalog config properties not available in Trino
2 participants