-
Notifications
You must be signed in to change notification settings - Fork 101
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
Add nolock #204
Add nolock #204
Conversation
Adds with (nolock) to list_relations_without_caching macro
I am torn on this one. I am a user of dbt and SQL Server, not a dbt core or adapter developer. The PR fixes the issue. No deadlocks when doing Like you, I'm concerned about introducing A agree that use of Are their other callers of that macro? Do we need to consider MS db platform compatibility? |
Maybe this should be optional? Perhaps set in profiles.yml. |
Good idea.
And/or only use nowait when threads > 1
Either way gives users/developers a heads up that 'nowait' is used as a
concession for multithreading. As profile/cli doco, or simply the presence
of 'if' condition in the macro.
…On Fri, 28 Jan 2022, 6:32 pm Mikael Ene, ***@***.***> wrote:
Maybe this should be optional? Perhaps set in profiles.yml.
—
Reply to this email directly, view it on GitHub
<#204 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANX27CR3FTXRJCRQXOWTWMTUYJA73ANCNFSM5M6VYAZQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you commented.Message ID:
***@***.***>
|
Needs rebase on latest master |
Hi folks,
Not sure, I am of much help, but the locks seem to always be on
and things like
... long story short, I also cannot come up with a better solution than nolock on the list_relations_without_caching - (even though I don't know why the upper statement can not simply what that the lower one is finished. But it's getting late). Cheers |
@mikaelene @sdebruyn @dataders - any updates/suggestions on this PR? |
I've not been super involved in the development of this adapter lately. But when running tests, you usually don't update any data or definitions so for that reason I think it's perfectly fine to use "with no lock". I don't know how people use this adapter these days but my aim when creating it was to implement cloudDW-like behaviour on SQL server and the other clouds doesn't use lock what I know of. In an OLTP-setting it would be a bad idea, but as for DW and querying data for tests I guess it would be ok. Looks like the CI build is failing. If someone fix that I think we can merge. |
I managed to fix some other deadlocks as well in #368 but I definitely think we need this one as well |
Adds with (nolock) to list_relations_without_caching macro. Fixes deadlock issues when running dbt tests in issue #195. Also see Slack thread here: https://getdbt.slack.com/archives/CMRMDDQ9W/p1640064902122500
Outstanding questions:
Are we sure adding nolock is acceptable here? My understanding is that each dbt test is independent and does not use the same database objects, which should make this fine. There could be something I'm missing though.