-
Notifications
You must be signed in to change notification settings - Fork 205
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
Error acquiring lock on PostgreSQL when using Npgsql 8.0 #174
Comments
I think the reason is, the AcquireCommand returns now a null value instead of DBNull. In this line:
|
Any workaround? |
@Kaffeetasse appreciate the diagnosis. Seems like this is a breaking change in Npgsql (I wonder if it is intentional). fixing this in the package would be very easy; we can simply detect when it gets the “wrong” value and convert to what we expect. I’d be happy to look at a PR for this. Otherwise, I can hopefully get to it in a few weeks. |
Any time when someone will find time to review and release it? |
@valentasm1 I should be able to do it in the next few days. |
Handle npgsql 8 command null value to fix #174
I'm using DistributedLock.Postgres in a project that is using EF Core 7 and Npgsql 7. If I update the project to use EF Core 8 and Npgsql 8 RC2 I am no longer able to acquire a lock. Instead, I see an error and stack trace like the following:
I am creating the lock by passing the connection string to the
PostgresDistributedLock
constructor rather than anIDbConnection
instance but I've found that I get the same error regardless of which constructor I use.Reverting to EF Core 7/Npgsql 7 immediately fixes the issue.
The text was updated successfully, but these errors were encountered: