Repository navigation
Add some connection string checks for Npgsql - #419
Conversation
To make sure we're in high-perf mode
|
Ping, in the default mode Npgsql will attempt to enlist to an ambient TransactionScope, which will reduce Open() perf, so it's important to make sure this doesn't happen in the benchmarks... |
|
I already started to apply the connection string changes first, otherwise it would blow up existing scenarios. However I thought that the value was false by default, I looked at the documentation. |
|
It's true that it was off by default, but I've changed this for 4.0.0 - see the discussion in npgsql/npgsql#1483. I've updated the performance page in the docs to make sure people know to disable enlist in "high perf mode". However the docs on npgsql.org are still for 3.2, this is why you're still seeing that it's false by default. That's why I'm submitting this PR :) |
|
I had all my connection strings updates, then switched to 4.0 preview 1, and started seeing runtime issues. I am almost sure these errors where not there last week when I was measuring it. Let me know if you think this is an issue in EF, I can file it. |
|
I'm guessing that you're trying to use Npgsql.EntityFrameworkCore.PostgreSQL 2.0.x with Npgsql 4.0.0-preview1, right? There have been some breaking changes (at least for now) so EFCore.PG 2.0 will only work with Npgsql 3.2, and EFCore.PG 2.1 awill only work with Npgsql 4.0 - the idea is to align them and release Npgsql 4.0 at the same time as EFCore 2.1. Have you tried using EFCore 2.1.0-preview1 with Npgsql 4.0? Regardless, that shouldn't stop you from changing Enlist in the connection string. I'd also really recommend adding a check internally that enlist is false, otherwise someone may accidentally run without |
|
Correct, I can merge this PR. Just waiting to restart the long running jobs. Should be done by tomorrow morning. |
To make sure we're in high-perf mode.
/cc @sebastienros
Is it possible to also add something similar to https://github.com/aspnet/FrameworkBenchmarks to prevent accidental runs with non-optimized connection strings?