{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/corefx/issues/6894","repository_url":"https://api.github.com/repos/dotnet/corefx","labels_url":"https://api.github.com/repos/dotnet/corefx/issues/6894/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/corefx/issues/6894/comments","events_url":"https://api.github.com/repos/dotnet/corefx/issues/6894/events","html_url":"https://github.com/dotnet/corefx/pull/6894","id":140844084,"number":6894,"title":"Make SetActiveConnectionAndResult in SqlCommand synchronous to avoid validation race conditions.","user":{"login":"corivera","id":12820011,"avatar_url":"https://avatars.githubusercontent.com/u/12820011?v=3","gravatar_id":"","url":"https://api.github.com/users/corivera","html_url":"https://github.com/corivera","followers_url":"https://api.github.com/users/corivera/followers","following_url":"https://api.github.com/users/corivera/following{/other_user}","gists_url":"https://api.github.com/users/corivera/gists{/gist_id}","starred_url":"https://api.github.com/users/corivera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/corivera/subscriptions","organizations_url":"https://api.github.com/users/corivera/orgs","repos_url":"https://api.github.com/users/corivera/repos","events_url":"https://api.github.com/users/corivera/events{/privacy}","received_events_url":"https://api.github.com/users/corivera/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dotnet/corefx/labels/2%20-%20In%20Progress","name":"2 - In Progress","color":"CCCCCC"},{"url":"https://api.github.com/repos/dotnet/corefx/labels/cla-already-signed","name":"cla-already-signed","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-03-15T01:30:45Z","updated_at":"2016-03-15T19:20:01Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/dotnet/corefx/pulls/6894","html_url":"https://github.com/dotnet/corefx/pull/6894","diff_url":"https://github.com/dotnet/corefx/pull/6894.diff","patch_url":"https://github.com/dotnet/corefx/pull/6894.patch"},"body":"SetActiveConnectionAndResult was being called in the async tasks for BeginExecute...ReadStage functions. This SetActiveConnection function sets the connection state that ValidateAsyncCommand checks before posting another async task. So if two async SqlCommand.Executes are called, the second might not see an active connection pending because the first's async task hasn't run yet to set the active connection in the first place. This inevitably causes problems when the two tasks run simultaneously and try to modify shared connection state."},"comment":{"url":"https://api.github.com/repos/dotnet/corefx/issues/comments/196982584","html_url":"https://github.com/dotnet/corefx/pull/6894#issuecomment-196982584","issue_url":"https://api.github.com/repos/dotnet/corefx/issues/6894","id":196982584,"user":{"login":"saurabh500","id":1623701,"avatar_url":"https://avatars.githubusercontent.com/u/1623701?v=3","gravatar_id":"","url":"https://api.github.com/users/saurabh500","html_url":"https://github.com/saurabh500","followers_url":"https://api.github.com/users/saurabh500/followers","following_url":"https://api.github.com/users/saurabh500/following{/other_user}","gists_url":"https://api.github.com/users/saurabh500/gists{/gist_id}","starred_url":"https://api.github.com/users/saurabh500/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saurabh500/subscriptions","organizations_url":"https://api.github.com/users/saurabh500/orgs","repos_url":"https://api.github.com/users/saurabh500/repos","events_url":"https://api.github.com/users/saurabh500/events{/privacy}","received_events_url":"https://api.github.com/users/saurabh500/received_events","type":"User","site_admin":false},"created_at":"2016-03-15T19:20:01Z","updated_at":"2016-03-15T19:20:01Z","body":"LGTM"}}