{"action":"created","issue":{"url":"https://api.github.com/repos/npgsql/npgsql/issues/1483","repository_url":"https://api.github.com/repos/npgsql/npgsql","labels_url":"https://api.github.com/repos/npgsql/npgsql/issues/1483/labels{/name}","comments_url":"https://api.github.com/repos/npgsql/npgsql/issues/1483/comments","events_url":"https://api.github.com/repos/npgsql/npgsql/issues/1483/events","html_url":"https://github.com/npgsql/npgsql/issues/1483","id":212802051,"number":1483,"title":"Enlist to ambient TransactionScope by default","user":{"login":"roji","id":1862641,"avatar_url":"https://avatars0.githubusercontent.com/u/1862641?v=4","gravatar_id":"","url":"https://api.github.com/users/roji","html_url":"https://github.com/roji","followers_url":"https://api.github.com/users/roji/followers","following_url":"https://api.github.com/users/roji/following{/other_user}","gists_url":"https://api.github.com/users/roji/gists{/gist_id}","starred_url":"https://api.github.com/users/roji/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roji/subscriptions","organizations_url":"https://api.github.com/users/roji/orgs","repos_url":"https://api.github.com/users/roji/repos","events_url":"https://api.github.com/users/roji/events{/privacy}","received_events_url":"https://api.github.com/users/roji/received_events","type":"User","site_admin":false},"labels":[{"id":70004675,"url":"https://api.github.com/repos/npgsql/npgsql/labels/feature","name":"feature","color":"009800","default":false},{"id":221594565,"url":"https://api.github.com/repos/npgsql/npgsql/labels/system.transactions","name":"system.transactions","color":"eb6420","default":false}],"state":"open","locked":false,"assignee":{"login":"roji","id":1862641,"avatar_url":"https://avatars0.githubusercontent.com/u/1862641?v=4","gravatar_id":"","url":"https://api.github.com/users/roji","html_url":"https://github.com/roji","followers_url":"https://api.github.com/users/roji/followers","following_url":"https://api.github.com/users/roji/following{/other_user}","gists_url":"https://api.github.com/users/roji/gists{/gist_id}","starred_url":"https://api.github.com/users/roji/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roji/subscriptions","organizations_url":"https://api.github.com/users/roji/orgs","repos_url":"https://api.github.com/users/roji/repos","events_url":"https://api.github.com/users/roji/events{/privacy}","received_events_url":"https://api.github.com/users/roji/received_events","type":"User","site_admin":false},"assignees":[{"login":"roji","id":1862641,"avatar_url":"https://avatars0.githubusercontent.com/u/1862641?v=4","gravatar_id":"","url":"https://api.github.com/users/roji","html_url":"https://github.com/roji","followers_url":"https://api.github.com/users/roji/followers","following_url":"https://api.github.com/users/roji/following{/other_user}","gists_url":"https://api.github.com/users/roji/gists{/gist_id}","starred_url":"https://api.github.com/users/roji/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roji/subscriptions","organizations_url":"https://api.github.com/users/roji/orgs","repos_url":"https://api.github.com/users/roji/repos","events_url":"https://api.github.com/users/roji/events{/privacy}","received_events_url":"https://api.github.com/users/roji/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/npgsql/npgsql/milestones/39","html_url":"https://github.com/npgsql/npgsql/milestone/39","labels_url":"https://api.github.com/repos/npgsql/npgsql/milestones/39/labels","id":2189415,"number":39,"title":"4.0","description":"","creator":{"login":"roji","id":1862641,"avatar_url":"https://avatars0.githubusercontent.com/u/1862641?v=4","gravatar_id":"","url":"https://api.github.com/users/roji","html_url":"https://github.com/roji","followers_url":"https://api.github.com/users/roji/followers","following_url":"https://api.github.com/users/roji/following{/other_user}","gists_url":"https://api.github.com/users/roji/gists{/gist_id}","starred_url":"https://api.github.com/users/roji/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roji/subscriptions","organizations_url":"https://api.github.com/users/roji/orgs","repos_url":"https://api.github.com/users/roji/repos","events_url":"https://api.github.com/users/roji/events{/privacy}","received_events_url":"https://api.github.com/users/roji/received_events","type":"User","site_admin":false},"open_issues":18,"closed_issues":44,"state":"open","created_at":"2016-12-11T19:07:59Z","updated_at":"2018-03-18T15:50:18Z","due_on":null,"closed_at":null},"comments":5,"created_at":"2017-03-08T17:29:19Z","updated_at":"2018-03-18T20:49:25Z","closed_at":null,"author_association":"OWNER","body":"Enlisting is currently opt-in, either via `Enlist=true` on the connection string or via `DbConnection.Enlist()`. Check what today's standard is with ADO.NET and maybe make `Enlist=true` the default."},"comment":{"url":"https://api.github.com/repos/npgsql/npgsql/issues/comments/374045453","html_url":"https://github.com/npgsql/npgsql/issues/1483#issuecomment-374045453","issue_url":"https://api.github.com/repos/npgsql/npgsql/issues/1483","id":374045453,"user":{"login":"fredericDelaporte","id":12201973,"avatar_url":"https://avatars2.githubusercontent.com/u/12201973?v=4","gravatar_id":"","url":"https://api.github.com/users/fredericDelaporte","html_url":"https://github.com/fredericDelaporte","followers_url":"https://api.github.com/users/fredericDelaporte/followers","following_url":"https://api.github.com/users/fredericDelaporte/following{/other_user}","gists_url":"https://api.github.com/users/fredericDelaporte/gists{/gist_id}","starred_url":"https://api.github.com/users/fredericDelaporte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fredericDelaporte/subscriptions","organizations_url":"https://api.github.com/users/fredericDelaporte/orgs","repos_url":"https://api.github.com/users/fredericDelaporte/repos","events_url":"https://api.github.com/users/fredericDelaporte/events{/privacy}","received_events_url":"https://api.github.com/users/fredericDelaporte/received_events","type":"User","site_admin":false},"created_at":"2018-03-18T20:49:25Z","updated_at":"2018-03-18T20:49:25Z","author_association":"CONTRIBUTOR","body":" > It could be argued that enlisting should be on by default, and that high-perf scenarios should disable it\r\n\r\nPrecisely what I think! But moreover, I doubt any real-world high-perf scenario would indeed benefit from this optimization:\r\n\r\n> The problem is that calling the getter is Transaction.Current is actually a perf-wise non-trivial operation\r\n\r\nThis [has been seen at NHibernate side](https://github.com/nhibernate/nhibernate-core/issues/1446), because it has starts enlisting by itself the connection in its 5.0 version, but the enlistment checks were done quite a bit too redundantly. (Not only once per operation on the session operation, but potentially many times). Once this point fixed (nhibernate/nhibernate-core#1455), the enlistment check cost disappeared again from the performance profiling.\r\n\r\nMoreover, this performance issue was witnessed only with a benchmark strongly deviating from a normal ORM usage. Normal usages were not showing any significant impact of the redundant checks NHibernate was doing in its 5.0.0 and 5.0.1 version.\r\n\r\nSo I have no difficulties believing you can see a performance impact when benchmarking just the Npgsql connection opening. But it seems likely to me this performance impact would vanish in a benchmark involving doing actually something with the connection, not just opening it.\r\n\r\nI personally do not think that benchmarks on a method are interesting. Who opens connections just for the sake of opening them in a business application? Such a benchmark tends to cause people focusing on points which may not help actually gaining performances, because in real usage case they are always bound to other operations weighting thousands more. (Opening a pooled connection has normally a trivial cost operation compared to actually querying the database, and opening a connection without querying the database seems a bit moot.)"}}
{"actor":{"display_login":"fredericDelaporte"}}