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

[CT-471] Redshift: Retry n times on connection timeout #96

Closed
barberscott opened this issue Apr 9, 2022 · 2 comments
Closed

[CT-471] Redshift: Retry n times on connection timeout #96

barberscott opened this issue Apr 9, 2022 · 2 comments
Labels
enhancement New feature or request Stale

Comments

@barberscott
Copy link

Describe the feature

Runs/builds/tests can create hundreds of independent database connections depending on the size of the project and a single connection timeout due to transient network connections, EC2 load, or redshift load can cause an entire run to fail. Connection timeouts can, and most often are, transient and will often succeed on a retry.

Additional context

This would be similar to connect_retries on Snowflake.
See: https://github.com/dbt-labs/dbt-snowflake/pull/6/files

Who will this benefit?

Anyone using the redshift connector.

@barberscott barberscott added enhancement New feature or request triage labels Apr 9, 2022
@github-actions github-actions bot changed the title Retry n times on connection timeout [CT-471] Retry n times on connection timeout Apr 9, 2022
@barberscott barberscott changed the title [CT-471] Retry n times on connection timeout [CT-471] Redshift: Retry n times on connection timeout Apr 10, 2022
@nathaniel-may
Copy link
Contributor

Hi @barberscott, safely retrying operations on our warehouses is definitely a good idea for exactly the reasons you describe. Today it looks like the the Snowflake connector for Python docs doesn't provide any of this functionality for us but it shouldn't be too much of a lift to implement ourselves since all the operations dbt runs on the warehouse are idempotent. We'd need to be purposeful with how we handle retries with hooks since you can write non-idempotent hooks even though that's not recommended. For example, we could retry as if they are always idempotent and document that the behavior of non-idempotent hooks is undefined.

For our own future reference, the comment in #5022 has some extra details for what might happen with other adapters that we should consider being consistent with.

@github-actions
Copy link
Contributor

This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please remove the stale label or comment on the issue, or it will be closed in 7 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Stale
Projects
None yet
Development

No branches or pull requests

2 participants