-
Notifications
You must be signed in to change notification settings - Fork 29
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
Check if String_Split already exists #40
Conversation
Ok, its actually very easy to change the compatibility level for a database. I can confirm that this fix works. Previous output when creating multiple users and compatibility level 120:
With this change applied:
|
please explain how does this change eliminate the race condition |
The problem was for us it also worked on I think you might be right with your assumption that my test was inaccurate, as the the function was probably already defined by some previous run. Anyway, this code is still an improvement over the exisitng code I would argue, even though it doesnt fix the race conditon problem. Thinking about it the best way imo to say that the provider needs at least compatibility level 130, and if it is lower than the user is responsible for defining the missing function. This might be done by the provider you linked. |
Abandoned in favor of #52, which has the same implementation and also fixes the concurrency issue. |
Potential fix for #31
When multiple
mssql_user
resources are created using this provider, the compatibility level is less than 130, this seems to be an issue as the provider tried to define the custom function multiple times. I am testing on Azure currently (which seems to have compatibility level 150) so I cannot reliably test if this really solves it.As the user reported the issue didn't exist on
0.2.3
this seems like a safe addition and shouldn't break anything.