{"action":"created","comment":{"url":"https://api.github.com/repos/dexidp/dex/pulls/comments/240572600","pull_request_review_id":183629824,"id":240572600,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MDU3MjYwMA==","diff_hunk":"@@ -380,13 +386,23 @@ func (c *conn) UpdateKeys(updater func(old storage.Keys) (storage.Keys, error))\n \t\tfirstUpdate := false\n \t\t// TODO(ericchiang): errors may cause a transaction be rolled back by the SQL\n \t\t// server. Test this, and consider adding a COUNT() command beforehand.","path":"storage/sql/crud.go","position":20,"original_position":20,"commit_id":"2d5769522717aa49c02ab347944707bda3a66b5b","original_commit_id":"2d5769522717aa49c02ab347944707bda3a66b5b","user":{"login":"srenatus","id":870638,"node_id":"MDQ6VXNlcjg3MDYzOA==","avatar_url":"https://avatars3.githubusercontent.com/u/870638?v=4","gravatar_id":"","url":"https://api.github.com/users/srenatus","html_url":"https://github.com/srenatus","followers_url":"https://api.github.com/users/srenatus/followers","following_url":"https://api.github.com/users/srenatus/following{/other_user}","gists_url":"https://api.github.com/users/srenatus/gists{/gist_id}","starred_url":"https://api.github.com/users/srenatus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srenatus/subscriptions","organizations_url":"https://api.github.com/users/srenatus/orgs","repos_url":"https://api.github.com/users/srenatus/repos","events_url":"https://api.github.com/users/srenatus/events{/privacy}","received_events_url":"https://api.github.com/users/srenatus/received_events","type":"User","site_admin":false},"body":"🤔 Is that comment still accurate now?","created_at":"2018-12-11T11:31:37Z","updated_at":"2018-12-11T11:39:05Z","html_url":"https://github.com/dexidp/dex/pull/1370#discussion_r240572600","pull_request_url":"https://api.github.com/repos/dexidp/dex/pulls/1370","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/dexidp/dex/pulls/comments/240572600"},"html":{"href":"https://github.com/dexidp/dex/pull/1370#discussion_r240572600"},"pull_request":{"href":"https://api.github.com/repos/dexidp/dex/pulls/1370"}}},"pull_request":{"url":"https://api.github.com/repos/dexidp/dex/pulls/1370","id":237319014,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM3MzE5MDE0","html_url":"https://github.com/dexidp/dex/pull/1370","diff_url":"https://github.com/dexidp/dex/pull/1370.diff","patch_url":"https://github.com/dexidp/dex/pull/1370.patch","issue_url":"https://api.github.com/repos/dexidp/dex/issues/1370","number":1370,"state":"open","locked":false,"title":"Fix concurrent access for SQL storage.","user":{"login":"kepkin","id":2153196,"node_id":"MDQ6VXNlcjIxNTMxOTY=","avatar_url":"https://avatars0.githubusercontent.com/u/2153196?v=4","gravatar_id":"","url":"https://api.github.com/users/kepkin","html_url":"https://github.com/kepkin","followers_url":"https://api.github.com/users/kepkin/followers","following_url":"https://api.github.com/users/kepkin/following{/other_user}","gists_url":"https://api.github.com/users/kepkin/gists{/gist_id}","starred_url":"https://api.github.com/users/kepkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kepkin/subscriptions","organizations_url":"https://api.github.com/users/kepkin/orgs","repos_url":"https://api.github.com/users/kepkin/repos","events_url":"https://api.github.com/users/kepkin/events{/privacy}","received_events_url":"https://api.github.com/users/kepkin/received_events","type":"User","site_admin":false},"body":"SERIALIZABLE isolation level is not viable solution, as it will slow down the whole Postgres. And again there must be retries as you will always receive errors like \"could not serialize access...\".\r\n\r\nPrevious pull request for retries like https://github.com/dexidp/dex/pull/1356 were wrong as it resulted in deadlock in Database (you open transaction inside another transaction in conformance tests).\r\n\r\nIn SQL world the better solution is to lock the row explicitly with SELECT FOR UPDATE. ","created_at":"2018-12-10T13:25:28Z","updated_at":"2018-12-11T11:39:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c0428694d9b74795ecd62fbdc7cacd906ca93edc","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/dexidp/dex/pulls/1370/commits","review_comments_url":"https://api.github.com/repos/dexidp/dex/pulls/1370/comments","review_comment_url":"https://api.github.com/repos/dexidp/dex/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dexidp/dex/issues/1370/comments","statuses_url":"https://api.github.com/repos/dexidp/dex/statuses/2d5769522717aa49c02ab347944707bda3a66b5b","head":{"label":"kepkin:pgsql-concurrent","ref":"pgsql-concurrent","sha":"2d5769522717aa49c02ab347944707bda3a66b5b","user":{"login":"kepkin","id":2153196,"node_id":"MDQ6VXNlcjIxNTMxOTY=","avatar_url":"https://avatars0.githubusercontent.com/u/2153196?v=4","gravatar_id":"","url":"https://api.github.com/users/kepkin","html_url":"https://github.com/kepkin","followers_url":"https://api.github.com/users/kepkin/followers","following_url":"https://api.github.com/users/kepkin/following{/other_user}","gists_url":"https://api.github.com/users/kepkin/gists{/gist_id}","starred_url":"https://api.github.com/users/kepkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kepkin/subscriptions","organizations_url":"https://api.github.com/users/kepkin/orgs","repos_url":"https://api.github.com/users/kepkin/repos","events_url":"https://api.github.com/users/kepkin/events{/privacy}","received_events_url":"https://api.github.com/users/kepkin/received_events","type":"User","site_admin":false},"repo":{"id":143733893,"node_id":"MDEwOlJlcG9zaXRvcnkxNDM3MzM4OTM=","name":"dex","full_name":"kepkin/dex","private":false,"owner":{"login":"kepkin","id":2153196,"node_id":"MDQ6VXNlcjIxNTMxOTY=","avatar_url":"https://avatars0.githubusercontent.com/u/2153196?v=4","gravatar_id":"","url":"https://api.github.com/users/kepkin","html_url":"https://github.com/kepkin","followers_url":"https://api.github.com/users/kepkin/followers","following_url":"https://api.github.com/users/kepkin/following{/other_user}","gists_url":"https://api.github.com/users/kepkin/gists{/gist_id}","starred_url":"https://api.github.com/users/kepkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kepkin/subscriptions","organizations_url":"https://api.github.com/users/kepkin/orgs","repos_url":"https://api.github.com/users/kepkin/repos","events_url":"https://api.github.com/users/kepkin/events{/privacy}","received_events_url":"https://api.github.com/users/kepkin/received_events","type":"User","site_admin":false},"html_url":"https://github.com/kepkin/dex","description":"OpenID Connect Identity (OIDC) and OAuth 2.0 Provider with Pluggable Connectors","fork":true,"url":"https://api.github.com/repos/kepkin/dex","forks_url":"https://api.github.com/repos/kepkin/dex/forks","keys_url":"https://api.github.com/repos/kepkin/dex/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kepkin/dex/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kepkin/dex/teams","hooks_url":"https://api.github.com/repos/kepkin/dex/hooks","issue_events_url":"https://api.github.com/repos/kepkin/dex/issues/events{/number}","events_url":"https://api.github.com/repos/kepkin/dex/events","assignees_url":"https://api.github.com/repos/kepkin/dex/assignees{/user}","branches_url":"https://api.github.com/repos/kepkin/dex/branches{/branch}","tags_url":"https://api.github.com/repos/kepkin/dex/tags","blobs_url":"https://api.github.com/repos/kepkin/dex/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kepkin/dex/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kepkin/dex/git/refs{/sha}","trees_url":"https://api.github.com/repos/kepkin/dex/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kepkin/dex/statuses/{sha}","languages_url":"https://api.github.com/repos/kepkin/dex/languages","stargazers_url":"https://api.github.com/repos/kepkin/dex/stargazers","contributors_url":"https://api.github.com/repos/kepkin/dex/contributors","subscribers_url":"https://api.github.com/repos/kepkin/dex/subscribers","subscription_url":"https://api.github.com/repos/kepkin/dex/subscription","commits_url":"https://api.github.com/repos/kepkin/dex/commits{/sha}","git_commits_url":"https://api.github.com/repos/kepkin/dex/git/commits{/sha}","comments_url":"https://api.github.com/repos/kepkin/dex/comments{/number}","issue_comment_url":"https://api.github.com/repos/kepkin/dex/issues/comments{/number}","contents_url":"https://api.github.com/repos/kepkin/dex/contents/{+path}","compare_url":"https://api.github.com/repos/kepkin/dex/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kepkin/dex/merges","archive_url":"https://api.github.com/repos/kepkin/dex/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kepkin/dex/downloads","issues_url":"https://api.github.com/repos/kepkin/dex/issues{/number}","pulls_url":"https://api.github.com/repos/kepkin/dex/pulls{/number}","milestones_url":"https://api.github.com/repos/kepkin/dex/milestones{/number}","notifications_url":"https://api.github.com/repos/kepkin/dex/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kepkin/dex/labels{/name}","releases_url":"https://api.github.com/repos/kepkin/dex/releases{/id}","deployments_url":"https://api.github.com/repos/kepkin/dex/deployments","created_at":"2018-08-06T13:40:06Z","updated_at":"2018-08-31T17:18:15Z","pushed_at":"2018-12-10T14:08:51Z","git_url":"git://github.com/kepkin/dex.git","ssh_url":"git@github.com:kepkin/dex.git","clone_url":"https://github.com/kepkin/dex.git","svn_url":"https://github.com/kepkin/dex","homepage":"https://coreos.com/blog/announcing-dex.html","size":14516,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dexidp:master","ref":"master","sha":"aafbaa36c59291989149c8802f6a9927cdc4fbde","user":{"login":"dexidp","id":42422344,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQyNDIyMzQ0","avatar_url":"https://avatars0.githubusercontent.com/u/42422344?v=4","gravatar_id":"","url":"https://api.github.com/users/dexidp","html_url":"https://github.com/dexidp","followers_url":"https://api.github.com/users/dexidp/followers","following_url":"https://api.github.com/users/dexidp/following{/other_user}","gists_url":"https://api.github.com/users/dexidp/gists{/gist_id}","starred_url":"https://api.github.com/users/dexidp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dexidp/subscriptions","organizations_url":"https://api.github.com/users/dexidp/orgs","repos_url":"https://api.github.com/users/dexidp/repos","events_url":"https://api.github.com/users/dexidp/events{/privacy}","received_events_url":"https://api.github.com/users/dexidp/received_events","type":"Organization","site_admin":false},"repo":{"id":40916314,"node_id":"MDEwOlJlcG9zaXRvcnk0MDkxNjMxNA==","name":"dex","full_name":"dexidp/dex","private":false,"owner":{"login":"dexidp","id":42422344,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQyNDIyMzQ0","avatar_url":"https://avatars0.githubusercontent.com/u/42422344?v=4","gravatar_id":"","url":"https://api.github.com/users/dexidp","html_url":"https://github.com/dexidp","followers_url":"https://api.github.com/users/dexidp/followers","following_url":"https://api.github.com/users/dexidp/following{/other_user}","gists_url":"https://api.github.com/users/dexidp/gists{/gist_id}","starred_url":"https://api.github.com/users/dexidp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dexidp/subscriptions","organizations_url":"https://api.github.com/users/dexidp/orgs","repos_url":"https://api.github.com/users/dexidp/repos","events_url":"https://api.github.com/users/dexidp/events{/privacy}","received_events_url":"https://api.github.com/users/dexidp/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/dexidp/dex","description":"OpenID Connect Identity (OIDC) and OAuth 2.0 Provider with Pluggable Connectors","fork":false,"url":"https://api.github.com/repos/dexidp/dex","forks_url":"https://api.github.com/repos/dexidp/dex/forks","keys_url":"https://api.github.com/repos/dexidp/dex/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dexidp/dex/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dexidp/dex/teams","hooks_url":"https://api.github.com/repos/dexidp/dex/hooks","issue_events_url":"https://api.github.com/repos/dexidp/dex/issues/events{/number}","events_url":"https://api.github.com/repos/dexidp/dex/events","assignees_url":"https://api.github.com/repos/dexidp/dex/assignees{/user}","branches_url":"https://api.github.com/repos/dexidp/dex/branches{/branch}","tags_url":"https://api.github.com/repos/dexidp/dex/tags","blobs_url":"https://api.github.com/repos/dexidp/dex/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dexidp/dex/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dexidp/dex/git/refs{/sha}","trees_url":"https://api.github.com/repos/dexidp/dex/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dexidp/dex/statuses/{sha}","languages_url":"https://api.github.com/repos/dexidp/dex/languages","stargazers_url":"https://api.github.com/repos/dexidp/dex/stargazers","contributors_url":"https://api.github.com/repos/dexidp/dex/contributors","subscribers_url":"https://api.github.com/repos/dexidp/dex/subscribers","subscription_url":"https://api.github.com/repos/dexidp/dex/subscription","commits_url":"https://api.github.com/repos/dexidp/dex/commits{/sha}","git_commits_url":"https://api.github.com/repos/dexidp/dex/git/commits{/sha}","comments_url":"https://api.github.com/repos/dexidp/dex/comments{/number}","issue_comment_url":"https://api.github.com/repos/dexidp/dex/issues/comments{/number}","contents_url":"https://api.github.com/repos/dexidp/dex/contents/{+path}","compare_url":"https://api.github.com/repos/dexidp/dex/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dexidp/dex/merges","archive_url":"https://api.github.com/repos/dexidp/dex/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dexidp/dex/downloads","issues_url":"https://api.github.com/repos/dexidp/dex/issues{/number}","pulls_url":"https://api.github.com/repos/dexidp/dex/pulls{/number}","milestones_url":"https://api.github.com/repos/dexidp/dex/milestones{/number}","notifications_url":"https://api.github.com/repos/dexidp/dex/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dexidp/dex/labels{/name}","releases_url":"https://api.github.com/repos/dexidp/dex/releases{/id}","deployments_url":"https://api.github.com/repos/dexidp/dex/deployments","created_at":"2015-08-17T17:57:06Z","updated_at":"2018-12-11T09:40:54Z","pushed_at":"2018-12-10T14:08:53Z","git_url":"git://github.com/dexidp/dex.git","ssh_url":"git@github.com:dexidp/dex.git","clone_url":"https://github.com/dexidp/dex.git","svn_url":"https://github.com/dexidp/dex","homepage":"","size":14468,"stargazers_count":2718,"watchers_count":2718,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":578,"mirror_url":null,"archived":false,"open_issues_count":167,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":578,"open_issues":167,"watchers":2718,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dexidp/dex/pulls/1370"},"html":{"href":"https://github.com/dexidp/dex/pull/1370"},"issue":{"href":"https://api.github.com/repos/dexidp/dex/issues/1370"},"comments":{"href":"https://api.github.com/repos/dexidp/dex/issues/1370/comments"},"review_comments":{"href":"https://api.github.com/repos/dexidp/dex/pulls/1370/comments"},"review_comment":{"href":"https://api.github.com/repos/dexidp/dex/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dexidp/dex/pulls/1370/commits"},"statuses":{"href":"https://api.github.com/repos/dexidp/dex/statuses/2d5769522717aa49c02ab347944707bda3a66b5b"}},"author_association":"NONE"}}
{"actor":{"display_login":"srenatus"}}