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

Wrap redshift DROP ... CASCADE in a lock #349

Merged
merged 3 commits into from
Mar 26, 2017

Conversation

cmcarthur
Copy link
Member

I created a test Redshift cluster and ran the new test against development. Got a conflict with concurrent transaction every single time.

On this branch, the error isn't happening anymore.

Copy link
Contributor

@drewbanin drewbanin left a comment

Choose a reason for hiding this comment

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

This is great! LGTM when the tests pass

from dbt.adapters.postgres import PostgresAdapter
from dbt.logger import GLOBAL_LOGGER as logger # noqa


drop_lock = multiprocessing.Lock()
Copy link
Contributor

Choose a reason for hiding this comment

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

should we pop before we lock & drop it?

Copy link
Member Author

Choose a reason for hiding this comment

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

it took a lot of effort not to make this pop_lock_and_drop

@cmcarthur cmcarthur merged commit e080f73 into development Mar 26, 2017
@cmcarthur cmcarthur deleted the redshift/handle-concurrent-drops branch March 26, 2017 17:47
@drewbanin drewbanin changed the title wrap redshift DROP ... CASCADE in a lock Wrap redshift DROP ... CASCADE in a lock Sep 19, 2019
yu-iskw pushed a commit to yu-iskw/dbt that referenced this pull request Aug 17, 2021
* Tidy up changelog

* Add 0.7.0 entry to changelog

* Add order_by argument to get_column_values (dbt-labs#349)

* Add slugify macro to utils, use in pivot macro (dbt-labs#314)

* 0.20.0 compatibility (dbt-labs#371)

* Explicitly redefine Redshift -> default

* Upgrade generic tests

* Rm namespaces macro. New dispatch syntax

* Run tests with 0.20.0rc1

* Update changelog, readme

Co-authored-by: Jeremy Cohen <jeremy@fishtownanalytics.com>

* Simplify concat (dbt-labs#373)

* Postgres also have an alternative concat binary operation (dbt-labs#296)

* Update default implementation of concat macro

Co-authored-by: Christophe Duong <christophe.duong@gmail.com>

Co-authored-by: Jeremy Cohen <jeremy@fishtownanalytics.com>
Co-authored-by: Christophe Duong <christophe.duong@gmail.com>
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.

2 participants