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

[du] add backoff for duckdb connections #26408

Merged
merged 3 commits into from
Dec 13, 2024

Conversation

dehume
Copy link
Contributor

@dehume dehume commented Dec 11, 2024

Summary & Motivation

Update code snippets for sections 4 and 6 to wrap DuckDB connection in backoff to prevent race conditions when materializing all assets (Not an issue after these assets switch to using resources).

How I Tested These Changes

Changelog

Insert changelog entry or delete this section.

@dehume dehume requested a review from cmpadden December 11, 2024 16:51
@dehume dehume requested a review from neverett as a code owner December 11, 2024 16:51
@@ -111,6 +125,8 @@ To refactor `taxi_trips` to use the `database` resource, we had to:
conn.execute(query)
```

Notice that we no longer need to use the `backoff` function. The Dagster `DuckDBResource` handles this functionality for us.
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice, thanks for calling this out.

Copy link
Contributor

Choose a reason for hiding this comment

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

seconded

Copy link
Contributor

@cmpadden cmpadden left a comment

Choose a reason for hiding this comment

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

Great work! Be sure to links this or comment in the original GitHub issue once this is merged. Thanks!

Copy link
Contributor

@neverett neverett left a comment

Choose a reason for hiding this comment

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

Left some small copyediting suggestions, otherwise LGTM

@@ -111,6 +125,8 @@ To refactor `taxi_trips` to use the `database` resource, we had to:
conn.execute(query)
```

Notice that we no longer need to use the `backoff` function. The Dagster `DuckDBResource` handles this functionality for us.
Copy link
Contributor

Choose a reason for hiding this comment

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

seconded

@dehume dehume merged commit 9eb5c0a into dagster-io:master Dec 13, 2024
0 of 3 checks passed
@dehume dehume deleted the add-backoff-duckdb-connections branch December 13, 2024 14:56
pskinnerthyme pushed a commit to pskinnerthyme/dagster that referenced this pull request Dec 16, 2024
## Summary & Motivation

Update code snippets for sections 4 and 6 to wrap DuckDB connection in
backoff to prevent race conditions when materializing all assets (Not an
issue after these assets switch to using resources).

## How I Tested These Changes

## Changelog

> Insert changelog entry or delete this section.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants