Navigation Menu

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

fix(ingest): correctly support multiple snowflake databases #3482

Merged
merged 2 commits into from Oct 28, 2021

Conversation

hsheth2
Copy link
Collaborator

@hsheth2 hsheth2 commented Oct 28, 2021

Prior to this fix, the listen_for hook would only be called for each dbapi connection. This would cause issues for us, since the dbapi connections live in a shared pool associated with each engine. To fix, we just create a new engine for each database. This does mean that we start extra connections to the db and hence are slightly less efficient, but this is a worthwhile tradeoff for ensuring correctness.

Should fix a regression introduced by #3369, which was discovered here: https://datahubspace.slack.com/archives/C029A3M079U/p1635366199095000.

This PR also contains a couple improvements in profiling logging.

Checklist

  • The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable)

Prior to this fix, the listen_for hook would only be called for each
dbapi connection. This would cause issues for us, since the dbapi
connections live in a shared pool associated with each engine. To fix
this fully, instead we just create a new engine for each database. This
does mean that we start extra connections to the db and hence are
slightly less efficient, but this is a worthwhile tradeoff for
correctness.
@github-actions
Copy link

Unit Test Results

     58 files  ±0       58 suites  ±0   20m 19s ⏱️ - 1m 24s
   525 tests ±0     473 ✔️ ±0  52 💤 ±0  0 ±0 
1 174 runs  ±0  1 106 ✔️ ±0  68 💤 ±0  0 ±0 

Results for commit e7c5e7e. ± Comparison against base commit 6f72536.

@rslanka
Copy link
Contributor

rslanka commented Oct 28, 2021

LGTM! Ship it!

Copy link
Contributor

@shirshanka shirshanka left a comment

Choose a reason for hiding this comment

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

LGTM

@shirshanka shirshanka merged commit 1fec105 into datahub-project:master Oct 28, 2021
@hsheth2 hsheth2 deleted the snowflake-engine-setup branch October 28, 2021 18:45
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.

None yet

3 participants