{"action":"created","comment":{"url":"https://api.github.com/repos/npgsql/npgsql/pulls/comments/123583502","pull_request_review_id":45792271,"id":123583502,"diff_hunk":"@@ -326,6 +375,8 @@ void Dispose()\n                 else\n                     _connector.Close();\n             }\n+            _isRMCall.Dispose();\n+            _secondPhaseLock.Dispose();","path":"src/Npgsql/VolatileResourceManager.cs","position":120,"original_position":120,"commit_id":"15e7110bac05505345f57c27161cb99269fcea6e","original_commit_id":"15e7110bac05505345f57c27161cb99269fcea6e","user":{"login":"fredericDelaporte","id":12201973,"avatar_url":"https://avatars1.githubusercontent.com/u/12201973?v=3","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},"body":"`Dispose` should be used only if all operation on the semaphore have completed. We have un-referenced the RM for avoiding new waiting threads, then released the lock. But does it immediately cause the waiting threads to no more use the semaphore? I am a bit unsure here, so I have put that try catch around the wait on the semaphore, in case there is a race condition between the signalling with `Release`, the actual end of thread waits, and the disposal here.","created_at":"2017-06-22T18:08:45Z","updated_at":"2017-06-22T18:09:01Z","html_url":"https://github.com/npgsql/npgsql/pull/1616#discussion_r123583502","pull_request_url":"https://api.github.com/repos/npgsql/npgsql/pulls/1616","_links":{"self":{"href":"https://api.github.com/repos/npgsql/npgsql/pulls/comments/123583502"},"html":{"href":"https://github.com/npgsql/npgsql/pull/1616#discussion_r123583502"},"pull_request":{"href":"https://api.github.com/repos/npgsql/npgsql/pulls/1616"}}},"pull_request":{"url":"https://api.github.com/repos/npgsql/npgsql/pulls/1616","id":127046756,"html_url":"https://github.com/npgsql/npgsql/pull/1616","diff_url":"https://github.com/npgsql/npgsql/pull/1616.diff","patch_url":"https://github.com/npgsql/npgsql/pull/1616.patch","issue_url":"https://api.github.com/repos/npgsql/npgsql/issues/1616","number":1616,"state":"open","locked":false,"title":"Synchronization for non timed-out rollback. #1611","user":{"login":"fredericDelaporte","id":12201973,"avatar_url":"https://avatars1.githubusercontent.com/u/12201973?v=3","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},"body":"Here is a working solution for avoiding the race condition after a distributed rollback. It does not even require the `EnlistTransaction(null)`. But it does not handle the troubles with timeouts.\r\n\r\nNote that locally I am unable to compile the new target netstandard 2.0.\r\n\r\nI am going to comment the proposed changes.","created_at":"2017-06-22T17:31:36Z","updated_at":"2017-06-22T18:09:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bb7377e5e8c6903de5eabc89e0e00861d2afb046","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/npgsql/npgsql/pulls/1616/commits","review_comments_url":"https://api.github.com/repos/npgsql/npgsql/pulls/1616/comments","review_comment_url":"https://api.github.com/repos/npgsql/npgsql/pulls/comments{/number}","comments_url":"https://api.github.com/repos/npgsql/npgsql/issues/1616/comments","statuses_url":"https://api.github.com/repos/npgsql/npgsql/statuses/15e7110bac05505345f57c27161cb99269fcea6e","head":{"label":"fredericDelaporte:RollbackLock","ref":"RollbackLock","sha":"15e7110bac05505345f57c27161cb99269fcea6e","user":{"login":"fredericDelaporte","id":12201973,"avatar_url":"https://avatars1.githubusercontent.com/u/12201973?v=3","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},"repo":{"id":92288363,"name":"npgsql","full_name":"fredericDelaporte/npgsql","owner":{"login":"fredericDelaporte","id":12201973,"avatar_url":"https://avatars1.githubusercontent.com/u/12201973?v=3","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},"private":false,"html_url":"https://github.com/fredericDelaporte/npgsql","description":"Npgsql is the .NET data provider for PostgreSQL.","fork":true,"url":"https://api.github.com/repos/fredericDelaporte/npgsql","forks_url":"https://api.github.com/repos/fredericDelaporte/npgsql/forks","keys_url":"https://api.github.com/repos/fredericDelaporte/npgsql/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fredericDelaporte/npgsql/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fredericDelaporte/npgsql/teams","hooks_url":"https://api.github.com/repos/fredericDelaporte/npgsql/hooks","issue_events_url":"https://api.github.com/repos/fredericDelaporte/npgsql/issues/events{/number}","events_url":"https://api.github.com/repos/fredericDelaporte/npgsql/events","assignees_url":"https://api.github.com/repos/fredericDelaporte/npgsql/assignees{/user}","branches_url":"https://api.github.com/repos/fredericDelaporte/npgsql/branches{/branch}","tags_url":"https://api.github.com/repos/fredericDelaporte/npgsql/tags","blobs_url":"https://api.github.com/repos/fredericDelaporte/npgsql/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fredericDelaporte/npgsql/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fredericDelaporte/npgsql/git/refs{/sha}","trees_url":"https://api.github.com/repos/fredericDelaporte/npgsql/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fredericDelaporte/npgsql/statuses/{sha}","languages_url":"https://api.github.com/repos/fredericDelaporte/npgsql/languages","stargazers_url":"https://api.github.com/repos/fredericDelaporte/npgsql/stargazers","contributors_url":"https://api.github.com/repos/fredericDelaporte/npgsql/contributors","subscribers_url":"https://api.github.com/repos/fredericDelaporte/npgsql/subscribers","subscription_url":"https://api.github.com/repos/fredericDelaporte/npgsql/subscription","commits_url":"https://api.github.com/repos/fredericDelaporte/npgsql/commits{/sha}","git_commits_url":"https://api.github.com/repos/fredericDelaporte/npgsql/git/commits{/sha}","comments_url":"https://api.github.com/repos/fredericDelaporte/npgsql/comments{/number}","issue_comment_url":"https://api.github.com/repos/fredericDelaporte/npgsql/issues/comments{/number}","contents_url":"https://api.github.com/repos/fredericDelaporte/npgsql/contents/{+path}","compare_url":"https://api.github.com/repos/fredericDelaporte/npgsql/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fredericDelaporte/npgsql/merges","archive_url":"https://api.github.com/repos/fredericDelaporte/npgsql/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fredericDelaporte/npgsql/downloads","issues_url":"https://api.github.com/repos/fredericDelaporte/npgsql/issues{/number}","pulls_url":"https://api.github.com/repos/fredericDelaporte/npgsql/pulls{/number}","milestones_url":"https://api.github.com/repos/fredericDelaporte/npgsql/milestones{/number}","notifications_url":"https://api.github.com/repos/fredericDelaporte/npgsql/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fredericDelaporte/npgsql/labels{/name}","releases_url":"https://api.github.com/repos/fredericDelaporte/npgsql/releases{/id}","deployments_url":"https://api.github.com/repos/fredericDelaporte/npgsql/deployments","created_at":"2017-05-24T12:11:48Z","updated_at":"2017-05-24T12:11:51Z","pushed_at":"2017-06-22T17:59:51Z","git_url":"git://github.com/fredericDelaporte/npgsql.git","ssh_url":"git@github.com:fredericDelaporte/npgsql.git","clone_url":"https://github.com/fredericDelaporte/npgsql.git","svn_url":"https://github.com/fredericDelaporte/npgsql","homepage":"http://www.npgsql.org","size":53973,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"dev"}},"base":{"label":"npgsql:dev","ref":"dev","sha":"dd5522ff9ea48ce191c11eb3330926317d60a940","user":{"login":"npgsql","id":5766497,"avatar_url":"https://avatars1.githubusercontent.com/u/5766497?v=3","gravatar_id":"","url":"https://api.github.com/users/npgsql","html_url":"https://github.com/npgsql","followers_url":"https://api.github.com/users/npgsql/followers","following_url":"https://api.github.com/users/npgsql/following{/other_user}","gists_url":"https://api.github.com/users/npgsql/gists{/gist_id}","starred_url":"https://api.github.com/users/npgsql/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/npgsql/subscriptions","organizations_url":"https://api.github.com/users/npgsql/orgs","repos_url":"https://api.github.com/users/npgsql/repos","events_url":"https://api.github.com/users/npgsql/events{/privacy}","received_events_url":"https://api.github.com/users/npgsql/received_events","type":"Organization","site_admin":false},"repo":{"id":2883574,"name":"npgsql","full_name":"npgsql/npgsql","owner":{"login":"npgsql","id":5766497,"avatar_url":"https://avatars1.githubusercontent.com/u/5766497?v=3","gravatar_id":"","url":"https://api.github.com/users/npgsql","html_url":"https://github.com/npgsql","followers_url":"https://api.github.com/users/npgsql/followers","following_url":"https://api.github.com/users/npgsql/following{/other_user}","gists_url":"https://api.github.com/users/npgsql/gists{/gist_id}","starred_url":"https://api.github.com/users/npgsql/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/npgsql/subscriptions","organizations_url":"https://api.github.com/users/npgsql/orgs","repos_url":"https://api.github.com/users/npgsql/repos","events_url":"https://api.github.com/users/npgsql/events{/privacy}","received_events_url":"https://api.github.com/users/npgsql/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/npgsql/npgsql","description":"Npgsql is the .NET data provider for PostgreSQL.","fork":false,"url":"https://api.github.com/repos/npgsql/npgsql","forks_url":"https://api.github.com/repos/npgsql/npgsql/forks","keys_url":"https://api.github.com/repos/npgsql/npgsql/keys{/key_id}","collaborators_url":"https://api.github.com/repos/npgsql/npgsql/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/npgsql/npgsql/teams","hooks_url":"https://api.github.com/repos/npgsql/npgsql/hooks","issue_events_url":"https://api.github.com/repos/npgsql/npgsql/issues/events{/number}","events_url":"https://api.github.com/repos/npgsql/npgsql/events","assignees_url":"https://api.github.com/repos/npgsql/npgsql/assignees{/user}","branches_url":"https://api.github.com/repos/npgsql/npgsql/branches{/branch}","tags_url":"https://api.github.com/repos/npgsql/npgsql/tags","blobs_url":"https://api.github.com/repos/npgsql/npgsql/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/npgsql/npgsql/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/npgsql/npgsql/git/refs{/sha}","trees_url":"https://api.github.com/repos/npgsql/npgsql/git/trees{/sha}","statuses_url":"https://api.github.com/repos/npgsql/npgsql/statuses/{sha}","languages_url":"https://api.github.com/repos/npgsql/npgsql/languages","stargazers_url":"https://api.github.com/repos/npgsql/npgsql/stargazers","contributors_url":"https://api.github.com/repos/npgsql/npgsql/contributors","subscribers_url":"https://api.github.com/repos/npgsql/npgsql/subscribers","subscription_url":"https://api.github.com/repos/npgsql/npgsql/subscription","commits_url":"https://api.github.com/repos/npgsql/npgsql/commits{/sha}","git_commits_url":"https://api.github.com/repos/npgsql/npgsql/git/commits{/sha}","comments_url":"https://api.github.com/repos/npgsql/npgsql/comments{/number}","issue_comment_url":"https://api.github.com/repos/npgsql/npgsql/issues/comments{/number}","contents_url":"https://api.github.com/repos/npgsql/npgsql/contents/{+path}","compare_url":"https://api.github.com/repos/npgsql/npgsql/compare/{base}...{head}","merges_url":"https://api.github.com/repos/npgsql/npgsql/merges","archive_url":"https://api.github.com/repos/npgsql/npgsql/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/npgsql/npgsql/downloads","issues_url":"https://api.github.com/repos/npgsql/npgsql/issues{/number}","pulls_url":"https://api.github.com/repos/npgsql/npgsql/pulls{/number}","milestones_url":"https://api.github.com/repos/npgsql/npgsql/milestones{/number}","notifications_url":"https://api.github.com/repos/npgsql/npgsql/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/npgsql/npgsql/labels{/name}","releases_url":"https://api.github.com/repos/npgsql/npgsql/releases{/id}","deployments_url":"https://api.github.com/repos/npgsql/npgsql/deployments","created_at":"2011-11-30T14:13:32Z","updated_at":"2017-06-18T21:26:59Z","pushed_at":"2017-06-22T17:59:53Z","git_url":"git://github.com/npgsql/npgsql.git","ssh_url":"git@github.com:npgsql/npgsql.git","clone_url":"https://github.com/npgsql/npgsql.git","svn_url":"https://github.com/npgsql/npgsql","homepage":"http://www.npgsql.org","size":54054,"stargazers_count":978,"watchers_count":978,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":390,"mirror_url":null,"open_issues_count":111,"forks":390,"open_issues":111,"watchers":978,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/npgsql/npgsql/pulls/1616"},"html":{"href":"https://github.com/npgsql/npgsql/pull/1616"},"issue":{"href":"https://api.github.com/repos/npgsql/npgsql/issues/1616"},"comments":{"href":"https://api.github.com/repos/npgsql/npgsql/issues/1616/comments"},"review_comments":{"href":"https://api.github.com/repos/npgsql/npgsql/pulls/1616/comments"},"review_comment":{"href":"https://api.github.com/repos/npgsql/npgsql/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/npgsql/npgsql/pulls/1616/commits"},"statuses":{"href":"https://api.github.com/repos/npgsql/npgsql/statuses/15e7110bac05505345f57c27161cb99269fcea6e"}}}}
{"actor":{"display_login":"fredericDelaporte"}}