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

Ado.net storage provider try to insert null for non nullable column #4351

Closed
AdamWyzgol opened this issue Mar 29, 2018 · 7 comments
Closed
Milestone

Comments

@AdamWyzgol
Copy link

After upgrade to 2.0 I got this error when using ado.net storage:
Exc level 0: System.Data.SqlClient.SqlException: Cannot insert the value NULL into column 'ServiceId', table 'Orleans.dbo.Storage'; column does not allow nulls. INSERT fails.

@AdamWyzgol
Copy link
Author

probably before 2.0 in clusterOptions serviceId was set to default "00000000-0000-0000-0000-000000000000" now it's set to null, after configure serviceId to value that used to have everything is working. When serviceId is null ado.net storage is not working even when I set this column to nullable.

@quaider
Copy link

quaider commented Mar 29, 2018

serviceId's type may changes from guid to string

@veikkoeeva
Copy link
Contributor

I'll page @xiazen as she did a lot of hard work on this lately and might know if there's a good place for PR to go and check the ID really is set. Very good you had yourself unblocked. 👍

@sergeybykov
Copy link
Contributor

Yes, this is because we changed ServiceId from Guid that implicitly defaulted to empty GUID to string.

Beware also of http://dotnet.github.io/orleans/Documentation/2.0/Migration1.5.html#provider-configuration.

@sergeybykov sergeybykov added this to the Triage milestone Mar 29, 2018
@veikkoeeva
Copy link
Contributor

@sergeybykov To make a bit progress, is this behavior consistent across all providers and what would be the path of least surprise (e.g. provide a default if one isn't set or something else)?

@sergeybykov
Copy link
Contributor

One option is to add validation similar to #4160 to make sure service ID is configured.

@ReubenBond
Copy link
Member

We have a validator now, so this particular issue should no longer occur

@ghost ghost locked as resolved and limited conversation to collaborators Sep 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants