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 parallel rpc methods (2484) #2554

Merged
merged 4 commits into from
Jun 17, 2020
Merged

Conversation

beckjake
Copy link
Contributor

@beckjake beckjake commented Jun 16, 2020

resolves #2484

Description

This resolves the "parallel requests get the wrong arguments" issue described here, by deepcopying the arguments.

It resolves the hang/deadlock by switching to spawn instead of fork, which really hurts performance with medium/large manifests. Future patches will have to fix this, but the test hangs on a deadlock without it.

Checklist

  • I have signed the CLA
  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • I have updated the CHANGELOG.md and added information about my change to the "dbt next" section.

Jacob Beck added 3 commits June 16, 2020 13:08
For the test to work, we have to switch to spawn so that we don't deadlock
@cla-bot cla-bot bot added the cla:yes label Jun 16, 2020
@beckjake beckjake force-pushed the fix/parallel-rpc-method-stomping branch from ebac510 to 12a9c2b Compare June 16, 2020 20:46
@beckjake beckjake marked this pull request as ready for review June 16, 2020 22:20
Copy link
Contributor

@kwigley kwigley left a comment

Choose a reason for hiding this comment

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

lgtm!

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 a great fix for the near-term, but let's definitely catch up about some alternative approaches in the near future

@beckjake beckjake merged commit 64e9d70 into dev/0.17.1 Jun 17, 2020
@beckjake beckjake deleted the fix/parallel-rpc-method-stomping branch June 17, 2020 16:54
@hochoy
Copy link
Contributor

hochoy commented Jun 21, 2020

awesome!

@jars
Copy link

jars commented Sep 2, 2020

Hey folks, just chiming back here after a few months. Any more thought into restoring fork, but safely? We're doing some performance tuning of our application and dbt RPC on-the-fly compilations have degraded from ms to several sec with the fork -> spawn change. Is there an open ticket for that?

@beckjake, you mentioned the performance is degraded for really large manifests. Given that our compile_sql requests make use of macros, models, and sources (but not, say, tests, or analysis), do you have any suggestions on how we might prune the manifest for speedier compilations?

Thanks! 🙇

@jars
Copy link

jars commented Feb 28, 2022

Posted to hacker news today, might be relevant: https://gist.github.com/nicowilliams/a8a07b0fc75df05f684c23c18d7db234

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants